0% found this document useful (0 votes)
53 views5 pages

Experiment 2 Addition

This document discusses using the ping and traceroute commands to test TCP/IP network connectivity. Ping sends ICMP echo requests to verify connectivity to a destination, while traceroute shows network hops and latency. The document provides examples using ping to check local connectivity and traceroute to identify problems between devices. Optional parameters for ping and traceroute are also demonstrated to modify behavior, such as continuous pinging or recording router hops.

Uploaded by

Just Someone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views5 pages

Experiment 2 Addition

This document discusses using the ping and traceroute commands to test TCP/IP network connectivity. Ping sends ICMP echo requests to verify connectivity to a destination, while traceroute shows network hops and latency. The document provides examples using ping to check local connectivity and traceroute to identify problems between devices. Optional parameters for ping and traceroute are also demonstrated to modify behavior, such as continuous pinging or recording router hops.

Uploaded by

Just Someone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Computer Engineering Computer Network Lab.

Fourth Class

Experiment (3)
Ping and Traceroute
Objective

Upon completion of this lab, you will be able to:


• Use the ping command to verify simple TCP/IP network connectivity.
• Use the tracert/traceroute command to verify TCP/IP connectivity.
Background

Two tools that are indispensable when testing TCP/IP network connectivity are
ping and tracert. The ping utility is available on Windows, Linux, and Cisco IOS, and
tests network connectivity. The tracert utility is available on Windows, and a similar
utility, traceroute, is available on Linux and Cisco IOS. In addition to testing for
connectivity, tracert can be used to check for network latency.
For example, when a web browser fails to connect to a web server, the problem can be
anywhere between client and the server. A network engineer may use the ping
command to test for local network connectivity or connections where there are few
devices. In a complex network, the tracert command would be used. Where to begin
connectivity tests has been the subject of much debate; it usually depends on the
experience of the network engineer and familiarity with the network.
The Internet Control Message Protocol (ICMP) is used by both ping and tracert to
send messages between devices. ICMP is a TCP/IP Network layer protocol, first
defined in RFC 792, September, 1981.
The experiment

In this lab, the ping and tracert commands will be examined, and command
options will be used to modify the command behavior.
Task 1: Use the ping Command to Verify Simple TCP/IP Network Connectivity.
The ping command is used to verify TCP/IP Network layer connectivity on the
local host computer or another device in the network. The command can be used with
a destination IP address or qualified name, such as eagle-server.example.com, to test
domain name services (DNS) functionality. For this lab, only IP addresses will be
used.
The ping operation is straightforward. The source computer sends an ICMP
echo request to the destination. The destination responds with an echo reply. If there is
a break between the source and destination, a router may respond with an ICMP
message that the host is unknown or the destination network is unknown.
1
Dr. Hiba Hakim Dr. Abbas A. Jasim
Computer Engineering Computer Network Lab. Fourth Class

#Verify TCP/IP Network layer connectivity on the local host computer.


C:\> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 172.16.1.2
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . : 172.16.255.254

-Use the ping command to verify TCP/IP Network layer connectivity on the local host
computer. By default, four ping requests are sent to the destination and reply
information is received. Output should look similar to that shown below:

(1) Destination address, set to the IP address for the local computer.
(2) Reply information:
bytes—size of the ICMP packet.
time—elapsed time between transmission and reply.
TTL—default TTL value of the DESTINATION device, minus the number of routers in
the path. The maximum TTL value is 255, and for newer Windows machines the default
value is 128.
(3) Summary information about the replies:
(4) Packets Sent—number of packets transmitted. By default, four packets are
sent.
(5) Packets Received—number of packets received.
(6) Packets Lost —difference between number of packets sent and received.

2
Dr. Hiba Hakim Dr. Abbas A. Jasim
Computer Engineering Computer Network Lab. Fourth Class

(7) Information about the delay in replies, measured in milliseconds. Lower round
trip times indicate faster links. A computer timer is set to 10 milliseconds. Values
faster than 10 milliseconds will display 0.
C:\ > ping 192.168.254.254
Pinging 192.168.254.254 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.254.254:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

The ping command is extremely useful when troubleshooting network


connectivity. However, there are limitations. In the figure above, the output shows that
a user cannot reach IP 192.168.254.254. Is the problem with IP 192.168.254.254 or a
device in the path? The tracert command, examined next, can display network latency
and path information.

Task 2: Use the tracert Command to Verify TCP/IP Connectivity.

The tracert command is useful for learning about network latency and path
information. Instead of using the ping command to test connectivity of each device to
the destination, one by one, the tracert command can be used.
On Linux and Cisco IOS devices, the equivalent command is traceroute.
# Verify TCP/IP Network layer connectivity with the tracert command.
Open a Windows terminal and issue the following command:
C:\> tracert 192.168.254.254
Tracing route to 192.168.254.254 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 172.16.255.254
2 <1 ms <1 ms <1 ms 10.10.10.6
3 <1 ms <1 ms <1 ms 192.168.254.254
Trace complete.

If there is a loss of connectivity to an end device such as IP 192.168.254.254,


the tracert command can give valuable clues as to the source of the problem. The ping
command would show the failure but not any other kind of information about the
devices in the path.
Options are used with the tracert command to reduce wait time (in milliseconds), -w
5, and maximum hop count, -h 4.
C:\> tracert -w 5 -h 4 192.168.254.254

Task 3: Challenge

3
Dr. Hiba Hakim Dr. Abbas A. Jasim
Computer Engineering Computer Network Lab. Fourth Class

The default values for the ping command normally work for most
troubleshooting scenarios. There are times, however, when fine tuning ping options
may be useful. Issuing the ping command without any destination address will display
the options shown below:
C:\> ping
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] target_name
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-
Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each
reply.

The most useful options are highlighted in yellow. Some options do not work
together, such as the –t and –n options. Other options can be used together.
Experiment with the following options:
-To ping the destination address until stopped, use the –t option. To stop, press
CTRL> C:
C:\> ping –t 192.168.254.254
Pinging 192.168.254.254 with 32 bytes of data:
Reply from 192.168.254.254: bytes=32 time<1ms TTL=63
Reply from 192.168.254.254: bytes=32 time<1ms TTL=63
Reply from 192.168.254.254: bytes=32 time<1ms TTL=63
Reply from 192.168.254.254: bytes=32 time<1ms TTL=63
Reply from 192.168.254.254: bytes=32 time<1ms TTL=63
Reply from 192.168.254.254: bytes=32 time<1ms TTL=63
Ping statistics for 192.168.254.254:
Packets: Sent = 6, Received = 6, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\>

4
Dr. Hiba Hakim Dr. Abbas A. Jasim
Computer Engineering Computer Network Lab. Fourth Class

-To ping the destination once, and record router hops, use the –n and –r options, as
shown below:
Note: Not all devices will honor the –r option.
C:\> ping -n 1 –r 9 192.168.254.254
Pinging 192.168.254.254 with 32 bytes of data:
Reply from 192.168.254.254: bytes=32 time=1ms TTL=63
Route: 10.10.10.5 ->
192.168.254.253 ->
192.168.254.254 ->
10.10.10.6 ->
172.16.255.254
Ping statistics for 192.168.254.254:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
C:\>

Both ping and tracert are used by network engineers to test network
connectivity. For basic network connectivity, the ping command works best. To test
latency and the network path, the tracert command is preferred.

5
Dr. Hiba Hakim Dr. Abbas A. Jasim

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy