Skip to main content

10. Protocol Constants

This section defines the protocol constants used by Neighbor Discovery. These constants specify timing values, retry limits, and other parameters that govern the behavior of the protocol. Implementations MUST (MUST) use these values unless explicitly specified otherwise in the protocol specification.

10.1. Host Constants

The following constants are used by hosts when performing router discovery and address configuration:

ConstantValueDescription
MAX_RTR_SOLICITATION_DELAY1 secondMaximum delay before transmitting the first Router Solicitation message. Used to prevent synchronization when multiple hosts start simultaneously.
RTR_SOLICITATION_INTERVAL4 secondsTime interval between retransmissions of Router Solicitation messages.
MAX_RTR_SOLICITATIONS3 transmissionsMaximum number of Router Solicitation messages that a host sends before accepting that no routers are present.

Usage Notes

  • MAX_RTR_SOLICITATION_DELAY: When a host interface becomes enabled, it SHOULD (SHOULD) wait a random amount of time between 0 and MAX_RTR_SOLICITATION_DELAY before sending the first Router Solicitation. This prevents network congestion when many hosts are powered on simultaneously.

  • RTR_SOLICITATION_INTERVAL: If a host does not receive a Router Advertisement in response to its Router Solicitation, it retransmits after this interval.

  • MAX_RTR_SOLICITATIONS: After sending this many solicitations without receiving a response, a host concludes that no routers are available on the link and may proceed with other address configuration mechanisms (such as DHCPv6).

10.2. Router Constants

The following constants govern router behavior when sending Router Advertisements:

ConstantValueDescription
MAX_INITIAL_RTR_ADVERT_INTERVAL16 secondsMaximum time interval between initial unsolicited Router Advertisements sent from an interface when it becomes an advertising interface.
MAX_INITIAL_RTR_ADVERTISEMENTS3 transmissionsNumber of initial unsolicited Router Advertisements sent when a router interface becomes an advertising interface.
MAX_FINAL_RTR_ADVERTISEMENTS3 transmissionsNumber of final Router Advertisements sent when a router interface ceases to be an advertising interface.
MIN_DELAY_BETWEEN_RAS3 secondsMinimum time interval between sending unsolicited multicast Router Advertisements from an interface.
MAX_RA_DELAY_TIME0.5 secondsMaximum delay before responding to a Router Solicitation with a Router Advertisement.

Usage Notes

  • MAX_INITIAL_RTR_ADVERT_INTERVAL: When a router starts advertising on an interface, it sends several initial advertisements at a higher rate to quickly inform hosts of its presence.

  • MAX_INITIAL_RTR_ADVERTISEMENTS: This rapid initial advertising helps newly connected hosts configure themselves quickly.

  • MAX_FINAL_RTR_ADVERTISEMENTS: When a router is about to stop advertising (e.g., shutting down gracefully), it sends final advertisements with a Router Lifetime of zero to inform hosts that they should no longer use this router.

  • MIN_DELAY_BETWEEN_RAS: This prevents routers from flooding the link with Router Advertisements, even if solicited by multiple hosts simultaneously.

  • MAX_RA_DELAY_TIME: When responding to a Router Solicitation, a router delays its response by a random amount up to this value to avoid synchronized responses from multiple routers.

10.3. Node Constants

The following constants apply to all IPv6 nodes (both hosts and routers) for address resolution and neighbor unreachability detection:

ConstantValueDescription
MAX_MULTICAST_SOLICIT3 transmissionsMaximum number of multicast Neighbor Solicitation messages sent for address resolution or reachability confirmation.
MAX_UNICAST_SOLICIT3 transmissionsMaximum number of unicast Neighbor Solicitation messages sent to probe a neighbor's reachability.
MAX_ANYCAST_DELAY_TIME1 secondMaximum delay before responding to a Neighbor Solicitation for an anycast address.
MAX_NEIGHBOR_ADVERTISEMENT3 transmissionsMaximum number of unsolicited Neighbor Advertisement messages sent when a node's link-layer address changes.
REACHABLE_TIME30,000 millisecondsBase value used for computing the random ReachableTime. This is typically overridden by values received in Router Advertisements.
RETRANS_TIMER1,000 millisecondsBase value for the time between retransmissions of Neighbor Solicitation messages. This is typically overridden by values received in Router Advertisements.
DELAY_FIRST_PROBE_TIME5 secondsDelay before sending the first unicast Neighbor Solicitation probe when a neighbor becomes suspect.
MIN_RANDOM_FACTOR0.5Minimum value for the random factor used when computing RandomReachableTime.
MAX_RANDOM_FACTOR1.5Maximum value for the random factor used when computing RandomReachableTime.

Usage Notes

  • MAX_MULTICAST_SOLICIT: Used during address resolution when a node needs to determine a neighbor's link-layer address. After this many attempts, the node concludes the neighbor is unreachable.

  • MAX_UNICAST_SOLICIT: Used during neighbor unreachability detection to probe a neighbor that has become suspect.

  • MAX_ANYCAST_DELAY_TIME: When multiple nodes share an anycast address, they respond to Neighbor Solicitations with a random delay to reduce collisions. The node with the shortest delay responds, and others suppress their responses.

  • MAX_NEIGHBOR_ADVERTISEMENT: When a node's link-layer address changes, it multicasts unsolicited Neighbor Advertisements to update all neighbors' caches.

  • REACHABLE_TIME and RETRANS_TIMER: These provide default values, but nodes SHOULD (SHOULD) use values advertised by routers when available.

  • DELAY_FIRST_PROBE_TIME: When forward progress is detected for a neighbor in the DELAY state, the node waits this long before probing to confirm reachability.

  • MIN_RANDOM_FACTOR and MAX_RANDOM_FACTOR: Used to compute a random ReachableTime value to avoid synchronized Neighbor Unreachability Detection activity across multiple nodes.

10.4. Implementation Considerations

When implementing these constants:

  1. Tuning: While these values have been carefully chosen for general Internet use, network administrators MAY (MAY) need to adjust them for specific environments (e.g., wireless networks with high loss rates).

  2. Router Advertisement Override: Several node constants (REACHABLE_TIME, RETRANS_TIMER) can be overridden by values received in Router Advertisements. Implementations MUST (MUST) respect these received values.

  3. Randomization: Several operations require randomization (e.g., MAX_RTR_SOLICITATION_DELAY, MAX_RA_DELAY_TIME) to prevent synchronization. Implementations SHOULD (SHOULD) use a quality random number generator.

  4. Network Characteristics: For networks with unusual characteristics (very high latency, high packet loss, or very large numbers of nodes), these constants may need adjustment. Any such adjustments SHOULD (SHOULD) be documented and based on careful analysis.