Thanks for the replies guys.
Originally Posted by
eldragon
0.0.0.0 is not a valid address, dont worry about it.
I wish that was a good solution for me, but I need 0.0.0.0 available for when I have to use an invalid address (for instance, blocking in my hosts file. I don't want to use 127.0.0.1 because I don't want the bogus requests continuing to drive my local web server nutty). Are there any other legal invalid addresses? I can't think of any.
Originally Posted by
jonobr
AFAIK I believe ping of 0.0.0.0 will go to the default route and your nic will respond to that ping request
That's what I'm seeing in practise. I guess my routing table is messed up. I'm not great at using the route command, I can never figure out the syntax (I come from BSD, where the route command is slightly easier to use ).
By the way, on WinXP a "ping 0.0.0.0" comes back with "Destination specified is invalid", which I believe is the correct response. (XP uses the NetBSD networking stack, AFAIK.)
Code:
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.22.5.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
default 10.22.5.2 0.0.0.0 UG 0 0 0 eth0
default 10.22.5.2 0.0.0.0 UG 100 0 0 eth0
That's definitely not right. I have two default entries and that pesky link-local that keeps popping up in routing tables across my networks.
Offtopic "D'oh!" moment: I had some trouble recently with nslookup. I was trying to figure out why it was ignoring my hosts file. I didn't realise it ignores the hosts file completely and goes directly to the nameserver. (BSD nslookup does not do this.)
===========================
Apparently that didn't fix anything. 0.0.0.0 still resolves. Obvious, now that I think about it...
Code:
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.22.5.0 * 255.255.255.0 U 0 0 0 eth0
default 10.22.5.2 0.0.0.0 UG 100 0 0 eth0
$ ping 0.0.0.0
PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.040 ms
^C
--- 0.0.0.0 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.040/0.049/0.058/0.009 ms
Bookmarks