ICMP Router Discovery Messages
Extracted elements (25)
Advertisement intervals are randomized between MinAdvertisementInterval and MaxAdvertisementInterval rather than being strictly periodic, to reduce synchronization probability with other routers on the same link. Routers are recommended to seed their PRNG with a unique value such as an IP or link-layer address.
High packet-loss links are accommodated by increasing the router advertisement rate rather than increasing the number of solicitations hosts are permitted to send. This keeps host solicitation behavior bounded while allowing administrators to tune reliability via router configuration.
Router discovery does not determine which router is best for a given destination; it only reveals that neighboring routers exist. If a host picks a suboptimal first-hop router, it should receive an ICMP Redirect identifying a better one. This design keeps router discovery independent of specific routing protocols.
The default advertising rate (every 7-10 minutes) and default lifetime (30 minutes) were chosen to impose negligible load on links and hosts, not to serve as a black-hole detection mechanism. Network administrators who want advertisement-based black-hole detection must configure smaller values; hosts must have independent black-hole detection mechanisms.
The PreferenceLevel value hex 80000000 allows a router to advertise an address (keeping it alive for black-hole detection timers) while preventing hosts from using it as a general default router. This is distinct from setting Advertise=FALSE, which removes the address entirely.
Future backward-compatible extensions may specify contents for the Reserved field or add per-address information words beyond the current Router Address and Preference Level fields. Backward-incompatible changes will use different Code values. Hosts and routers must silently ignore unrecognized trailing octets and extra per-address words.
Router addresses acquired from the 'Gateway' subfield of BOOTP vendor extensions are treated as configured addresses with default preference level 0 and no expiry timer. The 'giaddr' field in a BOOTP packet identifies a BOOTP forwarder that is not necessarily an IP router and must not be installed in the host's default router list.
A host cannot process a Router Advertisement until it has determined its own IP address(es) and subnet mask(s) for the arrival interface. It MAY save valid advertisements for later processing to allow router discovery and address/mask discovery to proceed in parallel.
A host MUST silently discard any received Router Solicitation messages. A host MUST NOT send Router Advertisement messages.
A multicast solicitation response MUST be delayed by a random interval not greater than MAX_RESPONSE_DELAY (2 seconds) to prevent synchronization among responding routers and to allow multiple closely-spaced solicitations to be answered with a single advertisement.
A router MUST join the all-routers IP multicast group (224.0.0.2) on all interfaces where it supports IP multicast. On transition from host to router, the system must join this group; on transition from router to host, it must depart.
A router MUST silently discard any received Router Solicitation that fails validity: IP source must be 0 or a neighboring address, ICMP checksum must be valid, Code must be 0, and ICMP length (derived from IP length) must be 8 or more octets.
MaxAdvertisementInterval MUST be no less than 4 seconds and no greater than 1800 seconds. MinAdvertisementInterval MUST be no less than 3 seconds and no greater than MaxAdvertisementInterval.
Upon receiving a valid advertisement containing at least one neighboring address with a preference level other than hex 80000000, a host MUST desist from sending any further solicitations on that interface until the next triggering event (startup, reinitialization, role change, or PerformRouterDiscovery change).
When an interface first becomes an advertising interface, the router MUST limit the first MAX_INITIAL_ADVERTISEMENTS transmissions to intervals no greater than MAX_INITIAL_ADVERT_INTERVAL (16 seconds), increasing the likelihood of rapid discovery in the presence of packet loss.
AdvertisementAddress is the IP destination for multicast Router Advertisements: either the all-systems multicast address 224.0.0.1 (preferred when IP multicast is supported on the interface) or the limited-broadcast address 255.255.255.255. Defaults to 224.0.0.1 if IP multicast is supported.
AdvertisementLifetime specifies the maximum seconds that advertised router addresses remain valid in the absence of further advertisements. It must be no less than MaxAdvertisementInterval and no greater than 9000 seconds; defaults to 3 * MaxAdvertisementInterval.
PreferenceLevel is a 32-bit signed twos-complement integer indicating relative preferability of a router address as a default router. Higher values are more preferable. The minimum value hex 80000000 is reserved to mean the address must not be used as a default router, even if advertised.
Protocol constants define timing bounds: MAX_INITIAL_ADVERT_INTERVAL=16s and MAX_INITIAL_ADVERTISEMENTS=3 (router initial burst), MAX_RESPONSE_DELAY=2s (router solicitation response), MAX_SOLICITATION_DELAY=1s, SOLICITATION_INTERVAL=3s, and MAX_SOLICITATIONS=3 (host). All constants are subject to change in future revisions.
Any system on a multicast or broadcast link can masquerade as a default router by sending fraudulent Router Advertisements, enabling eavesdropping, denial of forwarding service, and packet modification. On most such links, eavesdropping is already feasible, and ARP offers a similar opportunity for service denial and message stream modification.
To mitigate router impersonation, hosts can be configured with PerformRouterDiscovery=FALSE to disable dynamic router discovery. The message format reserves room for future backward-compatible addition of digital signatures or other authentication information; this mechanism is FOR FURTHER STUDY.
A router interface transitions to 'advertising' state when enabled with at least one Advertise=TRUE address, when IP forwarding is turned on, or when an Advertise flag is set TRUE. It leaves advertising state when disabled, shut down, forwarding is turned off, or all Advertise flags become FALSE. On cessation, it is recommended (not required) to send a final advertisement with Lifetime=0.
Host solicitation state: a host MAY send up to MAX_SOLICITATIONS (3) Router Solicitations, triggered by interface initialization, reinitialization after failure, router-to-host role change, or PerformRouterDiscovery changing to TRUE. Retransmissions use SOLICITATION_INTERVAL (3 seconds) without randomization; initial transmission is delayed by a random value up to MAX_SOLICITATION_DELAY (1 second).
Router Advertisement Message (ICMP Type 9, Code 0): 8-bit Type, 8-bit Code, 16-bit Checksum (ones-complement), 8-bit Num Addrs, 8-bit Addr Entry Size (value 2), 16-bit Lifetime (seconds), followed by Num Addrs pairs of 32-bit Router Address and 32-bit signed Preference Level.
Router Solicitation Message (ICMP Type 10, Code 0): 8-bit Type, 8-bit Code, 16-bit Checksum, 32-bit Reserved (sent as 0, ignored on reception). Minimum valid length is 8 octets.