ICMP: Ping and Trace CCNA 1 version 3.0 Rick Graziani Spring 2005.

Slides:



Advertisements
Similar presentations
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
Advertisements

21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Internet Control Message Protocol (ICMP)
CPSC 441 Tutorial - Network Tools 1 Network Tools CPSC 441 – Computer Communications Tutorial.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 CCNA 2 v3.1 Module 8. 2 TCP/IP Suite Error and Control Messages CCNA 2 Module 8.
CISCO NETWORKING ACADEMY Chabot College ELEC ping & traceroute.
1 ICMP – Using Ping and Trace CCNA Semester
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Network Layer Network Fundamentals – Chapter 5.
1 ICMP : Internet Control Message Protocol Computer Network System Sirak Kaewjamnong.
Connecting Networks © 2004 Cisco Systems, Inc. All rights reserved. Defining the IP Packet Delivery Process INTRO v2.0—4-1.
Chapter 6 IPv4 Addresses – Part 3 CIS 81 Networking Fundamentals Rick Graziani Cabrillo College Last Updated: 4/13/2008.
Chapter 6 IPv4 Addresses – Part 3 CIS 81 Networking Fundamentals Rick Graziani Cabrillo College Last Updated: 4/13/2008.
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College
TCP/IP Protocol Suite 1 Chapter 9 Upon completion you will be able to: Internet Control Message Protocol Be familiar with the ICMP message format Know.
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
Module 4 – Learning about other Devices Testing network connections.
Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
Guide to TCP/IP, Third Edition
Network Administration
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 9 Internet Control Message.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
Internet Control Message Protocol (ICMP)
ARP Scenarios CIS 81 and CST 311 Rick Graziani Fall 2005.
Herramientas para diagnósticos. Ping USO: Ping nombre.dominio o dirección IP Options: -t Ping the specifed host until interrupted. -a Resolve addresses.
1 Version 3.1 modified by Brierley Module 8 TCP/IP Suite Error and Control Messages.
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 8 TCP/IP Suite Error and Control Messages.
CCNA 2 Week 8 TCP/IP Suite Error Control Messages.
© Jörg Liebeherr (modified by M. Veeraraghavan) 1 ICMP: A helper protocol to IP The Internet Control Message Protocol (ICMP) is the protocol used for error.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 4 Internet Control Message Protocol (ICMP)
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
Internet Protocols. Address Resolution IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware.
Error and Control An IP datagram travels from node to node on the way to its destination Each router operates autonomously Failures or problems may occur.
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
1 Requirements for Internet Routers (Gateways) and Hosts Relates to Lab 3. (Supplement) Covers the compliance requirements of Internet routers and hosts.
Cisco 2 - Routers Perrine. J Page 112/19/2015 Chapter 8 TCP/IP Error Message Some of the conditions that must be met in order for host to host communication.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 8 TCP/IP Suite Error and Control Messages.
Module 8 JEOPARDY CCNA2 v3 Module 8 RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands.
Lecture#6:Connectivity Verification
Traceroute traceroute is a Unix utility designed by Van Jacobson in 1987 The Windows equivalent is called tracert The Linux equivalent is called tracepath.
Connectivity Verification
Network Tools and Utilities
CCNA 2 v3 JEOPARDY Module 8 CCNA2 v3 Module 8 K. Martin.
ICMP ICMP = Internet Control Message Protocol Layer 3
COMPUTER NETWORKS CS610 Lecture-33 Hammad Khalid Khan.
8 Network Layer Part V Computer Networks Tutun Juhana
ICMP – Using Ping and Trace
Part1: Ipconfig ping command Tracert command Getmac command
Lecture#7:Connectivity Verification
Byungchul Park ICMP & ICMPv DPNM Lab. Byungchul Park
Internet Control Message Protocol (ICMP)
ICMP – Using Ping and Trace
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
ITL Simple Diagnostic Tools
Lecture#6:Connectivity Verification
Internet Control Message Protocol
Internet Control Message Protocol
Fred Kuhns Applied Research Laboratory
32 bit destination IP address
TCP/IP Protocol Suite 1 Chapter 9 Upon completion you will be able to: Internet Control Message Protocol Be familiar with the ICMP message format Know.
Presentation transcript:

ICMP: Ping and Trace CCNA 1 version 3.0 Rick Graziani Spring 2005

Rick Graziani

Rick Graziani Ping Uses ICMP message encapsulated within an IP Packet –Protocol field = 1 Both are layer 3 protocols. (ICMP is considered as a network layer protocol.) Does not use TCP or UDP, but may be acted upon by the receiver using TCP or UDP. Format ping ip address (or ping for extended ping) ping

Rick Graziani Echo Request The sender of the ping, transmits an ICMP message, “Echo Request” Echo Request - Within ICMP Message Type = 8 Code = 0

Rick Graziani

Rick Graziani Echo Reply The IP address (destination) of the ping, receives the ICMP message, “Echo Request” The ip address (destination) of the ping, returns the ICMP message, “Echo Reply” Echo Reply - Within ICMP Message Type = 0 Code = 0

Rick Graziani Q: Are pings forwarded by routers? A: Yes! This is why you can ping devices all over the Internet. Q: Do all devices forward or respond to pings? A: No, this is up to the network administrator of the device. Devices, including routers, can be configured not to reply to pings (ICMP echo requests). This is why you may not always be able to ping a device. Also, routers can be configured not to forward pings destined for other devices. Routers and Pings

Rick Graziani Traceroute Traceroute is a utility that records the route (router IP addresses) between two devices on different networks.

Rick Graziani Tracroute On modern Unix and Linux-based operating systems, the traceroute utility by default uses UDP datagrams with a destination port number starting at The traceroute utility usually has an option to specify use of ICMP echo request (type 8) instead. The Windows utility uses ICMP echo request, better known as ping packets. Some firewalls on the path being investigated may block UDP probes but allow the ICMP echo request traffic to pass through. There are also traceroute implementations sending out TCP packets, such as tcptraceroute or Layer Four Trace. In Microsoft Windows, traceroute is named tracert. A new utility, pathping, was introduced with Windows NT, combining ping and traceroute functionality. All these traceroutes rely on ICMP (type 11) packets coming back.

Rick Graziani Trace ( Cisco = traceroute, tracert,…) is used to trace the probable path a packet takes between source and destination. Probable, because IP is a connectionless protocol, and different packets may take different paths between the same source and destination networks, although this is not usually the case. Trace will show the path the packet takes to the destination, but the return path may be different. –This is more likely the case in the Internet, and less likely within your own autonomous system. Linux/Unix Systems –Uses ICMP message within an IP Packet –Both are layer 3 protocols. –Uses UDP as a the transport layer. –We will see why this is important in a moment. Trace (Traceroute)

Rick Graziani Format (trace, traceroute, tracert) RTA# traceroute ip address RTA# traceroute Trace

Rick Graziani How it works (using UDP) - Fooling the routers & host! Traceroute uses ping (echo requests) Traceroute sets the TTL (Time To Live) field in the IP Header, initially to “1” Trace

Rick Graziani RTB - TTL: When a router receives an IP Packet, it decrements the TTL by 1. If the TTL is 0, it will not forward the IP Packet, and send back to the source an ICMP “time exceeded” message. ICMP Message: Type = 11, Code = 0 Trace

Rick Graziani RTB After the traceroute is received by the first router, it decrements the TTL by 1 to 0. Noticing the TTL is 0, it sends back a ICMP Time Exceeded message back to the source, using its IP address for the source IP address. Router B’s IP header includes its own IP address (source IP) and the sending host’s IP address (dest. IP).

Rick Graziani RTA, Sending Host The traceroute program of the sending host (RTA) will use the source IP address of this ICMP Time Exceeded packet to display at the first hop. RTA# traceroute Type escape sequence to abort. Tracing the route to msec 4 msec 4 msec

Rick Graziani RTA The traceroute program increments the TTL by 1 (now 2 ) and resends the ICMP Echo Request packet.

Rick Graziani RTB This time RTB decrements the TTL by 1 and it is NOT 0. (It is 1.) So it looks up the destination ip address in its routing table and forwards it on to the next router. RTC RTC however decrements the TTL by 1 and it is 0. RTC notices the TTL is 0 and sends back the ICMP Time Exceeded message back to the source. RTC’s IP header includes its own IP address (source IP) and the sending host’s IP address (destination IP address of RTA). The sending host, RTA, will use the source IP address of this ICMP Time Exceeded message to display at the second hop.

Rick Graziani RTA to RTB RTB to RTC

Rick Graziani The sending host, RTA: The traceroute program uses this information (Source IP Address) and displays the second hop. RTA# traceroute Type escape sequence to abort. Tracing the route to msec 4 msec 4 msec msec 16 msec 16 msec

Rick Graziani The sending host, RTA: The traceroute program increments the TTL by 1 (now 3 ) and resends the Packet.

Rick Graziani RTA to RTB RTB to RTC RTC to RTD

Rick Graziani RTB This time RTB decrements the TTL by 1 and it is NOT 0. (It is 2.) So it looks up the destination ip address in its routing table and forwards it on to the next router. RTC This time RTC decrements the TTL by 1 and it is NOT 0. (It is 1.) So it looks up the destination ip address in its routing table and forwards it on to the next router. RTD RTD however decrements the TTL by 1 and it is 0. However, RTD notices that the Destination IP Address of is it’s own interface. Since it does not need to forward the packet, the TTL of 0 has no affect.

Rick Graziani RTD RTD sends the packet to the UDP process. UDP examines the unrecognizable port number of 35,000 and sends back an ICMP Port Unreachable message to the sender, RTA, using Type 3 and Code 3.

Rick Graziani Sending host, RTA RTA receives the ICMP Port Unreachable message. The traceroute program uses this information (Source IP Address) and displays the third hop. The traceroute program also recognizes this Port Unreachable message as meaning this is the destination it was tracing.

Rick Graziani Sending host, RTA RTA, the sending host, now displays the third hop. Getting the ICMP Port Unreachable message, it knows this is the final hop and does not send any more traces (echo requests). RTA# traceroute Type escape sequence to abort. Tracing the route to msec 4 msec 4 msec msec 16 msec 16 msec msec 16 msec 16 msec

Rick Graziani For more information on ICMP and other TCP/IP topics, I recommend: TCP/IP Illustrated, Volume I – R.W. Stevens Recommended Reading

ICMP: Ping and Trace CCNA 1 version 3.0 Rick Graziani Spring 2005