CPSC 441 TUTORIAL – MARCH 7, 2012 TA: MARYAM ELAHI NETWORK TOOLS.

Slides:



Advertisements
Similar presentations
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
Advertisements

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.
1 Internet Networking Spring 2002 Tutorial 4 ICMP (Internet Control Message Protocol)
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Internet Control Message Protocol (ICMP). Introduction The Internet Protocol (IP) is used for host-to-host datagram service in a system of interconnected.
Chapter 5 The Network Layer.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Internet Control Message Protocol (ICMP) Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
1 Internet Control Message Protocol (ICMP) RIZWAN REHMAN CCS, DU.
CISCO NETWORKING ACADEMY Chabot College ELEC ping & traceroute.
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.
Traceroute Ping. Shows the path a packet of information takes from your computer to one you specify. Lists all the routers it passes through until it.
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.
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
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
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
Herramientas para diagnósticos. Ping USO: Ping nombre.dominio o dirección IP Options: -t Ping the specifed host until interrupted. -a Resolve addresses.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Internet Control Message Protocol (ICMP) Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
ICMP : Internet Control Message Protocol. Introduction ICMP is often considered part of the IP layer. It communicates error messages and other conditions.
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.
IP Forwarding.
POSTECH DP&NM Lab. Internet Traffic Monitoring and Analysis: Methods and Applications (1) 4. Active Monitoring Techniques.
© 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.
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.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
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.
Chapter 23 Internet Control Message Protocol used to report information and errors IP uses ICMP when it sends an error message ICMP uses IP to transport.
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)
Internet Control Message Protocol (ICMP) Chapter 7.
LSNDI RMRA 1 Design and troubleshooting M Clements.
1 7 Ping Program. 2 7 Introduction - Problem How do I know if a host is reachable?
4: Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Lecture#6:Connectivity Verification
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Connectivity Verification
Network Tools and Utilities
Internet Control Message Protocol (ICMP)
21-2 ICMP(Internet control message protocol)
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
Part1: Ipconfig ping command Tracert command Getmac command
Lecture#7:Connectivity Verification
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Lecture#6:Connectivity Verification
Internet Control Message Protocol
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:

CPSC 441 TUTORIAL – MARCH 7, 2012 TA: MARYAM ELAHI NETWORK TOOLS

ICMP I nternet C ontrol M essage P rotocol ICMP messages are IP packets Used by network hosts to announce Network errors Network congestion Network timeouts Not used directly by user except ICMP Echo Request/Reply messages used in Ping Traceroute 2

ICMP HEADER ICMP Header starts after IP Header ICMP packet Bit 0 - 7Bit Bit Bit IP Header IP Header (20 bytes) Version/IHLType of serviceLength Identification flags and offset Time To Live (TTL) ProtocolChecksum Source IP address Destination IP address ICMP Payload (8+ bytes) Type of message CodeChecksum Quench Data ( optional ) From: 3

PING What ping is used for? Checks if target host is alive Troubleshoot network connectivity problems Check RTT ICMP Echo Request 64 byte packet Host replies with ICMP Echo Reply 4

ECHO REQUEST The echo request is an ICMP message whose data is expected to be received back in an echo reply ("ping"). The host must respond to all echo requests with an echo reply containing the exact data received in the request message. The Identifier and Sequence Number can be used by the client to match the reply with the request that caused the reply. The data received by the Echo Request must be entirely included in the Echo Reply Type = 8Code = 0Header Checksum IdentifierSequence Number Data ::: From: 5

PING EXAMPLE $ ping -c 3 PING web1.cpsc.ucalgary.ca ( ) 56(84) bytes of data. 64 bytes from www ( ): icmp_seq=1 ttl=64 time=0.182 ms 64 bytes from www ( ): icmp_seq=2 ttl=64 time=0.220 ms 64 bytes from www ( ): icmp_seq=3 ttl=64 time=0.146 ms --- web1.cpsc.ucalgary.ca ping statistics packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.146/0.182/0.220/0.034 ms $ 6

PING: CHANGE PACKET SIZE $ ping -c 3 -s PING web1.cpsc.ucalgary.ca ( ) 100(128) bytes of data. 108 bytes from www ( ): icmp_seq=1 ttl=64 time=0.161 ms 108 bytes from www ( ): icmp_seq=2 ttl=64 time=0.249 ms 108 bytes from www ( ): icmp_seq=3 ttl=64 time=0.172 ms --- web1.cpsc.ucalgary.ca ping statistics packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.161/0.194/0.249/0.039 ms Why does it send (128) bytes? Why does it receive 108 bytes back? 7

PING: BROADCAST $ ping -c 2 -b WARNING: pinging broadcast address PING ( ) 56(84) bytes of data. 64 bytes from : icmp_seq=1 ttl=64 time=0.159 ms 64 bytes from : icmp_seq=1 ttl=64 time=0.166 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.169 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.171 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.174 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=255 time=0.259 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.263 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.266 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.268 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.270 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=255 time=0.272 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=255 time=0.275 ms (DUP!) 64 bytes from : icmp_seq=1 ttl=64 time=0.310 ms (DUP!) 64 bytes from : icmp_seq=2 ttl=64 time=0.149 ms ping statistics packets transmitted, 2 received, +12 duplicates, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.149/0.226/0.310/0.057 ms 8

SOME OTHER PING OPTIONS -p pattern: You may specify up to 16 bytes to fill out the packet you send. This is useful for diagnosing data-dependent problems in a network. For example, -p ff will cause the sent packet to be filled with all ones. -i interval: Wait interval seconds between sending each packet. The default is to wait for one second between each packet normally, or not to wait in flood mode. Only super-user may set interval to values less 0.2 seconds. -t ttl: Set the IP Time to Live. -w deadline: Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network. -W timeout: Time to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping waits for two RTTs. 9

DIFFERENT PING UTILITIES The ping page, a wealth of information regarding the Ping utility: E.g., echoping, libping, netping (anti-smurf tool), webping, arping, fping, hping2, sping, xping, pingirva, pingx, Gping, Kping, IPing, Sing, etc. Example of a ping program that produces monitoring stats for hosts: Smokeping 10

TRACEROUTE Finds the route that a packet would go across the network to reach a host. Command line tools: $ traceroute host $ tracepath host > tracert host (Windows) Uses TTL (Time To Live, 8 bit field in IP header) Specifies the time a packet is allowed to “live” in the network At each hop, router or host decrements TTL value of packet by 1 When TTL = 1 Packet discarded “ICMP Time Exceeded” error datagram sent back to source host 11

HOW DOES TRACEROUTE WORK? Sends out a batch of packets First three packets have TTL = 1 Second three packets have TTL = 2 and so on…. Each host along the way sees packet with TTL = 1 Sends ICMP Time Exceeded packet Source host uses these messages to build list of all hosts in the route 12

TRACEROUTE EXAMPLE $ traceroute traceroute to ( ), 30 hops max, 60 byte packets 1 fivegate ( ) ms ms ms 2 * * * 3 campus.cpsc.ucalgary.ca ( ) ms ms ms 4 pc187.hidden.ucalgary.ca ( ) ms ms ms ( ) ms ms ms 6 h bigpipeinc.com ( ) ms ms ms 7 ra2so-ge cg.bigpipeinc.com ( ) ms ms ms 8 rx0so-city-of-calgary.cg.bigpipeinc.com ( ) ms ms ms 9 rx0so-city-of-calgary.cg.bigpipeinc.com ( ) ms !X * * $ 13

RESOURCES Wikipedia entry on ping: Wikipedia’s entry on traceroute: The ping page, a wealth of information regarding the Ping utility: Wikipedia’s entry on ICMP: 14