Re: ICMP Router Discovery
Re: ICMP Router Discovery
- Subject: Re: ICMP Router Discovery
- From: "Justin C. Walker" <email@hidden>
- Date: Tue, 28 Jun 2005 17:13:40 -0700
On Jun 28, 2005, at 16:02 , Chase wrote:
Pinging 224.0.0.2 should get replies from everything that thinks
its a router and cares for answering.
hmmm... just tried "ping 224.0.0.2", but it just hangs there,
getting no reponses from anything.
i like this idea though (in terms of portability). can you help
me figure out what i'm doing wrong?
i tried pinging 224.0.0.0 thru 224.0.0.100 (and a few toward the
top of the range as well), and i could get responses from one of
the routers, but not the other.
the responses from the one router were provoked by pinging 224.0.0.9
but, again, the other router didn't respond to any of the
224.0.0.xxx pings.
Visit this site for a listing of multicast address assignments:
<http://www.iana.org/assignments/multicast-addresses>
Note that there will, on any given network, likely be a variety of
routing protocols, and routers, running. Not all will respond to a
given protocol, and not all will respond to the kind of nudging you
are doing.
BUT... i tried pinging 192.168.0.255 and 192.168.1.255 and i got
something very interesting and useful:
PING 192.168.0.255 (192.168.0.255): 56 data bytes
I assume you are sending to the subnet broadcast address, so you are
effectively broadcasting the 'ping'.
this is great. i'm not complaining at all. quite the contrary.
but, could someone explain why no other hosts on the subnet(s) are
responding? i'm obviously missing something key to how messages
are broadcast locally.
Not all hosts will respond to broadcast pings (to avoid some kinds of
DOS attacks). BSD-derived systems have a knob to control this
("sysctl net.inet.icmp.bmcastecho"). This knob controls the system's
response to both broadcast and multicast pings (cf. above).
if this turns out to be consistently predictable (pinging the
broadcast address of the subnet yields **ONLY** results from
oneself and the router on that subnet), then i can just look thru
the ping source, pull out the relevant parts, and simply filter out
responses from the local address. that should always give me the
router address, right?
What Peter said. Can you describe your goals?
Cheers,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Men are from Earth.
Women are from Earth.
Deal with it.
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden