Using ping
The ping utility is my best friend. It is one of the handiest tools in
my networking virtual tool- box. I use ping all the time to test
connectivity between hosts through the network. Ping works by sending
an ICMP echo request packet from the source system to the destination
system. The destination system then responds with an ICMP echo
response packet. This process is shown in Figure 15-13.
If the ICMP echo response packet is received by the sending system,
you know three things:
• Your network interface is working correctly.
• The destination system is up and working correctly.
• The network hardware between your system and the destination system
is working correctly.
NOTE
Be warned that many host-based firewalls used by many operating
systems are configured by default to not respond to ICMP echo request
packets. This is done to prevent a variety of denial of service (DoS)
attacks that utilize a flood of ping requests. This configuration can
give the false impression that the destination system is down. It’s actually
up and running just fine; it’s just that the firewall on the host is stopping
the ping packets from reaching the operating system.
That is valuable information to know! The basic syntax for using ping
is ping destination_ IP_address. This causes ICMP echo request packets
to be sent to the specified host. For example, you could enter ping
192.168.2.1 to ping a host with this address. This is shown in Figure
15-14.
Notice in Figure 15-14 that the results of each ping sent are shown on
a single line. Each line displays the size of the echo response packet
(64 bytes), who it came from (192.168.2.1), its time- to-live value
(63), and the round-trip time (4.25 ms to 1.01 ms).
NOTE
The time-to-live (TTL) value specifies the number of routers the
packet is allowed to cross before being thrown away.
By default, the ping utility will continue sending ping requests to
the specified host until you press
ctrl-c
to stop it. You can use the –c option with the ping command to specify a number of times to ping.
For example, you can enter
ping –c 10 192.168.2.1
to ping ten times and then exit.
You can also
ping hostname
instead of IP address. As long as you’ve configured your system with a valid DNS server address, ping will resolve the hostname into an IP address and send ping requests to it.
This is shown in Figure 15-15.
Pinging with a hostname can be a valuable troubleshooting tool. It
lets you know if there is a problem with the DNS server. For example,
if pinging by IP address works but pinging by host- name does not
work, then you know that your basic network configuration and
connectivity is working properly but there is a problem with the DNS
server.
You can also test IPv6 communications using ping as well. However, you
must use the
ping6
command instead of ping.
LX0-104 Exam Objectives (T)
No comments:
Post a Comment