Understanding PING Command

Rashmi Bhardwaj | Blog,Config & Troubleshoot
Advertisements

Broadcast and Network PING Command

There may be a need to view all IPs in a particular subnet of Cisco Router. This simple command will send query to Network ID or Broadcast ID of the Subnet and get response from all the live IPs in the subnet. Below example will help understand how pinging the broadcast and network ID gives us output on available IPs in the subnet.

 

Usage of Ping Command

R1 is connected to 2 LAN segments 192.168.0.0/24 and 192.168.1.0/24.
Lets see the output of ping command –

R1#ping 192.168.0.0 rep 1
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 192.168.0.0, timeout is 2 seconds:

Reply to request 0 from 192.168.0.5, 68 ms
Reply to request 0 from 192.168.0.2, 68 ms
Reply to request 0 from 192.168.0.3, 68 ms
Reply to request 0 from 192.168.0.6, 68 ms
Reply to request 0 from 192.168.0.4, 68 ms

As shown above, when we ping network ID, all the hosts present in the network will reply toICMP query and hence their reply is shown in the above scenario.

Advertisements

Another option is to ping broadcast address of the subnet as below

R1#ping 192.168.0.255 rep 1
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 192.168.0.255, timeout is 2 seconds:

Reply to request 0 from 192.168.0.5, 72 ms
Reply to request 0 from 192.168.0.2, 76 ms
Reply to request 0 from 192.168.0.6, 76 ms
Reply to request 0 from 192.168.0.3, 72 ms
Reply to request 0 from 192.168.0.4, 72 ms

Above scenario showed how we can get reply from the subnet by pinging its network address or broadcast address.

Additionally, below command will provide the response from all the alive IPs in all the connected subnets of Router R1

R1#ping 255.255.255.255 rep 1
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds: Reply to request 0 from 192.168.0.2, 64 ms
Reply to request 0 from 192.168.0.6, 68 ms
Reply to request 0 from 192.168.1.8, 68 ms
Reply to request 0 from 192.168.1.7, 68 ms
Reply to request 0 from 192.168.0.5, 68 ms
Reply to request 0 from 192.168.0.3, 68 ms
Reply to request 0 from 192.168.0.4, 68 ms
R1#

Continue Reading:

Meaning of Ping Response for IPv4 Address

TCL Ping Script

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart