Looks like the same topic was started also in JUNOS section, so I'm posting my solution here as well for people who do not follow JUNOS section of this forum.
=======================
You can try the following shell one-liner to ping all IP addresses in the subnet - even if remote device doesn't respond to ping, you should see an ARP entry for the remote IP address afterwards. In this example, our IP address is 10.1.6.1/24, and we're pinging 10.1.6.2 - 254:
start shell sh
src="10.1.6.1"; i=2; while [ $i -lt 255 ]; do cli -c "ping 10.1.6.$i rapid count 2 source $src"; sleep 1; i=$((i+1)); done;
You can also try to run it directly from CLI (supported in recent JUNOS versions):
start shell sh command "src=\"10.1.6.1\"; i=2; while [ $i -lt 255 ]; do cli -c \"ping 10.1.6.$i rapid count 2 source $src\"; i=$((i+1)); sleep 1; done"
=======================
As for the suggeted method of pinging .255 address, some Linux boxes do not respond to such pings. In my lab I have a Centos box connected to MX, which ignores such packets (didn't check other OS though):
root@mx1> clear arp interface ge-0/0/2
10.1.6.30 deleted
root@mx1> monitor traffic interface ge-0/0/2.0 no-resolve
verbose output suppressed, use <detail> or <extensive> for full protocol decode
Address resolution is OFF.
Listening on ge-0/0/2.0, capture size 96 bytes
15:26:46.297164 Out IP truncated-ip - 24 bytes missing! 10.1.6.1 > 10.1.6.255: ICMP echo request, id 4519, seq 0, length 64
15:26:47.298044 Out IP truncated-ip - 24 bytes missing! 10.1.6.1 > 10.1.6.255: ICMP echo request, id 4519, seq 1, length 64
15:26:48.298401 Out IP truncated-ip - 24 bytes missing! 10.1.6.1 > 10.1.6.255: ICMP echo request, id 4519, seq 2, length 64
15:26:49.298715 Out IP truncated-ip - 24 bytes missing! 10.1.6.1 > 10.1.6.255: ICMP echo request, id 4519, seq 3, length 64
^C
4 packets received by filter
0 packets dropped by kernel
root@mx1> show arp | match ge-0/0/2
root@mx1>
However, unicast ping works just fine:
root@mx1> show arp | match ge-0/0/2
root@mx1> monitor traffic interface ge-0/0/2.0 no-resolve
verbose output suppressed, use <detail> or <extensive> for full protocol decode
Address resolution is OFF.
Listening on ge-0/0/2.0, capture size 96 bytes
15:27:03.027203 Out arp who-has 10.1.6.30 tell 10.1.6.1
15:27:03.029711 In arp reply 10.1.6.30 is-at 56:68:a3:16:00:a9
15:27:03.029729 Out IP truncated-ip - 24 bytes missing! 10.1.6.1 > 10.1.6.30: ICMP echo request, id 8103, seq 0, length 64
15:27:03.031543 In IP 10.1.6.30 > 10.1.6.1: ICMP echo reply, id 8103, seq 0, length 64
HTH
Best regards,
Sergii
-------------------------------------------------------------------
Please accept the solution if your problem is resolved
-------------------------------------------------------------------