0

I'm connected to a network switch directly. When I'm running ping -b 172.20.0.255 command, where 172.20.0.255 is my broadcast address, I'm getting the list of IPs iteratively:

64 bytes from 172.20.0.31: icmp_seq=17 ttl=64 time=0.543 ms
64 bytes from 172.20.0.29: icmp_seq=17 ttl=64 time=0.562 ms (DUP!)
64 bytes from 172.20.0.16: icmp_seq=17 ttl=64 time=0.565 ms (DUP!)
64 bytes from 172.20.0.28: icmp_seq=17 ttl=255 time=1.63 ms (DUP!)
64 bytes from 172.20.0.30: icmp_seq=17 ttl=255 time=1.96 ms (DUP!)

Apart from these, there are many other hosts also in the network, but why it is displaying only these IPs?

What should be the expected output of this command? Which IP should I get?

1 Answer 1

1

It really depends on the other hosts of your network. Depending on the configuration of your switch it can be blocking broadcast ping and be the only one to answer. Also some nodes might be configured not to answer to broadcast ping.

It's a really contextual question

You can find more various information in this question : https://superuser.com/questions/339863/why-doesnt-broadcast-ping-work

4
  • Is there a way so that only my switch respond back and no other IP?
    – Amit24x7
    Jul 6, 2017 at 16:17
  • you have to look at the switch configuration, and set something like block/authorise broadcast ping forwarding
    – M4rty
    Jul 6, 2017 at 16:20
  • The above command worked fine in most of the situations. However, in one environment, we have five different switches linked to each other and have same IP range of 172.20.0.x where this command is giving IPs of all the five switches. I can't know to which switch I'm actually connected.
    – Amit24x7
    Jul 6, 2017 at 16:26
  • Interestingly, when I logged into the switches, my NIC mac address is listed in all the five switches in the client list. I'm not getting how is this even possible.
    – Amit24x7
    Jul 6, 2017 at 16:27

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.