Title: Lecture 9: Network Layer
1Lecture 9 Network Layer
Application
Transport
Network
Link
- Todays lecture
- ICMP, Ping, Traceroute
2Overview
3ICMP Internet Control Message Protocol
- used by hosts, routers, gateways to communicate
network-level information - network-layer above IP
- ICMP msgs carried in IP datagrams
- Two types
- error reporting
- unreachable host, network, port, protocol,
- fragment needed by DF bit set
- Time exceeded (TTL)
- etc.
- Query/response
- Echo request/reply
- Timestamp request/reply
- Address mask request/reply
4ICMP
5Error message
- ICMP error message
- ICMP header
- type, code, checksum,
- ICMP message
- IP header plus first 8 bytes of IP datagram
causing error - To prevent broadcast storm NOT generate ICMP in
response to - ICMP error message
- DestIP broadcast address
- Link layer broadcast
- A fragment other than the first
- Source address not defined as a single host
6ICMP
- Type Code description
Query Error - 0 0 echo reply (ping) x
- 3 0 dest. network unreachable x
- 3 1 dest host unreachable x
- 3 2 dest protocol unreachable x
- 3 3 dest port unreachable x
- 3 6 dest network unknown x
- 3 7 dest host unknown x
- 4 0 source quench (congestion x
- control - not used)
- 8 0 echo request (ping) x
- 9 0 route advertisement x
- 10 0 router discovery x
- 11 0 TTL expired x
- 12 0 bad IP header x
7Ping (ICMP)
- Basic connectivity test
- uses ICMP echo request/reply messages.
- Client/server paradigm
- Usually implemented in the kernel.
- man ping
8Format
sequence no.
identifier
9Ping
bread ping -s shannon.cs.ucdavis.edu PING
shannon.cs.ucdavis.edu 56 data bytes 64 bytes
from shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq0. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq1. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq2. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq3. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq4. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq5. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq6. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq7. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq8. time0. ms 64 bytes from
shannon.cs.ucdavis.edu (169.237.6.199)
icmp_seq9. time0. ms ----shannon.cs.ucdavis.ed
u PING Statistics---- 30 packets transmitted, 30
packets received, 0 packet loss round-trip (ms)
min/avg/max 0/0/0
10Ping
bread ping -s mark.ecn.purdue.edu PING
mark.ecn.purdue.edu 56 data bytes 64 bytes from
mark.ecn.purdue.edu (128.46.209.167) icmp_seq0.
time66. ms 64 bytes from mark.ecn.purdue.edu
(128.46.209.167) icmp_seq1. time64. ms 64
bytes from mark.ecn.purdue.edu (128.46.209.167)
icmp_seq3. time64. ms 64 bytes from
mark.ecn.purdue.edu (128.46.209.167) icmp_seq4.
time65. ms 64 bytes from mark.ecn.purdue.edu
(128.46.209.167) icmp_seq5. time64. ms 64
bytes from mark.ecn.purdue.edu (128.46.209.167)
icmp_seq8. time65. ms 64 bytes from
mark.ecn.purdue.edu (128.46.209.167)
icmp_seq10. time65. ms 64 bytes from
mark.ecn.purdue.edu (128.46.209.167)
icmp_seq11. time65. ms 64 bytes from
mark.ecn.purdue.edu (128.46.209.167)
icmp_seq12. time65. ms 64 bytes from
mark.ecn.purdue.edu (128.46.209.167)
icmp_seq15. time64. ms C ----mark.ecn.purdue.ed
u PING Statistics---- 18 packets transmitted, 10
packets received, 44 packet loss round-trip (ms)
min/avg/max 64/65/66
11Traceroute
- By Van Jacobson
- See route that IP datagram follow
- Uses ICMP and TTL (but not part of ICMP)
- A router gets an IP datagram with TTL 0/1,
discards the packet and sends back an ICMP to the
source time exceeded. - Source sends UDP fragment with 1,2,3, TTL values
- IP packet contains an UDP with unused post .
dest. Replies port unreachable ICMP message.
12Traceroute
bread traceroute ector.cs.purdue.edu traceroute
Warning Multiple interfaces found using
169.237.6.16 _at_ qfe0 traceroute to
ector.cs.purdue.edu (128.10.2.10), 30 hops max,
40 byte packets 1 169.237.5.254 (169.237.5.254)
0.594 ms 0.337 ms 0.298 ms 2 169.237.246.238
(169.237.246.238) 0.533 ms 0.479 ms 0.474 ms
3 128.120.2.49 (128.120.2.49) 0.547 ms 0.475
ms 0.475 ms 4 core0.ucdavis.edu (128.120.0.30)
0.616 ms 0.671 ms 0.642 ms 5
area0-area14p.ucdavis.edu (128.120.0.222) 0.570
ms 0.468 ms 0.821 ms 6 area14p-border20.ucdavi
s.edu (128.120.0.250) 1.149 ms 0.691 ms 3.132
ms 7 dc-oak-dc2--ucd-ge.cenic.net
(137.164.24.225) 4.751 ms 2.434 ms 4.521 ms 8
dc-oak-dc1--oak-dc2-ge.cenic.net (137.164.22.36)
2.394 ms 4.217 ms 2.452 ms 9
dc-svl-dc1--oak-dc1-10ge.cenic.net
(137.164.22.30) 201.245 ms 5.091 ms 183.393
ms 10 dc-sol-dc1--svl-dc1-pos.cenic.net
(137.164.22.28) 13.421 ms 11.258 ms 11.155
ms 11 hpr-lax-hrp1--dc-lax-dc1-ge.cenic.net
(137.164.22.13) 11.571 ms 14.390 ms 11.809
ms 12 abilene-LA--hpr-lax-gsr1-10ge.cenic.net
(137.164.25.3) 13.431 ms 11.417 ms 11.289
ms 13 snvang-losang.abilene.ucaid.edu
(198.32.8.95) 19.141 ms 20.516 ms 19.117 ms 14
kscyng-snvang.abilene.ucaid.edu (198.32.8.103)
54.300 ms 53.943 ms 53.998 ms 15
iplsng-kscyng.abilene.ucaid.edu (198.32.8.80)
64.783 ms 68.220 ms 63.659 ms 16
ul-abilene.indiana.gigapop.net (192.12.206.250)
63.567 ms 63.381 ms 63.025 ms 17
tel-210-m10-01-gp.tcom.purdue.edu (192.5.40.9)
65.017 ms 64.982 ms 18 cs-2u01-c3550-01-242.tc
om.purdue.edu (128.210.242.51) 65.527 ms 65.282
ms 65.083 ms 19 ector.cs.purdue.edu
(128.10.2.10) 65.528 ms