ping broadcast doesn't yield reply from all alive hosts on my subnet??
hi all,
i was trying to ping the broadcast address of my subnet n this is the output: Code:
[root@vijay ~]# ping -b 172.31.83.255 this differs from nmap's ping sweep output on my subnet.. here's my ifconfig and routing table: Code:
[root@vijay ~]# ifconfig eth0 thnx in advance.. |
RFC 1122:
3.2.2.6 Echo Request/Reply: RFC-792 Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies. A host SHOULD also implement an application-layer interface for sending an Echo Request and receiving an Echo Reply, for diagnostic purposes. An ICMP Echo Request destined to an IP broadcast or IP multicast address MAY be silently discarded. From linux source: Quote:
Code:
sudo sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=0 http://www.faqs.org/rfcs/rfc1812.html http://en.wikipedia.org/wiki/Broadca...%28networks%29 http://en.wikipedia.org/wiki/Broadcast_address http://en.wikipedia.org/wiki/Broadcast_storm |
thnx sir.. this has cleared my doubt..
i have toggled that "sysctl_icmp_echo_ignore_broadcasts" and now the same ping broadcast yeilded reply from another host i.e myself now its clear to me sir.. thanx a lot sir.. |
Good!
Actually what happens is this (if I'm not mistaken, I can not check on my LAN) The ping goes from host A to the host B but this host B doesn't reply. Meanwhile, when A wanted to send a packet to B, it needs its ARP address. So simply sending the broadcast ping and displaying the arp cache would have been sufficient: 1)empty the arp cache you get the cache like this: /usr/sbin/arp -a you remove the lines one by one: sudo arp -d <host1> ... 2)ping -b 192.168.1.255 3)display the arp cache, the ones which are not 'incomplete' are alive (or there is a proxy arp inbetween, not very common these days) /usr/sbin/arp -an (n for numerical only, better) |
All times are GMT -5. The time now is 02:30 PM. |