Results 1 to 3 of 3
I going through a howto on ip networking. One of the basic tasks seems to be mapping a network using ping and the broadcast function on the system. I have ...
- 07-15-2008 #1Just Joined!
- Join Date
- Jul 2008
- Posts
- 11
Network mapping
I going through a howto on ip networking. One of the basic tasks seems to be mapping a network using ping and the broadcast function on the system. I have tried to do this several hundred times making adjustments to the two computers I am using my home lab. At this point I will probably need to reboot both systems to get them back to where they will function on the network again. I am trying to learn, so bare with me.
When I ping the network, I am using ping -c 1 -b 192.168.0.255, I get:
ping -c 5 -b 192.168.0.255
WARNING: pinging broadcast address
PING 192.168.0.255 (192.168.0.255) 56(84) bytes of data.
--- 192.168.0.255 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4001ms
When I use ping -c 5 -b 192.168.0254, I get:
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
From 192.168.0.110: icmp_seq=1 Destination Host Unreachable
From 192.168.0.110 icmp_seq=1 Destination Host Unreachable
From 192.168.0.110 icmp_seq=2 Destination Host Unreachable
From 192.168.0.110 icmp_seq=3 Destination Host Unreachable
From 192.168.0.110 icmp_seq=4 Destination Host Unreachable
From 192.168.0.110 icmp_seq=5 Destination Host Unreachable
--- 192.168.0.254 ping statistics ---
5 packets transmitted, 0 received, +6 errors, 100% packet loss, time 4026ms
This suggests I do not have a route to the network, but when I use the ip utility "ip route list," I get:
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.110
169.254.0.0/16 dev eth0 scope link
127.0.0.0/8 dev lo scope link
Which seems to suggest there is a route to the network.
Can give me a little guidance on this?
- 07-21-2008 #2Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
It's not too uncommon for computers to ignore pings to the broadcast address. On a network with an Ubuntu box, a WinXP SP2 box and an openWRT based router, I get no responses from a broadcast ping.
In Ubuntu at least, this is easy enough to play with.
If you are looking to map a network, I would suggest you take a look at nmap. It wont magically fix broadcast pings, but it will happily flood the network with pings to every available address and report who talks back. Less neat, but more reliable.Code:root@angua:/proc/sys/net/ipv4# cat icmp_echo_ignore_broadcasts 1 root@angua:/proc/sys/net/ipv4# ping -c 1 -b 192.168.1.255 WARNING: pinging broadcast address PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data. --- 192.168.1.255 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms root@angua:/proc/sys/net/ipv4# echo 0 > icmp_echo_ignore_broadcasts root@angua:/proc/sys/net/ipv4# ping -c 1 -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.5: icmp_seq=1 ttl=64 time=0.080 ms --- 192.168.1.255 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.080/0.080/0.080/0.000 ms
Let us know how you get on,
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.
- 07-21-2008 #3Just Joined!
- Join Date
- Jul 2008
- Posts
- 11
network mapping
I want to thank everyone for the help. I found, as was suggested, Suse has all broadcast replies turned off in /etc/sysctl.conf with the following line.
net.ipv4.icmp_echo_ignore_broadcasts = 1
Changing the one to zero allowed a reply to a broadcast ping.
I have begun to use the nmap utility but I am still just a novice and as such need to learn some of the more basic methods for background purposes.
Again thank you all.


Reply With Quote