3

Iam using linux.I read somewhere in the internet that pinging the 255.255.255.255 will ping everyone in the network segment. And it will return every ip addresses in that subnet. but when i tried

ashokkrishna@ashokkrishna-Lenovo-B560:~$ ping -b 255.255.255.255
WARNING: pinging broadcast address
PING 255.255.255.255 (255.255.255.255) 56(84) bytes of data.
64 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=100 ms
64 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=100 ms (DUP!)
64 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=128 ms
64 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=130 ms (DUP!)

I am only getting the reply from only one ip. how to get every ip, I know how to get every ip with nmap but what I read in the internet is totally opposite in my senario why?

same with

ashokkrishna@ashokkrishna-Lenovo-B560:~$ ping -b 192.168.1.255
WARNING: pinging broadcast address
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
64 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=55.2 ms
64 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=66.6 ms (DUP!)
64 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=78.5 ms
64 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=79.2 ms (DUP!)
3
  • Interesting note: Windows won't ping that address. – Todd Wilcox Jul 10 '15 at 20:23
  • superuser.com/questions/717627/unable-to-ping-broadcast-address might be helpful. As Ricky mentioned below, the times of machines responding to broadcasts are long gone. nmap might be a better way to scan the network with unicast pings. However, if you want to test the broadcasts, try it on routers on the same broadcast segment. – surya Mar 20 '18 at 5:21
  • I find it odd that you are getting duplicate echo replies. This would indicate a problem on your network of some sort. – YLearn Mar 20 '18 at 8:17
11

Not all machines will answer a broadcast ping. (all broadcast -- 255.255.255.255, or subnet broadcast -- eg. x.x.x.255) Some see it as a "security feature", because one could spoof the origin to flood any host on the network.

3
  • then above link is saying i could do that. – ashok Jul 11 '15 at 7:47
  • 4
    I cannot say it any clearer than the first sentence. There is ZERO certainty that every machine in the broadcast domain will answer. I KNOW, from decades of experience, every machine won't. – Ricky Jul 11 '15 at 8:54
1

Many modern OS are now disabling response to the broadcast. They ignore them to avoid security issues.

If you're using linux, check your system with sysctl net.ipv4.icmp_echo_ignore_broadcasts, it may show 1. You won't receive any packets from other machines since other machines may also have similar settings.

Try arp instead of icmp to reach out to the machines.

1

Try this on all the machines of your network to receive packets from them when pinging the broadcast address

sudo sysctl net.ipv4.icmp_echo_ignore_broadcasts=0
-1

Why do you use the bounds option (-b) ?

Try without this option, it should work unless your router blocks the broadcasted ping requests.

1
  • 3
    '-b' means the address is a broadcast address: -b Allow pinging a broadcast address. – Ricky Jul 11 '15 at 1:52
-1

Try pinging 224.0.0.1 it will be replied by all nodes.

1
  • Welcome to NE, we hope you will both contribute to and learn from this community. You could improve your answer by editing it to add more details to make it more useful both for the original poster and future users. Typically short answers like this could provide reasoning why you believe this is the answer, more explanation about the concepts mentioned, references/links to supporting resources, or applicable examples. In any event, this is simply not a true statement as it stands. Not all hosts (or networks) will accept or respond to multicast traffic. – YLearn Mar 20 '18 at 3:22

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.