/
Q and A, Ch. 21 Q and A, Ch. 21

Q and A, Ch. 21 - PowerPoint Presentation

stefany-barnette
stefany-barnette . @stefany-barnette
Follow
363 views
Uploaded On 2016-05-07

Q and A, Ch. 21 - PPT Presentation

IS333 Spring 2016 Victor Norman Dotteddecimal notation Q I still dont understand dotted decimal Are we supposed to know how to convert from 32 bit to dotted decimal If so how do I even begin to do that ID: 309030

network address bits addresses address network addresses bits part host mask bit hosts class addressing 100 decimal 154 routing

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Q and A, Ch. 21" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Q and A, Ch. 21

IS333, Spring 2016

Victor NormanSlide2

Dotted-decimal notation

Q: I still don't understand dotted decimal. Are we supposed to know how to convert from 32 bit to dotted decimal? If so how do I even begin to do that?

A: An IP address is 4 bytes = 32 bits. One byte is a decimal number from 0 to 255. So, you convert each byte of the address to decimal and put a . between each part.Slide3

IP Address Parts

Every IP address has two (or 3) parts:

Network part: uniquely identifies the network universally.

Host part: uniquely identifies the host on the network.

Why is this done?

Routing is done on the network part of an IP address.

For scalability.

Part of the host part can be used as a subnet part,

within an organization

.Slide4

Classful IP Addressing

(the old way)

Figure 21.1

4 kinds of addresses

Didn’t have to specify the mask, because you could figure it out from the address.

Exercise: what class does 200.201.202.203 belong to?Slide5

Address masks

Q: Can you explain address masks a bit more?

A: An address mask indicates with 1 bits the parts of an address that are the network part. The 1 bits are all consecutive and at the “left-most” part of the address.

Can be shown as /n

first n bits are 1s

which means the first n bits are the network part.

E.g., Class C address

 24-bit network part  255.255.255.0  /24

NOTE: masks only needed in

classful

addressing to indicate the subnet part.Slide6

Subnet Addressing

With

classful

addressing, if you got a class B address, you had 1 LAN with 2^16 hosts on it.

What if you wanted 2 LANs? (Why would you?)

Internally in your network

, you could subdivide your LAN into multiple LANs (or

subnets

) using subnetting.

“Borrow” some bits of the host part to indicate the subnet.

1 bit

 2 LANs; 2 bits  4 LANs; etc.

Now, you have to

route

between LANs in your organization.

Now, every machine in your network has to know the

netmask

for the network  so that it can figure out if another IP address is on its LAN or on another LAN.Slide7

How to tell if a machine is on a network?

A machine with address

addr

is on network

N

with

mask

M

if

addr

& M == N

N is 32-bit

network

address (host part all 0s)

& is binary AND

Could read this: if the network part of

addr

equals the network

N

.

Exercise: is 153.106.129.33 on network 153.106.128 / 24 ?

How about 153.106.128 / 17?

Q: does every interface on a LAN have to have the same mask?Slide8

Exercise

BeatHope.com

, LLC, needs IP addresses for 500 computers (and we still live in a

classful

addressing world)

What class of IP addresses should they request?

They want 3 subnets, for privacy/security:

30 machines on one subnet,

50 machines on another,

420 machines on the last.

What subnetting scheme should they use?

How does “the world” see

BeatHope.com’s

network? I.e., what mask does “the world” use?Slide9

Classless Addressing

What is the problem with having only class A, B, or C address blocks?

If you need, say, 256 hosts (which is > 254), you need class B, which means ~65,200 wasted IP addresses…

What is the solution?

Assign blocks of IP addresses to organizations based on any number of bits in the mask. (instead of just 8, 16, or 24 bits)

e.g., 28 bit mask

 2^4 – 2 hosts = 14 hosts.

e.g., 23 bit mask  2 ^ 9 – 2 hosts = 510 hosts.

Means many 23-bit IP address blocks can be given out to many companies, instead of 1 16-bit address block.

Means far fewer wasted IP addresses and far more # of networks.Slide10

Example

Tiny Corp wants a network with max 14 hosts.

Network provider gives them 154.100.1.0/28

first 3 bytes have to be 154.100.1, top half of 4

th

byte has to be all 0s. Hosts in the network will be from 154.100.1.1 – 154.100.1.14.

Bcast

address is 154.100.1.15 (all host bits are 1s).

Joe’s Pizza asks for and gets network 154.100.1.16/28.

top half of 4

th

byte is 0001. Hosts are 154.100.1.17 – 154.100.1.30.

BubbleGumRUs

has network 154.100.1.32/28…

16 networks with 154.100.1/28 can be allocatedSlide11

Do classes matter anymore?

Q: In classless routing, do classes matter any more?

A: Sort of. If you have what used to be a class B address (16-bit network part), then your network must have a mask of at least 16 bits.

You can’t just have 8 bits, because there are 2^8 networks with the same top 8 bits.

In other words, from looking at an address alone, you can tell the mask must be >= some #.Slide12

Watch out!

One problem with masks that aren’t 8, 16, or 24 bits is that IP addresses are still written

8-bits . 8-bits . 8-bits . 8-bits.

E.g., In CS at Calvin, we have machines on 153.106.116.* and 153.106.117.* that are on the same LAN… Hard to tell that from looking at the addresses alone.

116 = 0111 0100, 117 = 0111 0101

mask is /23 – 255.255.254.0.

last 9 bits of the IP address are the host part.Slide13

Reuse of addresses

Q: Can IP addresses be reused within a network?

A: Yes. IP addresses within an organization are usually assigned with DHCP. These addresses are “leased”, and can be taken back and given to another machine.Slide14

Address depletion, sales, etc.

Q: Can IP addresses be sold?

A: I thought it was “no”, but it turns out it is “yes”.

http://www.gtri.com/how-to-buy-or-sell-ipv4-addresses

/

https://

www.arin.net/resources/index.html

https://

www.iana.org/numbersSlide15

Special addresses

Network address:

all

host

bits in the address are 0s.

Used in routing tables, etc.

Directed broadcast address:

all

host

bits in the address are 1s.

when used as a destination address in a packet, it means the packet is routed to the destination network and then broadcast on it.

Not done by routers today.Slide16

Special addresses (2)

Limited broadcast address

32 1 bits.

As a destination address, means send to all machines on the local Layer 2 network.

Loopback address:

127.0.0.0/8 – typically 127.0.0.1

Used to test your local TCP/IP stack or to send some packet back to yourself so another task can process it.Slide17

“Joke shirt”Slide18

Multiple IP addresses on one machine?

Q: Is it possible for a host to have more than one IP address?

A: Yes! If a host has multiple routing

interfaces

then it must have multiple IP addresses.

A router/host has to decide how to get a packet to its destination: can the packet be sent directly to its destination or does it have to go through a router to be forwarded?

So, each interface has to have an IP address (and know the

netmask

) for the network it is on.Slide19

Old slidesSlide20

Universal Addressing Scheme

Q: Apart from the fact that arbitrary pairs of application programs can communicate without knowing the type of network hardware, what are the other needs for a universal addressing scheme?

A: That’s about the only thing I can think of…Slide21

Dotted-decimal notation

Q: I still don't understand dotted decimal. Are we supposed to know how to convert from 32 bit to dotted decimal? If so how do I even begin to do that?

A: An IP address is 4 bytes = 32 bits. One byte is a decimal number from 0 to 255. So, you convert each byte of the address to decimal and put a . between each part.Slide22

Non-computers have IP addresses?

Q: The chapter talks about computers having IP addresses but do other devices like printers have them as well?

A: Yes! Anything that needs to talk on the network needs to have an IP address.Slide23

No hierarchical structure?

Q: Could the Internet have been designed with no hierarchical structure of IP addresses so none would be wasted?

A: It could but it wouldn’t scale.

Packets are routed based on their network part only.

This allows one routing entry for hundreds or thousands of hosts. Without a hierarchy, you’d have to have an entry for every host.Slide24

Suffix not needed?

Q: If you apply a mask to an IP address, you only see the prefix right? Why? Don't you need to know the suffix as well?

A: The mask is applied to the address in a host or router when deciding how to route the packet. It is not applied anywhere else. And, routing is based on the network an address belongs to, so to make this decision, the host/router doesn’t need to know the suffix.Slide25

Need for classless addressing

Q: Can you explain the need for classless addressing?

A: IANA began to see that lots of addresses were being wasted. If your company needed 300 addresses, you couldn’t get a class C address (254 addresses max), so you got a class B, with 65534 addresses, most of which went unused. And, the number of class B networks was going down fast…Slide26

Lots of IP addresses available?

Q: Aren't there so many IP addresses available, that it would never matter if we were wasteful?

A: No! The last set of addresses was given out by the IANA to a regional address registrar last year. We are now out of IP addresses.Slide27

More memory for CIDR?

Q: Did it use a lot more memory to start storing a 32 bit mask along with every 32 IP address?

A: The question is, where is this extra memory required? The IP packet header didn’t change at all. Routing tables didn’t change either – because subnetting was available before CIDR. The only thing that changed is routing protocols, and they take more memory now, and the fact that ISPs can hand out non-/8, /16, and /24 blocks of addresses.Slide28

IP Address Reuse

Q: Are IP addresses reused, and does a server store what IP addresses are being used and then know when one is no longer being used?

A: IP addresses are re-used in a network that assigns them via DHCP. And, they could be reused in the Internet when one company’s address block is not used anymore.Slide29

Switching algorithm

in memory have a table that maps between port and mac address.

receive frame on port n, with source mac

smac

and

dest

mac

dmac

.

look up

smac

in table. Add entry if not there. Update entry if there, and port is not n.

if

dmac

is

bcast

(all 1s), send to all ports, except n.

look up

dmac

in table: if not there, send frame to all ports except n. If there, send frame to only port associated with

dmac

.

go through all entries in table and remove old ones.Slide30

Practice questions

Need a network with 2000 hosts. What class network would you get in the old days when we did classful networking? With classless addressing, your ISP would give you a network with what mask?Slide31

Practice questions (2)

For network 200.201.220.16/28:

how many hosts can you have?

what is the broadcast address?

what is highest IP address?Slide32

Practice (3)

You get 153.106.96.0/20 from your ISP.

How many bits for host part?

What is the limited broadcast address?

You want 16 subnets, so what is your internal subnet mask?

What is the lowest host IP address for subnet 3 (starting with 0)?

Related Contents


Next Show more