Neighbor Discovery Messages

All of the functions of IPv6 ND are performed with the following messages:

  • Router Solicitation
  • Router Advertisement
  • Neighbor Solicitation
  • Neighbor Advertisement
  • Redirect

Router Solicitation

The Router Solicitation message is sent by IPv6 hosts to discover the presence of IPv6 routers on the link. A host sends a multicast Router Solicitation message to prompt IPv6 routers to respond immediately, rather than waiting for a pseudo-periodic Router Advertisement message.

For example, assuming that the local link is Ethernet, in the Ethernet header of the Router Solicitation message:

  • The Source Address field is set to the MAC address of the sending network adapter.
  • The Destination Address field is set to 33-33-00-00-00-02.

In the IPv6 header of the Router Solicitation message:

  • The Source Address field is set to either a link-local IPv6 address assigned to the sending interface or the IPv6 unspecified address (::).
  • The Destination Address field is set to the link-local scope all-routers multicast address (FF02::2).
  • The Hop Limit field is set to 255.

Figure 6-14 shows the structure of the Router Solicitation message.

Figure 6-14. The structure of the Router Solicitation message

The fields in the Router Solicitation message are:

  • Type

    The value of this field is 133.

  • Code

    The value of this field is 0.

  • Checksum

    The value of this field is the ICMPv6 checksum.

  • Reserved

    This is a 32-bit field reserved for future use and set to 0.

  • Source Link-Layer Address option

    When present, the Source Link-Layer Address option contains the link-layer address of the sender. For an Ethernet node, the Source Link-Layer Address option contains the Ethernet MAC address of the sending host. The address in the Source Link-Layer Address option is used by the receiving router to determine the unicast MAC address of the host to which the corresponding unicast Router Advertisement is sent.

Network Monitor Capture

Here is an example of a Router Solicitation message as displayed by Network Monitor (capture 06_04 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties + ETHERNET: ETYPE = IPv6   IP6: Proto = ICMP6; Len = 16       IP6: Version = 6 (0x6)       IP6: Traffic Class = 0 (0x0)       IP6: Flow Label = 0 (0x0)       IP6: Payload Length = 16 (0x10)       IP6: Next Header = 58 (ICMP6)       IP6: Hop Limit = 255 (0xFF)       IP6: Source Address = fe80::2b0:d0ff:fe23:4733       IP6: Destination Address = ff02::2       IP6: Payload: Number of data bytes remaining = 16 (0x0010)   ICMP6: Router Solicitation       ICMP6: Type = 133 (Router Solicitation)       ICMP6: Code = 0 (0x0)       ICMP6: Checksum = 0x4B20       ICMP6: Reserved       ICMP6: Source Link-level Address = 00 B0 D0 23 47 33           ICMP6: Type = 1 (0x1)           ICMP6: Length = 1 (0x1)           ICMP6: Source Link-level Address = 00 B0 D0 23 47 33 

Router Advertisement

IPv6 routers send the Router Advertisement message pseudo-periodically and in response to the receipt of a Router Solicitation message. It contains the information required by hosts to determine the link prefixes, the link MTU, specific routes, whether or not to use address autoconfiguration, and the duration for which addresses created through address autoconfiguration are valid and preferred.

For example, assuming that the local link is Ethernet, in the Ethernet header of the Router Advertisement message:

  • The Source Address field is set to the MAC address of the sending network adapter.
  • The Destination Address field is set to either 33-33-00-00-00-01 or the unicast MAC address of the host that sent a Router Solicitation from a unicast address.

In the IPv6 header of the Router Advertisement message:

  • The Source Address field is set to the link-local address assigned to the sending interface.
  • The Destination Address field is set to either the link-local scope all-nodes multicast address (FF02::1) or the unicast IPv6 address of the host that sent the Router Solicitation message from a unicast address.
  • The Hop Limit field is set to 255.

Figure 6-15 shows the structure of the Router Advertisement message.

Figure 6-15. The structure of the Router Advertisement message

The fields in the Router Advertisement message are:

  • Type

    The value of this field is 134.

  • Code

    The value of this field is 0.

  • Checksum

    The value of this field is the ICMPv6 checksum.

  • Current Hop Limit

    The Current Hop Limit field indicates the default value of the Hop Limit field in the IPv6 header for packets sent by hosts that receive this Router Advertisement message. The size of this field is 8 bits. A current hop limit of 0 indicates that the default value of the Hop Limit field is not specified by the router.

  • Managed Address Configuration flag

    The Managed Address Configuration flag indicates, when set to 1, that hosts receiving this Router Advertisement message must use a stateful address configuration protocol (for example, DHCPv6) to obtain addresses in addition to the addresses that might be derived from stateless address autoconfiguration. The size of this field is 1 bit.

  • Other Stateful Configuration flag

    The Other Stateful Configuration flag indicates, when set to 1, that hosts receiving this Router Advertisement message must use a stateful address configuration protocol (for example, DHCPv6) to obtain non-address configuration information. The size of this field is 1 bit.

  • Home Agent flag

    The Home Agent flag indicates, when set to 1, that the advertising router is also functioning as a home agent for IPv6 mobility. The size of this field is 1 bit. This flag is described in the Internet draft titled "Mobility Support in IPv6."

  • Default Router Preference

    The Default Router Preference field indicates the level of preference for this router as the default router. If multiple routers advertise themselves as default routers, you can configure the routers so that they advertise with different preference levels. Valid values in binary are 01 (High), 00 (Medium), and 11 (Low). If the preference is set to 10, the receiving host should assume a value of 0 for the Router Lifetime field, effectively disabling the advertising router as a default router. The size of this field is 2 bits. This field is described in the Internet draft "Default Router Preferences and More-Specific Routes."

    A typical configuration that can use the default router preference is a subnet that has two routers connected to the Internet or an organization intranet—one router is the primary router and another router is a slower, secondary router intended to provide fault tolerance for the primary router. Both routers advertise themselves as default routers; however, the primary router advertises a default router preference of 01 (High) and the secondary router advertises a default router preference of 00 (Medium). If the primary router becomes unavailable, the hosts on the subnet will use the secondary router until the primary router becomes available.

  • Reserved

    This is a 3-bit field reserved for future use and set to 0.

  • Router Lifetime

    The Router Lifetime field indicates the lifetime (in seconds) of the router as the default router. The size of this field is 16 bits. The maximum Router Lifetime value is 65,535 seconds (about 18.2 hours). A value of 0 indicates that the router cannot be considered a default router; however, all other information contained in the Router Advertisement is still valid.

  • Reachable Time

    The Reachable Time field indicates the amount of time (in milliseconds) that a node can consider a neighboring node reachable after receiving a reachability confirmation. The size of this field is 32 bits. A value of 0 indicates that the router does not specify the reachable time. For more information, see "Neighbor Unreachability Detection" in this chapter.

  • Retransmission Timer

    The Retransmission Timer field indicates the amount of time (in milliseconds) between retransmissions of Neighbor Solicitation messages. The size of this field is 32 bits. The retransmission timer is used during neighbor unreachability detection. A value of 0 indicates that the router does not specify the retransmission timer value.

  • Source Link-Layer Address option

    When present, the Source Link-Layer Address option contains the link-layer address of the interface on which the Router Advertisement message was sent. This option can be omitted when the router is load-balancing across multiple link-layer addresses.

  • MTU option

    When present, the MTU option contains the MTU of the link. It is typically sent on links that have a variable MTU or in switched environments that have multiple link-layer technologies on the same link.

  • Prefix Information options

    When present, Prefix Information options contain the on-link prefixes that are used for address autoconfiguration. The link-local prefix is never sent as a Prefix Information option.

  • Advertisement Interval option

    When present, the Advertisement Interval option contains the interval for subsequent unsolicited multicast Router Advertisement messages sent from the router acting as the home agent.

  • Home Agent Information option

    When present, the Home Agent Information option contains the preference and lifetime of the home agent.

  • Route Information options

    When present, Route Information options contain routes to add to the local routing table for more efficient host forwarding decisions.

Network Monitor Capture

Here is an example of a Router Advertisement message as displayed by Network Monitor (capture 06_02 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties + ETHERNET:  EType = IPv6    IP6: Proto = ICMP6; Len = 96       IP6: Version = 6 (0x6)       IP6: Traffic Class = 0 (0x0)       IP6: Flow Label = 0 (0x0)       IP6: Payload Length = 96 (0x0060)       IP6: Next Header = 58 (ICMP6)       IP6: Hop Limit = 255 (0xFF)       IP6: Source Address = fe80::2b0:d0ff:fe23:4733       IP6: Destination Address = ff02::1       IP6: Payload: Number of data bytes remaining = 96 (0x0060)   ICMP6: Router Advertisement       ICMP6: Type = 134 (Router Advertisement)       ICMP6: Code = 0 (0x0)       ICMP6: Checksum = 0xBAA5       ICMP6: Current Hop Limit = 0 (0x0)       ICMP6: 0....... = Not managed address config       ICMP6: .0...... = Not other stateful config       ICMP6: ..0..... = Not a Mobile IP Home Agent       ICMP6: Route Preference = Medium (0)       ICMP6: Router Lifetime = 0 (0x0)       ICMP6: Reachable Time = 0 (0x0)       ICMP6: Retransmission Timer = 0 (0x0)     + ICMP6: Source Link-Layer Address = 00 B0 D0 23 47 33     + ICMP6: MTU = 1500 (0x5DC)     + ICMP6: Prefix = fec0:0:0:2::     + ICMP6: Prefix = fec0:0:0:1:: 

Neighbor Solicitation

The Neighbor Solicitation message is sent by IPv6 hosts to discover the link-layer address of an on-link IPv6 node. It typically includes the link-layer address of the sender. Typical Neighbor Solicitation messages are multicast for address resolution and unicast when the reachability of a neighboring node is being verified.

For example, assuming that the local link is Ethernet, in the Ethernet header of the Neighbor Solicitation message:

  • The Source Address field is set to the MAC address of the sending network adapter.
  • For a multicast Neighbor Solicitation message, the Destination Address field is set to the Ethernet MAC address that corresponds to the solicited-node address of the target. For a unicast Neighbor Solicitation message, the Destination Address field is set to the unicast MAC address of the neighbor.

In the IPv6 header of the Neighbor Solicitation message:

  • The Source Address field is set to either a unicast IPv6 address assigned to the sending interface or, during duplicate address detection, the unspecified address (::).
  • For a multicast Neighbor Solicitation, the Destination Address field is set to the solicited-node address of the target. For a unicast Neighbor Solicitation, the Destination Address field is set to the unicast address of the target.
  • The Hop Limit field is set to 255.

Figure 6-16 shows the structure of the Neighbor Solicitation message.

Figure 6-16. The structure of the Neighbor Solicitation message

The fields in the Neighbor Solicitation message are:

  • Type

    The value of this field is 135.

  • Code

    The value of this field is 0.

  • Checksum

    The value of this field is the ICMPv6 checksum.

  • Reserved

    This is a 32-bit field reserved for future use and set to 0.

  • Target Address

    The Target Address field indicates the IP address of the target. The size of this field is 128 bits.

  • Source Link-Layer Address option

    When present, the Source Link-Layer Address option contains the link-layer address of the sender. For an Ethernet node, the Source Link-Layer Address option contains the Ethernet MAC address of the sending node. The receiving node uses the address in the Source Link-Layer Address option to determine the unicast MAC address of the node to which the corresponding Neighbor Advertisement is sent. During duplicate address detection, when the source IPv6 address is the unspecified address (::), the Source Link-Layer Address option is not included.

Network Monitor Capture

Here is an example of a Neighbor Solicitation message as displayed by Network Monitor (frame 1 of capture 06_01 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties   ETHERNET:  EType = IPv6      + ETHERNET: Destination address : 3333FF026EA5     + ETHERNET: Source address : 00105AAA20A2       ETHERNET: Ethernet Type : 0x86DD   IP6: Proto = ICMP6; Len = 32       IP6: Version = 6 (0x6)       IP6: Traffic Class = 0 (0x0)       IP6: Flow Label = 0 (0x0)       IP6: Payload Length = 32 (0x20)       IP6: Next Header = 58 (ICMP6)       IP6: Hop Limit = 255 (0xFF)       IP6: Source Address = fe80::210:5aff:feaa:20a2       IP6: Destination Address = ff02::1:ff02:6ea5       IP6: Payload: Number of data bytes remaining = 32 (0x0020)   ICMP6: Neighbor Solicitation; Target = fe80::260:97ff:fe02:6ea5       ICMP6: Type = 135 (Neighbor Solicitation)       ICMP6: Code = 0 (0x0)       ICMP6: Checksum = 0x0F35       ICMP6: Reserved       ICMP6: Target Address = fe80::260:97ff:fe02:6ea5       ICMP6: Source Link-Layer Address = 00 10 5A AA 20 A2           ICMP6: Type = 1 (0x1)           ICMP6: Length = 1 (0x1)           ICMP6: Source Link-Layer Address = 00 10 5A AA 20 A2 

Notice how the last 24 bits of the target address (FE80::260:97FF:FE02:6EA5) correspond to the last 24 bits of the solicited-node destination address (FF02::1:FF02:6EA5) (corresponding bits underlined). Also notice how the last 32 bits of the solicited-node destination address (FF02::1:FF02:6EA5) correspond to the last 32 bits of the Ethernet destination address (3333FF026EA5) (corresponding bits underlined).

Neighbor Advertisement

An IPv6 node sends the Neighbor Advertisement message in response to a Neighbor Solicitation message. An IPv6 node also sends unsolicited Neighbor Advertisements to inform neighboring nodes of changes in link-layer addresses or the node's role. The Neighbor Advertisement contains information required by nodes to determine the type of Neighbor Advertisement message, the sender's role on the network, and typically the link-layer address of the sender.

For example, assuming that the local link is Ethernet, in the Ethernet header of the Neighbor Advertisement message:

  • The Source Address field is set to the MAC address of the sending network adapter.
  • The Destination Address field is set, for a solicited Neighbor Advertisement, to the unicast MAC address of the initial Neighbor Solicitation sender. For an unsolicited Neighbor Advertisement, the Destination Address field is set to 33-33-00-00-00-01, the Ethernet MAC address corresponding to the link-local scope all-nodes multicast address.

In the IPv6 header of the Neighbor Advertisement message:

  • The Source Address field is set to a unicast address assigned to the sending interface.
  • The Destination Address field is set, for a solicited Neighbor Advertisement, to the unicast IP address of the sender of the initial Neighbor Solicitation. For an unsolicited Neighbor Advertisement, the Destination Address field is set to the link-local scope all-nodes multicast address (FF02::1).
  • The Hop Limit field is set to 255.

Figure 6-17 shows the structure of the Neighbor Advertisement message.

Figure 6-17. The structure of the Neighbor Advertisement message

The fields in the Neighbor Advertisement message are:

  • Type

    The value of this field is 136.

  • Code

    The value of this field is 0.

  • Checksum

    The value of this field is the ICMPv6 checksum.

  • Router flag

    The Router flag indicates the role of the sender of the Neighbor Advertisement message. The size of this field is 1 bit. The Router flag is set to 1 when the sender is a router and 0 when the sender is not. The Router flag is used by the neighbor unreachability detection process to determine when a router changes to a host.

  • Solicited flag

    The Solicited flag indicates, when set to 1, that the Neighbor Advertisement message was sent in response to a Neighbor Solicitation message. The size of this field is 1 bit. The Solicited flag is used as a reachability confirmation during neighbor unreachability detection. The Solicited flag is set to 0 for both multicast Neighbor Advertisements and unsolicited unicast Neighbor Advertisements.

  • Override flag

    The Override flag indicates, when set to 1, that the link-layer address in the included Target Link-Layer Address option should override the link-layer address in the existing neighbor cache entry. The size of this field is 1 bit. If the Override flag is set to 0, the enclosed link-layer address updates a neighbor cache entry only if the link-layer address is not known. The Override flag is set to 0 for a solicited anycast address or a proxied advertisement. The Override flag is set to 1 in other solicited and unsolicited advertisements. For more information about the neighbor cache, see the "Neighbor Discovery Processes" section in this chapter.

  • Reserved

    This is a 29-bit field reserved for future use and set to 0.

  • Target Address

    The Target Address field indicates the address being advertised. The size of this field is 128 bits. For solicited Neighbor Advertisement messages, the target address is set to the value of the Target Address field in the corresponding Neighbor Solicitation. For unsolicited Neighbor Advertisement messages, the target address is the address whose link-layer address or role has changed.

  • Target Link-Layer Address option

    When present, the Target Link-Layer Address option contains the link-layer address of the target, which is the sender of the Neighbor Advertisement. For an Ethernet node, the Target Link-Layer Address option contains the Ethernet MAC address of the sending node. The address in the Target Link-Layer Address option is used by receiving nodes to determine the unicast MAC address of the advertising node.

Network Monitor Capture

Here is an example of a solicited Neighbor Advertisement message as displayed by Network Monitor (frame 2 of capture 06_01 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties + ETHERNET:  EType = IPv6    IP6: Proto = ICMP6; Len = 32       IP6: Version = 6 (0x6)       IP6: Traffic Class = 0 (0x0)       IP6: Flow Label = 0 (0x0)       IP6: Payload Length = 32 (0x20)       IP6: Next Header = 58 (ICMP6)       IP6: Hop Limit = 255 (0xFF)       IP6: Source Address = fe80::260:97ff:fe02:6ea5       IP6: Destination Address = fe80::210:5aff:feaa:20a2       IP6: Payload: Number of data bytes remaining = 32 (0x0020)   ICMP6: Neighbor Advertisement; Target = fe80::260:97ff:fe02:6ea5       ICMP6: Type = 136 (Neighbor Advertisement)       ICMP6: Code = 0 (0x0)       ICMP6: Checksum = 0x89AC       ICMP6: 0............................... = Not router       ICMP6: .1.............................. = Solicited       ICMP6: ..1............................. = Override       ICMP6: Target Address = fe80::260:97ff:fe02:6ea5       ICMP6: Target Link-Layer Address = 00 60 97 02 6E A5           ICMP6: Type = 2 (0x2)           ICMP6: Length = 1 (0x1)           ICMP6: Target Link-Layer Address = 00 60 97 02 6E A5 

Redirect

The Redirect message is sent by an IPv6 router to inform an originating host of a better first-hop address for a specific destination. Redirect messages are sent only by routers for unicast traffic, are unicast only to originating hosts, and are processed only by hosts.

For example, assuming that the local link is Ethernet, in the Ethernet header of the Redirect message:

  • The Source Address field is set to the MAC address of the sending network adapter.
  • The Destination Address field is set to the unicast MAC address of the originating sender.

In the IPv6 header of the Redirect message:

  • The Source Address field is set to a unicast address that is assigned to the sending interface.
  • The Destination Address field is set to the unicast IP address of the originating host.
  • The Hop Limit field is set to 255.

Figure 6-18 shows the structure of the Redirect message.

Figure 6-18. The structure of the Redirect message

The fields in the Redirect message are:

  • Type

    The value of this field is 137.

  • Code

    The value of this field is 0.

  • Checksum

    The value of this field is the ICMPv6 checksum.

  • Reserved

    This is a 32-bit field reserved for the future and set to 0.

  • Target Address

    The Target Address field indicates the better next-hop address for packets addressed to the node in the Destination Address field. The size of this field is 128 bits. For off-link traffic, the Target Address field is set to the link-local address of a local router. For on-link traffic, the Target Address field is set to the Destination Address field in the Redirect message.

  • Destination Address

    The Destination Address field contains the destination address of the packet that caused the router to send the Redirect message. The size of this field is 128 bits. Upon receipt at the originating host, the Target Address and Destination Address fields are used to update forwarding information for the destination. Subsequent packets sent to the destination by the host are forwarded to the address in the Target Address field.

  • Target Link-Layer Address option

    The Target Link-Layer Address option contains the link-layer address of the target (the node to which subsequent packets should be sent). The Target Link-Layer Address option can be included when known by the router, although it is not typically sent.

  • Redirected Header option

    The Redirected Header option includes the leading portion of the original packet that caused the Redirect message to be sent, sized so that the entire IPv6 packet containing the Redirect message is no larger than 1,280 bytes.

Network Monitor Capture

Here is an example of a Redirect message as displayed by Network Monitor (capture 06_03 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties   ETHERNET:  EType = IPv6      + ETHERNET: Destination address : 00600852F9D8     + ETHERNET: Source address : 00B0D0234733       ETHERNET: Frame Length : 182 (0x00B6)       ETHERNET: Ethernet Type : 0x86DD       ETHERNET: Ethernet Data: Number of data bytes remaining
= 168 (0x00A8) IP6: Proto = ICMP6; Len = 128 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 128 (0x80) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::2b0:d0ff:fe23:4733 IP6: Destination Address = fe80::260:8ff:fe52:f9d8 IP6: Payload: Number of data bytes remaining = 128 (0x0080) ICMP6: Redirect ICMP6: Type = 137 (Redirect) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x76D4 ICMP6: Reserved ICMP6: Target Address = fe80::2b0:d0ff:fe23:4735 ICMP6: Destination Address = 3000::1 ICMP6: Redirected Packet: Number of data bytes remaining
= 88 (0x0058) ICMP6: Type = 4 (0x4) ICMP6: Length = 11 (0xB) ICMP6: Reserved ICMP6: Redirected Packet: Number of data bytes remaining
= 80 (0x0050)

Summary of Neighbor Discovery Messagesand Options

Table 6-2 lists each ND message and the options that might be included with the message.

Table 6-2. ND Messages and the Optionsthat might be Included

ND Message ND Options that Might be Included

Router Solicitation

Source Link-Layer Address option: Used to inform the router of the link-layer address of the host for the unicast Router Advertisement response.

Router Advertisement

Source Link-Layer Address option: Used to inform the receiving host(s) of the link-layer address of the router.

Prefix Information option(s): Used to inform the receiving host(s) of on-link prefixes and whether to autoconfigure stateless addresses.

MTU option: Used to inform the receiving host(s) of the IPv6 MTU of the link.

Advertisement Interval option: Used to inform the receiving host how often the router (the home agent) is sending unsolicited multicast router advertisements.

Home Agent Information option: Used to advertise the home agent's preference and lifetime.

Route Information option(s): Used to inform the receiving host(s) of specific routes to add to a local routing table.

Neighbor Solicitation

Source Link-Layer Address option: Used to inform the receiving node of the link-layer address of the sender.

Neighbor Advertisement

Target Link-Layer Address option: Used to inform the receiving node(s) of the link-layer address corresponding to the Target Address field.

Redirect

Redirected Header option: Used to include all or a portion of the packet that was redirected.

Target Link-Layer Address option: Used to inform the receiving node(s) of the link-layer address corresponding to the Target Address field.



Understanding IPv6
Understanding Ipv6
ISBN: 0735612455
EAN: 2147483647
Year: 2005
Pages: 124
Authors: Joseph Davies

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net