1
15 February, 2001 1
The Internet Network Layer
2 15 February, 2001 The Computer Communications Course
The Internet Network Layer
- Host, router network layer functions:
The Internet Network Layer 15 February, 2001 1 The Internet - - PDF document
The Internet Network Layer 15 February, 2001 1 The Internet Network Layer Host, router network layer functions:
15 February, 2001 1
2 15 February, 2001 The Computer Communications Course
3 15 February, 2001 The Computer Communications Course
15 February, 2001 The Computer Communications Course
5 15 February, 2001 The Computer Communications Course
for host / router network interface
connection between host, router and physical link
✁routers typically have multiple interfaces
✁host may have multiple interfaces, too
✁IP addresses associated with interface, not host, router
223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1
6 15 February, 2001 The Computer Communications Course
network part (high order bits)
✁host part (low order bits)
(from IP address perspective)
✁device interfaces with same network part of IP address
✁can physically reach each
router
223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27
7 15 February, 2001 The Computer Communications Course
How to find the networks?
router, host
networks
223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27
223.1.1.2
223.1.7.0 223.1.7.1 223.1.8.0 223.1.8.1 223.1.9.1 223.1.9.2
15 February, 2001 The Computer Communications Course
9 15 February, 2001 The Computer Communications Course
Convention: 0 means “this”, 1 means “all” Try: ping -s 132.65.255.255
This host A host on this network Broadcast on the local network Broadcast on a distant network Loopback
10 15 February, 2001 The Computer Communications Course
4-bit Version 4-bit Header Length 8-bit Type of Service (TOS)
16-bit Total Length 16-bit Identification 3-bit Flags 13-bit Fragment Offset
8-bit Time To Live (TTL)
8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Padding Data Options (if any)
11 15 February, 2001 The Computer Communications Course
15 February, 2001 The Computer Communications Course
13 15 February, 2001 The Computer Communications Course
15 February, 2001 The Computer Communications Course
(max.transfer size) - largest possible link-level frame.
✁different link types, different MTUs
(fragmented) within net
✁several datagrams
✁reassembled only at
final destination
✁IP header bits used to identify, order related fragments
✲✟✍✏✗✎✡☎✱✴✚✛✠☛✆✑✗✟✆✟✞ ✁✂✠✁ ✞ ✠✁ ✁✂✠✯✚ ✓ ✗✥✍✑✡✟✚✌✮✥✗✟✆✑✗✎✡☎✍✑✗☎✱ ✁☎✄✜✆✂ ✏✌✕✜✱ ✗✂✓ ✓ ✚✂✍✼✮✥✗✎✆✑✗✟✡✥✍✏✗☎✱✼✕ ✍✏✚☎✗✟✕☛✕☛✚✂✱☎✄✔✓ ✆15 15 February, 2001 The Computer Communications Course
.
16 15 February, 2001 The Computer Communications Course
17 15 February, 2001 The Computer Communications Course
15 February, 2001 The Computer Communications Course
0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header
19 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S Host Y.D
X.S => Y.D
IP layer on Host X.S X.S is about to send an IP packet to host is about to send an IP packet to host Y.D Y.D
20 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S Host Y.D
X.S => Y.D X.S => Y.D MAC(S) => MAC(R1)
X != Y: Send the packet to the default router R1 : Send the packet to the default router R1
21 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S Host Y.D
X.S => Y.D X.S => Y.D MAC(S) => MAC(R1) X.S => Y.D
IP layer on R1 gets the packet from its MAC layer and consults its routing table routing table
22 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S Host Y.D
X.S => Y.D X.S => Y.D MAC(S) => MAC(R1) X.S => Y.D MAC(R1) => MAC(R2) X.S => Y.D
R1 routes to the network Y through R2
R2’s MAC address
23 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S Host Y.D
X.S => Y.D X.S => Y.D MAC(S) => MAC(R1) X.S => Y.D MAC(R1) => MAC(R2) X.S => Y.D X.S => Y.D
IP layer on R2 gets the packet from its MAC layer and consults its routing table routing table
24 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S
X.S => Y.D X.S => Y.D MAC(S) => MAC(R1) X.S => Y.D MAC(R1) => MAC(R2) X.S => Y.D X.S => Y.D X.S => Y.D MAC(R1) => MAC(R2)
R2 is directly connected to the network Y
Y.D’s MAC address
Host Y.D
25 15 February, 2001 The Computer Communications Course
Network X Network Z Network Y R1 R2 Host X.S
X.S => Y.D X.S => Y.D MAC(S) => MAC(R1) X.S => Y.D MAC(R1) => MAC(R2) X.S => Y.D X.S => Y.D X.S => Y.D MAC(R1) => MAC(R2) X.S => Y.D
Host Y.D
IP layer on Y.D gets the packet from its MAC layer