CSCE 515 Computer Network Programming ChinTser Huang huangctcse















- Slides: 15
CSCE 515: Computer Network Programming Chin-Tser Huang huangct@cse. sc. edu University of South Carolina 2/10/2004
Internet Control Message Protocol (ICMP) n n Utilized by either IP or higher layer (TCP or UDP) to communicate conditions that require attention Two main categories n n n Query message Error message Usage of an ICMP message is determined by type and code fields 2/10/2004 2
ICMP Message Format 0 78 type 15 16 code 31 checksum payload 2/10/2004 3
ICMP Address Mask Request and Reply 0 78 type(17 or 18) 15 16 31 checksum code(0) identifier sequence number subnet mask 2/10/2004 4
ICMP Timestamp Request and Reply 0 78 type(13 or 14) 15 16 code(0) identifier 31 checksum sequence number originate timestamp receive timestamp transmit timestamp 2/10/2004 5
ICMP Unreachable Error 0 78 type(3) 15 16 code(0 -15) 31 checksum unused (must be 0) IP header + first 8 bytes of original datagram data 2/10/2004 6
ICMP Time Exceeded 0 78 type(11) 15 16 code(0 or 1) 31 checksum unused (must be 0) IP header + first 8 bytes of original datagram data 2/10/2004 7
ping Program n n n Test whether another host is reachable -n option to set number of echo request to send -i option to set TTL -r option to record route -s option to set timestamp -w option to set timeout to wait for each reply 2/10/2004 8
ICMP Echo Request and Reply 0 78 type(0 or 8) 15 16 31 checksum code(0) identifier sequence number optional data 2/10/2004 9
IP Record Route Option 39 bytes code len ptr 1 1 1 2/10/2004 IP addr #1 IP addr #2 4 4 … IP addr #9 4 10
traceroute Program n n Display the route that IP datagrams follow from one host to another Can use IP source route option -g option to specify intermediate routers to be used with loose source routing (up to 8 times) -G option to specify intermediate routers to be used with strict source routing (up to 8 times) 2/10/2004 11
IP Source Routing dest = D {#R 1, R 2, R 3} S dest = R 1 {#R 2, R 3, D} 2/10/2004 R 1 dest = R 2 {R 1, #R 3, D} R 2 dest = R 3 {R 1, R 2, #D} R 3 dest = D {R 1, R 2, R 3#} D 12
IP Source Route Option 39 bytes code len ptr 1 1 1 2/10/2004 IP addr #1 IP addr #2 4 4 … IP addr #9 4 13
IP Processing routing daemon routing table updates from adjacent routers route command netstat command UDP TCP ICMP P s M IC rect di re routing table IP output: calculate next hop router (if necessary) our packet (one of gram ta a d d r a w our IP address or for d) broadcast addresses)? ing enable (if forward sourc e rou ting process IP options IP input queue IP layer 2/10/2004 network interfaces 14
Next Class n n Routing principles Routing protocols Read TI Ch. 9, 10 Project 2 will be passed out 2/10/2004 15















