A nifty way to discover what IP addresses are used and responding to ping is to ping the broadcast address of a subnet on a Cisco router that the subnet is directly attached to.
To ping a broadcast address it’s just the same as any other old ping command you just ping that magic last address of the subnet, the broadcast address. So to ping the broadcast address of the network 10.10.10.0/24 you would ping the following:
ping 10.10.10.255
The IOS displays what addresses respond to ping like this.
Router#ping 10.10.10.255
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.255, timeout is 2 seconds:
Reply to request 0 from 10.10.10.62, 1 ms
Reply to request 0 from 10.10.10.55, 4 ms
Reply to request 0 from 10.10.10.53, 4 ms
Reply to request 0 from 10.10.10.25, 4 ms
Reply to request 0 from 10.10.10.124, 4 ms
Reply to request 0 from 10.10.10.22, 4 ms
Reply to request 0 from 10.10.10.24, 4 ms
Reply to request 0 from 10.10.10.54, 4 ms
Reply to request 0 from 10.10.10.51, 4 ms
Reply to request 1 from 10.10.10.55, 4 ms
Reply to request 1 from 10.10.10.53, 8 ms
Reply to request 1 from 10.10.10.22, 4 ms
Reply to request 1 from 10.10.10.25, 4 ms
Reply to request 1 from 10.10.10.124, 4 ms
Reply to request 1 from 10.10.10.24, 4 ms
Reply to request 1 from 10.10.10.54, 4 ms
Reply to request 1 from 10.10.10.62, 4 ms
Reply to request 1 from 10.10.10.51, 4 ms
This also creates an entry in the ARP cache of the router so you have the MAC to IP mapping of each device on the subnet which can help you identify what a particular device is.
Doing this from the router allows you to ping multiple subnets broadcast addresses if you have multiple subnets/VLANs on your network such as a data and a voice VLAN for example.
In the past I’ve used port scanners to discover what addresses are used but if you do this from a device not directly attached to the network you are pinging it can sometimes not give you the results you require if some devices do not have a default gateway configured so doing this from the router ensures you get every IP that is being used.
Port scanners also have to be loaded onto a computer on the network and this takes time. Having this built in ping sweep feature is definitely handy – USE IT.