- When troubleshooting network connectivity.
The next step after verifying IP information
with IP Config is to use the Ping Utility.
If a client is having trouble getting out to the internet
or just on the network, our first ping it's default gateway.
From the Command Line, I simply type ping
and the IP address of the default gateway,
192.168.51.1.
By default, it will issue four pings
and uses 32 bytes per ping, reporting the latency
of each ping measured in milliseconds.
This is also known
as the round trip time, since it measures how
long it takes the packet to reach the destination
and then return.
When the four pings are complete, statistics
like how many packets were sent
and how many returned as well as the minimum maximum
and average latency for the packets are displayed.
Sometimes four pings isn't enough to
troubleshoot intermittent connectivity issues.
To persistently ping a host, all type ping -t
and type IP address, 192.168.51.1,
it will continuously ping showing latency impossible packet
loss. To end the stream all type Ctrl + C,
the CLI will spell out complete statistics
on all the ping sent.
Say I wanted to ping a host a number
of times between four and infinity, ping -n allows me
to specify a total number of pings to be sent.
Be it 5, 30 or 100. 192.168.51.1.
To ping an IP, and resolve it to a DNS name.
I can type ping -a and the host to resolve gregsowell.com.
The CLI will attempt to resolve the address
and continue on ping host.
I can also adjust the size of the packets being sent
by typing ping -l and the number I'd like it to be.
This case, I'll say 1,550 192.168.51.1.
This can be especially useful when
troubleshooting maximum transmission unit issues.
The next go-to tool is trace route.
In windows, the utility is called trace rt.
Trace route uses ICNP packets
to map out the path to a destination host.
For my first trace, I can type in tracert gregsowell.com,
which has resolved through DNS to 104, 21, 16, 186.
As it hops through, I may occasionally see an ashtray.
This means a packet was lost.
If a hop responds with all asterix,
this likely means it is blocking ICNP.
It could also mean that the device is having severe issues.
On the left.
I see the hop count, go up as the packets, head
towards the destination, the amount of latency, IP address
and DNS name of each hop is also listed.
Once the destination has been reached
the CLI prints a trace complete message, or it will count up
to the default 30 hops and say complete.
A hop with erratic latency might be indicative
of an issue or now add the -d flat.
Tracert -d gregsowell.com.
This tells trace route
to skip resolving the names of each hop.
This can speed up the trace,
since the client isn't waiting to resolve addresses.
I'll stop the process with Ctrl + C.
The -h option,
lets me change the default max number of hops.
The last tool is path ping, path ping
and then the IP address
in question 192.168.88.1.
This marries the attributes of both ping and trace route.
It will do a trace route, then ping each hop for 25 seconds.
This attempts to give better statistics
than either a trace route or ping alone.
It provides the roundtrip time
as well as the packet loss along the way.
It has many of the tracert options like -h
for max number of hops and -n to not resolve DNS names.
I can also specify -q to adjust the number
of times it pings each hops.
I can specify -q to adjust the number
of times it pings each hop.
The default is 100.
All of these tools used in combination
especially ping and trace route
are central to troubleshooting network connectivity issues.