25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 3-38 ICMP: Address Mask Request <strong>and</strong> Reply<br />

3.2.2 ICMP applications<br />

0 8 16 31<br />

identifier sequence number<br />

subnet address mask<br />

There are two simple <strong>and</strong> widely used applications based on ICMP: Ping <strong>and</strong><br />

Traceroute. Ping uses the ICMP Echo <strong>and</strong> Echo Reply messages to determine<br />

whether a host is reachable. Traceroute sends <strong>IP</strong> datagrams with low TTL values<br />

so that they expire en route to a destination. It uses the resulting ICMP Time<br />

Exceeded messages to determine where in the internet the datagrams expired<br />

<strong>and</strong> pieces together a view of the route to a host. We discuss these applications<br />

in the following sections.<br />

Ping<br />

Ping is the simplest of all <strong>TCP</strong>/<strong>IP</strong> applications. It sends <strong>IP</strong> datagrams to a<br />

specified destination host <strong>and</strong> measures the round trip time to receive a<br />

response. The word ping, which is used as a noun <strong>and</strong> a verb, is taken from the<br />

sonar operation to locate an underwater object. It is also an abbreviation for<br />

Packet InterNet Groper.<br />

Generally, the first test of reachability for a host is to attempt to ping it. If you can<br />

successfully ping a host, other applications such as Telnet or FTP should be able<br />

to reach that host. However with the advent of security measures on the Internet,<br />

particularly firewalls (see 22.3, “Firewalls” on page 794), which control access to<br />

networks by application protocol or port number, or both, this is no longer<br />

necessarily true. The ICMP protocol can be restricted on the firewall <strong>and</strong><br />

therefore the host is unable to be successfully pinged.<br />

The syntax that is used in different implementations of ping varies from platform<br />

to platform. A common format for using the ping comm<strong>and</strong> is:<br />

ping host<br />

Where host is the destination, either a symbolic name or an <strong>IP</strong> address.<br />

Most platforms allow you to specify the following values:<br />

Size The size of the data portion of the packet.<br />

Packets The number of packets to send.<br />

Count The number of echo requests to send.<br />

Chapter 3. Internetworking protocols 117

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!