|ICMP type 9, Router advertisement|
|Protocol type:||Transport layer control protocol.|
|Base protocol:||ICMP, Internet Control Message Protocol.|
|Related ICMP message:||Router solicitation.|
|Host implementation:||Prohibited (transmission); Optional (reception).|
|Router implementation:||Mandatory (transmission); Optional (reception).|
|Links:||IANA: ICMP parameters.|
An ICMP Router advertisement message is sent as a multicast. Each router address/preference level pair is considered an entry in the list.
RFC 1256, page 3.
The ICMP router discovery messages are called "Router Advertisements" and "Router Solicitations". Each router periodically multicasts a Router Advertisement from each of its multicast interfaces, announcing the IP address(es) of that interface. Hosts discover the addresses of their neighboring routers simply by listening for advertisements. When a host attached to a multicast link starts up, it may multicast a Router Solicitation to ask for immediate advertisements, rather than waiting for the next periodic ones to arrive; if and only if no advertisements are forthcoming, the host may retransmit the solicitation a small number of times, but then must desist from sending any more solicitations. Any routers that subsequently start up, or that were not discovered because of packet loss or temporary link partitioning, are eventually discovered by reception of their periodic (unsolicited) advertisements. (Links that suffer high packet loss rates or frequent partitioning are accommodated by increasing the rate of advertisements, rather than increasing the number of solicitations that hosts are permitted to send.)
The router discovery messages do not constitute a routing protocol: they enable hosts to discover the existence of neighboring routers, but not which router is best to reach a particular destination. If a host chooses a poor first-hop router for a particular destination, it should receive an ICMP Redirect from that router, identifying a better one.
RFC 2002, page 12:
Mobile IP makes use of the existing Router Advertisement and Router Solicitation messages defined for ICMP Router Discovery.
Mobile IP defines a general Extension mechanism to allow optional information to be carried by Mobile IP control messages or by ICMP Router Discovery messages.
Any Router Advertisement message that arrives on an interface that is not configured to receive these messages should be silently discarded.
A host that implements the ICMP router discovery messages must allow for the following variables to be configured by system management. Default values are defined for these variables to simplify the configuration of the host. Each multicast interface will have a set of these parameters.
PerformRouterDiscovery. Default = True.
A flag indicating whether or not the host is to perform ICMP router discovery on the interface.
SolicitationAddress. Default = 184.108.40.206 for multicast, otherwise 255.255.255.255.
The IP destination address to be used for sending Router Solicitations from the interface. The only permissible values are the all-routers multicast address, 220.127.116.11, or the limited-broadcast address, 255.255.255.255. The multicast address is preferred wherever possible.
The default router list has these parameters:
An IP address of a default router.
PreferenceLevel. Default = 0.
The preferability of the RouterAddress as a default router address, relative to other router addresses on the same subnet. The Host Requirements RFC does not specify how this value is to be encoded; to allow the preference level to be conveyed in a Router Advertisement or configured by system management, it is here specified that it be encoded as a 32-bit, signed, twos-complement integer, with higher values meaning more preferable. The minimum value (hex 80000000) is reserved to mean that the address is not to be used as a default router address, i.e., it is to be used only for specific IP destinations, of which the host has been informed by ICMP Redirect or configuration.
A host must silently discard any Router Advertisement messages it receives that do not satisfy the following validity checks:
RFC 1256, pages 14 and 15:
An advertisement that passes the validity checks is called a "valid advertisement".
A host silently discards any Router Advertisement message that arrives on an interface for which the host's configured PerformRouterDiscovery flag is FALSE, and it never sends a Router Solicitation on such an interface.
A host cannot process an advertisement until it has determined its own IP address(es) and subnet mask(s) for the interface on which the advertisement is received. On some links, a host may be able to use some combination of BOOTP, RARP, or ICMP Address Mask messages to discover its own address and mask. While waiting to learn the address and mask of an interface, a host may save any valid advertisements received on that interface for later processing; this allows router discovery and address/mask discovery to proceed in parallel.
To process an advertisement, a host scans the list of router addresses contained in it. It ignores any non-neighboring addresses, i.e., addresses that do not match one of the host's own addresses on the arrival interface, under the subnet mask associated with that address. For each neighboring address, the host does the following:
- If the address is not already present in the host's default router list, a new entry is added to the list, containing the address along with its accompanying preference level and a timer initialized to the Lifetime value from the advertisement.
- If the address is already present in the host's default router list as a result of a previously-received advertisement, its preference level is updated and its timer is reset to the values in the newly-received advertisement.
- If the address is already present in the host's default router list as a result of system configuration, no change is made to its preference level; there is no timer associated with a configured address. Note that any router addresses acquired from the "Gateway" subfield of the vendor extensions field of a BOOTP packet are considered to be configured addresses; they are assigned the default preference level of zero, and they do not have an associated timer. Note further that any address found in the "giaddr" field of a BOOTP packet identifies a BOOTP forwarder which is not necessarily an IP router; such an address should not be installed in the host's default router list.
Any Router Advertisement messages that are received may be silently discarded.
A router that implements the ICMP router discovery messages must allow for the following variables to be configured by system management. Default values are defined for these variables to simplify the configuration of the router. Each multicast interface will have a set of these parameters.
The IP destination address to be used for multicast Router Advertisements sent from the interface. The only permissible values are the all-systems multicast address, 18.104.22.168, or the limited-broadcast address, 255.255.255.255. The multicast address is preferred wherever possible.
MaxAdvertisementInterval. Default = 600 seconds. Range = 4 to 1800 seconds.
The maximum time allowed between sending multicast Router Advertisements from the interface in seconds.
MinAdvertisementInterval. Default = 0.75 * MaxAdvertisementInterval. Range = 3 to MaxAdvertisementInterval.
The minimum time allowed between sending unsolicited multicast Router Advertisements from the interface, in seconds.
AdvertisementLifetime. Default = 3 * MaxAdvertisementInterval. Range = MaxAdvertisementInterval to 9000 seconds.
The value to be placed in the Lifetime field of Router Advertisements sent from the interface, in seconds.
Each of the router's IP addresses on its multicast interfaces have the following parameters:
Advertise. Default = True.
A flag indicating whether or not the address is to be advertised.
PreferenceLevel. Default = 0.
The preferability of the address as a default router address, relative to other router addresses on the same subnet. A 32-bit, signed, twos-complement integer, with higher values meaning more preferable. The minimum value (0x80000000) is used to indicate that the address, even though it may be advertised, is not to be used by neighboring hosts as a default router address.
RFC 1256, page 9 and 10:
The router joins the all-routers IP multicast group (22.214.171.124) on all interfaces on which the router supports IP multicast.
The term "advertising interface" refers to any functioning and enabled multicast interface that has at least one IP address whose configured Advertise flag is TRUE. From each advertising interface, the router transmits periodic, multicast Router Advertisements.
RFC 1812, page 62:
An IP router MUST support the router part of the ICMP Router Discovery Protocol on all connected networks on which the router supports either IP multicast or IP broadcast addressing. The implementation MUST include all the configuration variables specified for routers, with the specified defaults.
Routers are not required to implement the host part of the ICMP Router Discovery Protocol, but might find it useful for operation while IP forwarding is disabled (i.e., when operating as a host).
|MAC header||IP header||ICMP message||Data :::|
ICMP type 9, Router advertisement message:
|Type||Code||ICMP header checksum|
|Advertisement count||Address Entry size||Lifetime|
|Router address structure  :::|
Type. 8 bits. Set to 9.
Code. 8 bits.
|0||Normal router advertisement.|
|16||Does not route common traffic.|
ICMP Header Checksum.
The 16-bit one's complement of the one's complement sum of the ICMP message, starting with the ICMP Type field. When the checksum is computed, the checksum field should first be cleared to 0. When the data packet is transmitted, the checksum is computed and inserted into this field. When the data packet is received, the checksum is again computed and verified against the checksum field. If the two checksums do not match then an error has occurred.
The number of router advertisements in this message. Each advertisement contains one router address/preference level pair.
Address Entry size.
The number of 32-bit words of information for each router address entry in the list. The value is normally set to 2 (router address + preference level).
The maximum number of seconds that the router addresses in this list may be considered valid.
Router address structure .
A list of one or more router addresses and the associated preference level.
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Router Address Preference Level
Router address. 32 bits.
The IPv4 address of the advertised router.
Preference level. 32 bits, signed.
The preferability of the router address as a default router address, relative to other router addresses on the same subnet. This is a twos-complement value where higher values indicate that the route is more preferable.
[RFC 1122] Requirements for Internet Hosts -- Communication Layers.
[RFC 1256] ICMP Router Discovery Messages.
[RFC 1812] Requirements for IP Version 4 Routers.
[RFC 1009] Requirements for Internet Gateways.
[RFC 1716] Towards Requirements for IP Routers.
[RFC 2002] IP Mobility Support.
[RFC 3220] IP Mobility Support for IPv4.