Chapter_4 Network Layer-IP datagram and addressing.ppt
Chapter_4 Network Layer-IP datagram and addressing.ppt
Network Layer:
Datagram and
Addressing
segments to transport
data link data link
physicalnetwork physical
223 1 1 1
in chapter 5, 6.
223.1.3.27
223.1.1.3
223.1.2.2
IP : Internet protocol
Solution
We replace each group of 8 bits with its equivalent
decimal number (see Appendix B) and add dots for
separation.
Solution
a.There must be no leading zero (045)
b.There can be no more than four numbers.
c.Each number needs to be less than or equal to 255
d.A mixture of binary notation and dotted-decimal
notation is not allowed.
Network Layer: Addressing 4-0
Note
Solution
a.The first bit is 0 . This is a class A address.
b.The first 3 bits are 110; the class is C.
c.The first byte is 14; the class is A.
d.The first byte is 252 ; the class is E .
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 00100000
or 205.16.37.32.
This is actually the block shown in Figure 4.3.
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or 205.16.37.47
This is actually the block shown in Figure 43.
Solution
The value of n is 28 , which means that
number of addresses is 232-28 = 16
● IP address: 223.1.1.1
• subnet part - high order
bits 223.1.1.2 223.1.2.1
223.1.1.4 223.1.2.9
• host part - low order bits
● what’s a subnet ? 223.1.1.3 223.1.3.27
223.1.2.2
223.1.1.0/2
recipe 4 223.1.2.0/2
● to determine the 223.1.1.1 4
subnets, detach each 223.1.1.2 223.1.2.1
interface from its host 223.1.1.4 223.1.2.9
or router, creating
223.1.2.2
islands of isolated 223.1.1.3 223.1.3.27
networks subne
● each isolated network t
is called a subnet 223.1.3.1 223.1.3.2
223.1.3.0/2
4
Network Layer: Addressing 4-0
Subnets 223.1.1.2
223.1.1.3
223.1.9.2 223.1.7.0
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0
223.1.2.6 223.1.3.27
subne hos
t t
11001000 00010111
part 00010000 part
00000000
200.23.16.0/2
3
223.1.1.0/24
DHCP
server
223.1.1.1 223.1.2.1
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server! Here’s an IP address
yiaddrr: 223.1.2.4
transaction
you canID:use
654
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255,
Broadcast: 67
OK. I’ll take
yiaddrr: 223.1.2.4
that IP address!
transaction ID: 655
lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255,
Broadcast: OK. You’ve 68 got
yiaddrr: 223.1.2.4
that IP address!
transaction ID: 655
lifetime: 3600 secs
Network Layer: Addressing 4-0
IP addresses: how to get one?
Q: how does network get subnet part of IP addr?
A: gets allocated portion of its provider ISP’s address
space
11111111.11111111.11110000.10000000
Subnet Host
Organization
0
200.23.16.0/23
Organization
1 “Send me
200.23.18.0/23 anything
Organization with addresses
2 200.23.20.0/23 . Fly-By-Night- beginning
.. 200.23.16.0/20”
. ISP
Interne
Organization
.. t
7
200.23.30.0/23
“Send me
ISPs-R-
anything
Us
with addresses
beginning
199.31.0.0/16”
Organization
0
200.23.16.0/23
“Send me
anything
Organization with addresses
2 200.23.20.0/23 . Fly-By-Night- beginning
.. 200.23.16.0/20”
..
ISP
Interne
Organization . t
7
200.23.30.0/23
“Send me anything
ISPs-R-
with addresses
Us
Organization beginning
1 199.31.0.0/16
200.23.18.0/23
or 200.23.18.0/23”
16,777,216
1,048,576
65,536
10.0.0.3
Solution
We first need to align the left side of the double colon to
the left of the original pattern and the right side of the
double colon to the right of the original pattern to find
how many 0s we need to replace the double colon.
32
Network Layer: Addressing 4-0
bits
Other changes from IPv4
● checksum: removed entirely to reduce processing
time at each hop
● options: allowed, but outside of header, indicated
by “Next Header” field
● ICMPv6: new version of ICMP
• additional message types, e.g. “Packet Too Big”
• multicast group management functions
IPv6
IPv4 datagram
datagram
Network Layer: Addressing 4-0
Tunneling
A B IPv4 tunnel E F
connecting IPv6
logical
routers
view: IPv6 IPv6 IPv6 IPv6
A B C D E F
physical
view: IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
A B C D E F
physical
view: IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
data data
A-to-B: E-to-F:
B-to-C: B-to-C:
IPv6 IPv6
IPv6 IPv6
inside Network Layer: Addressing 4-0
inside
IPv4 IPv4