2

Just wondering in case I ever have a want / need to see all the hosts on my subnet.

  • The meta site is for questions about the Q&A site itself, not for questions that belong on the Q&A site, such as this question. – Ron Maupin Nov 19 '19 at 14:55
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 15 '19 at 20:29
3

This is mostly a host implementation question. If the host populates its ARP cache from received packets, then it will learn the MAC of everything that answers. It should also be noted not all hosts will answer an ICMP echo request to a multicast address, and even fewer will answer the all-nodes multicast address. (for obvious security reasons)

| improve this answer | |
2

Will pinging the multicast “all hosts” IP 224.0.0.1 fill my ARP cache with all hosts on my current subnet?

By the ARP standard, ARP tables are supposed to only be updated by ARP, but ping uses ICMP, not ARP. Pinging a unicast address may cause an ARP request to be sent, and a corresponding ARP reply that populates the ARP table, before the ICMP Echo request is sent, but sending an ICMP Echo request (as ping does) to a group address will not use ARP to request all the MAC addresses of all the hosts in the group.

Having said that, it is possible that the responding hosts may need to use ARP requests to find the MAC address to which they respond, and should populate the ARP table because they are ARP packets. If a target host already has the destination of the reply in its ARP table, it will not send an ARP request to the host sending the ping, so the ARP table will not be updated.

You simply cannot guarantee that you will get your ARP table updated by all hosts on the LAN, even from those that may reply.

| improve this answer | |
1

I'm not sure if you're using Cisco equipment, and this doesn't really answer your question about hitting the multicast IP address, but your goal of seeing each host in a subnet is something I do frequently in the various environments I manage, to the point of making TCL scripts to do a ping sweep followed by an ARP table output. If you'd like to try the same, here are samples of my scripts (one for IOS and another for NX-OS - there is really only a one word difference between the two).

------ BEGIN NX-OS TCL SCRIPT ------
tclsh
for {set i 1} {$i <= 254} {incr i} {
set var 192.168.218.
append var $i
exec "ping $var count 1 timeout 0"}
tclquit

sh ip arp | in 192.168.218.
----- END NX-OS TCL SCRIPT ------

------ BEGIN IOS TCL SCRIPT ------
tclsh
for {set i 1} {$i <= 254} {incr i} {
set var 192.168.218.
append var $i
exec "ping $var repeat 1 timeout 0"}
tclquit

sh ip arp | in 192.168.218.
----- END IOS TCL SCRIPT ------
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.