Neighbor Discovery Options

ND options are formatted in type-length-value (TLV) format. Figure 6-2 shows the TLV format.

Figure 6-2. The TLV format for ND options

The 8-bit Type field indicates the type of ND option. Table 6-1 lists the ND option types defined in RFC 2461, the Internet draft titled "Mobility Support in IPv6," and the Internet draft titled "Default Router Preferences and More-Specific Routes."

Table 6-1. IPv6 ND Option Types

Type Option Name Source Document

1

Source Link-Layer Address

RFC 2461

2

Target Link-Layer Address

RFC 2461

3

Prefix Information

RFC 2461

4

Redirected Header

RFC 2461

5

MTU

RFC 2461

7

Advertisement Interval

"Mobility Support in IPv6" draft

8

Home Agent Information

"Mobility Support in IPv6" draft

9

Route Information

"Default Router Preferences and More-Specific Routes" draft

The 8-bit Length field indicates the length of the entire option in 8-byte blocks. All ND options must fall on 8-byte boundaries. The variable length Value field contains the data for the option.

Source and Target Link-Layer Address Options

The Source Link-Layer Address option indicates the link-layer address of the ND message sender. The Source Link-Layer Address option is included in the Neighbor Solicitation, Router Solicitation, and Router Advertisement messages. The Source Link-Layer Address option is not included when the source address of the ND message is the unspecified address (::).

Figure 6-3 shows the structure of the Source Link-Layer Address option.

Figure 6-3. The structure of the Source Link-Layer Address option

The Target Link-Layer Address option indicates the link-layer address of the neighboring node to which IPv6 packets should be directed. The Target Link-Layer Address option is included in the Neighbor Advertisement and Redirect messages.

Figure 6-4 shows the structure of the Target Link-Layer Address option.

Figure 6-4. The structure of the Target Link-Layer Address option

The Source Link-Layer Address option and the Target Link-Layer Address option have the same format.

The Type field is set to 1 for a Source Link-Layer Address option and 2 for a Target Link-Layer Address option. The Length field is set to the number of 8-byte blocks in the entire option. The Link-Layer Address field is a variable-length field that contains the link-layer address of the source or target. Each link layer defined for IPv6 must specify the way in which the link-layer address is formatted in the Source and Target Link-Layer Address options.

For example, RFC 2464 defines how IPv6 packets are sent over Ethernet networks. It also includes the format of the Source and Target Link-Layer Address ND options. For Ethernet, the link-layer address is 48-bits (6-bytes) in length. Figure 6-5 shows the Target Link-Layer Address option for Ethernet.

Figure 6-5. The Target Link-Layer Address option for Ethernet

Network Monitor Capture

Here is an example of a Source Link-Layer Address option used in 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  + IP6: Proto = ICMP6; Len = 32   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 

Prefix Information Option

The Prefix Information option is sent in Router Advertisement messages to indicate both address prefixes and information about address autoconfiguration. There can be multiple Prefix Information options included in a Router Advertisement message, indicating multiple address prefixes.

Figure 6-6 shows the structure of the Prefix Information option.

Figure 6-6. The structure of the Prefix Information option

The fields in the Prefix Information option are:

  • Type

    The value of this field is 3.

  • Length

    The value of this field is 4. (The entire option is 32 bytes in length.)

  • Prefix Length
  • The Prefix Length field indicates the number of leading bits in the Prefix field that comprise the address prefix. The size of this field is 8 bits. The Prefix Length field has a value from 0 through 128. Because typical prefixes advertised are for subnet identifiers, the Prefix Length field is usually set to 64.
  • On-link flag

    The On-link flag indicates, when set to 1, that the addresses implied by the included prefix are available on the link on which this Router Advertisement message was received. When set to 0, it is not assumed that the addresses that match the prefix are available on-link. The size of this field is 1 bit.

  • Autonomous flag

    The Autonomous flag indicates, when set to 1, that the included prefix is used to create an autonomous (or stateless) address configuration. When set to 0, the included prefix is not used to create a stateless address configuration. The size of this field is 1 bit.

  • Router Address flag

    The Router Address flag indicates, when set to 1, that the Prefix field also contains an IPv6 address assigned to the sending router. The Router Address flag and the included prefix allow a receiving mobile node to discover the global address(es) of its home agent (the sending router). The size of this field is 1 bit. This flag is described in the Internet draft titled "Mobility Support in IPv6."

  • Site Prefix flag

    The Site Prefix flag indicates, when set to 1, that the site prefix defined by the Prefix field and the Site Prefix Length field be used to update the site prefix table. The site prefix table is maintained by the host and is utilized to prefer the use of site-local addresses when a global address matches a site prefix. This flag is described in the Internet draft titled "Site Prefixes in Neighbor Discovery."

  • Reserved1

    The Reserved1 field is a 4-bit field reserved for future use and set to 0.

  • Valid Lifetime

    The Valid Lifetime field indicates the number of seconds that an address, based on the included prefix and using stateless address configuration, remains valid. The size of this field is 32 bits. The Valid Lifetime field also indicates the number of seconds that the included prefix is valid for on-link determination. For an infinite valid lifetime, the Valid Lifetime field is set to 0xFFFFFFFF.

  • Preferred Lifetime

    The Preferred Lifetime field indicates the number of seconds that an address, based on the included prefix and using stateless address autoconfiguration, remains in a preferred state. The size of this field is 32 bits. Stateless autoconfiguration addresses that are still valid are either in a preferred or deprecated state. In the preferred state, the address can be used for unrestricted communication. In the deprecated state, the use of the address is not recommended for new communications. However, existing communications using a deprecated address can continue. An address goes from the preferred state to the deprecated state when its preferred lifetime expires. For an infinite preferred lifetime, the Preferred Lifetime field is set to 0xFFFFFFFF.

  • Reserved2

    The Reserved2 field is a 24-bit field reserved for future use and set to 0.

  • Site Prefix Length

    The Site Prefix Length field indicates the number of leading bits in the Prefix field that define a site prefix. The length of this field is 8 bits. This field is significant only if the Site Prefix flag is set to 1. This field is described in the Internet draft titled "Site Prefixes in Neighbor Discovery."

  • Prefix

    The Prefix field indicates the prefix for the IPv6 address derived through stateless autoconfiguration. The size of this field is 128 bits. Bits in the Prefix field—up to a count equaling the value of the Prefix Length field—are significant for creating the prefix. The combination of the Prefix Length field and the Prefix field unambiguously defines the prefix which, when combined with the interface identifier for the node, creates an IPv6 address. The link-local prefix should not be sent and is ignored by the receiving host.

Network Monitor Capture

Here is an example of a Prefix Information option used in 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   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: Type = 3 (0x3)           ICMP6: Length = 4 (0x4)           ICMP6: Prefix Length = 64 (0x40)           ICMP6: 0....... = No on-link specification           ICMP6: .0...... = Not autonomous address config           ICMP6: ..0..... = No router address           ICMP6: ...0.... = Not a site prefix           ICMP6: .......1 = Route prefix provided           ICMP6: Valid Lifetime = 4294967295 (0xFFFFFFFF)           ICMP6: Preferred Lifetime = 4294967295 (0xFFFFFFFF)           ICMP6: Reserved           ICMP6: Site Prefix Length = 0 (0x0)           ICMP6: Prefix = fec0:0:0:2::     + ICMP6: Prefix = fec0:0:0:1:: 

Redirected Header Option

The Redirected Header option is sent in Redirect messages to specify the IPv6 packet that caused the router to send a Redirect message. It can contain all or part of the redirected IPv6 packet, depending on the size of the IPv6 packet that was initially sent.

Figure 6-7 shows the structure of the Redirected Header option.

Figure 6-7. The structure of the Redirected Header option

The fields in the Redirected Header option are:

  • Type

    The value of this field is 4.

  • Length

    The value of this field is the number of 8-byte blocks in the entire option.

  • Reserved

    The Reserved field is a 48-bit field reserved for future use and set to 0.

  • Portion of redirected packet

    This field contains either the IPv6 packet or a portion of the IPv6 packet that caused the Redirect message to be sent. The amount of the original packet that is included is the leading portion of the packet so that the entire Redirect message is no more than 1,280 bytes in length.

Network Monitor Capture

Here is an example of a Redirected Header option used in 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  + IP6: Proto = ICMP6; Len = 128   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 = 80 (0x50)           ICMP6: Type = 4 (0x4)           ICMP6: Length = 11 (0xB)           ICMP6: Reserved           ICMP6: Redirected Packet: Number of data bytes remaining =                  80 (0x0050) 

MTU Option

The MTU option is sent in Router Advertisement messages to indicate the IPv6 MTU of the link. This option is typically used when the IPv6 MTU for a link is not well known or needs to be set due to a translational or mixed-media bridging configuration. The MTU option overrides the IPv6 MTU reported by the interface hardware.

In bridged or Layer-2 switched environments, it is possible to have different link-layer technologies with different link-layer MTUs on the same link. In this case, differences in IPv6 MTUs between nodes on the same link arenot detected through Path MTU Discovery. The MTU option is used toindicate the highest IPv6 MTU supported by all link-layer technologies on the link.

Figure 6-8 shows a switched configuration where the MTU option is used to solve a mixed media problem.

Figure 6-8. A mixed media configuration

Two IPv6 hosts, Host A and Host B, are connected to two different Ethernet (Layer 2) switches using FDDI ports. The two switches are connected by an Ethernet backbone. When Host A and Host B negotiate a TCP connection, each reports a TCP maximum segment size of 4,312 (the FDDI IPv6 MTU of 4,352, minus 40 bytes of IPv6 header). However, when TCP data on the connection begins to flow, the switches silently discard IPv6 packets larger than 1,500 bytes that are sent between Host A and Host B.

With the MTU option, the router for the network segment (not shown) reports an IPv6 MTU of 1,500 in the Router Advertisement message for all hosts on the link. When both Host A and Host B adjust their IPv6 MTU from 4,352 to 1,500, maximum-sized TCP segments sent between them are not discarded by the intermediate switches.

Figure 6-9 shows the structure of the MTU option.

Figure 6-9. The structure of the MTU option

The fields in the MTU option are:

  • Type

    The value of this field is 5.

  • Length

    The value of this field is 1. (There are 8 bytes in the entire option.)

  • Reserved

    The Reserved field is a 16-bit field reserved for future use and set to 0.

  • MTU

    The MTU field indicates the IPv6 MTU that should be used by the host for the link on which the Router Advertisement was received. The size of this field is 32 bits. The value in the MTU field is ignored if it is larger than the link MTU.

Network Monitor Capture

Here is an example of an MTU option used in 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   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: Type = 5 (0x5)           ICMP6: Length = 1 (0x1)           ICMP6: Reserved           ICMP6: MTU = 1500 (0x5DC)     + ICMP6: Prefix = fec0:0:0:2::     + ICMP6: Prefix = fec0:0:0:1:: 

Advertisement Interval Option

The Advertisement Interval option is sent in Router Advertisement messages to specify the interval at which the router (acting as a home agent) sends unsolicited multicast router advertisements. The Advertisement Interval option is described in the Internet draft titled "Mobility Support in IPv6."

Figure 6-10 shows the structure of the Advertisement Interval option.

Figure 6-10. The structure of the Advertisement Interval option

The fields in the Advertisement Interval option are:

  • Type

    The value of this field is 7.

  • Length

    Because the size of the entire option is fixed at 8 bytes, the value in the Length field is always set to 1.

  • Reserved

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

  • Advertisement Interval

    The Advertisement Interval field specifies the maximum time in milliseconds between consecutive unsolicited multicast Router Advertisement messages to be sent by the home agent. The size of this field is 32 bits.

Home Agent Information Option

The Home Agent Information option is sent in Router Advertisement messages sent by a home agent to specify the home agent's configuration. The Home Agent Information option is described in the Internet draft titled "Mobility Support in IPv6."

Figure 6-11 shows the structure of the Home Agent Information option.

Figure 6-11. The structure of the Home AgentInformation option

The fields in the Home Agent Information option are:

  • Type

    The value of this field is 8.

  • Length

    Because the size of the entire option is fixed at 8 bytes, the value of this field is always set to 1.

  • Reserved

    The Reserved field is a 16-bit field reserved for future use and set to 0.

  • Home Agent Preference

    The Home Agent Preference field indicates the preference for the sending home agent. The preference is used in ordering addresses returned to a mobile node by the home agent. The size of this field is 16 bits.

  • Home Agent Lifetime

    The Home Agent Lifetime field indicates the lifetime of the home agent in seconds. The size of this field is 16 bits.

Route Information Option

The Route Information option is sent in Router Advertisement messages to specify individual routes for receiving hosts to add to their local routing table. The Route Information option is described in the Internet draft titled "Default Route Preferences and More-Specific Routes."

Figure 6-12 shows the structure of the Route Information option.

Figure 6-12. The structure of the Route Information option

The fields in the Route Information option are:

  • Type

    The value of this field is 9.

  • Length

    The value of the Length field depends on the prefix length of the route and the corresponding size of the Prefix field. If the prefix length is 0 (and there is no Prefix field), the value of the Length field is 1. If the prefix length is greater than 0 and less than 65, the length of the Prefix field is 64 bits and the value of the Length field is 2. If the prefix length is greater than 64, the length of the Prefix field is 128 bits and the value of the Length field is 3.

  • Prefix Length

    The Prefix Length field indicates the number of leading bits in the Prefix field that are significant for the route. Valid values range from 0 to 128. The size of this field is 8 bits.

  • Reserved1

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

  • Preference

    The Preference field indicates the level of preference for this route as sent from the advertising router. If multiple routers advertise the same prefix using a Route Information option, you can configure the routers so that they advertise the route with different preference levels. Valid values in binary are 01 (High), 00 (Medium), and 11 (Low). The size of this field is 2 bits.

  • Reserved2

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

  • Route Lifetime

    The Route Lifetime field indicates the amount of time in seconds that the prefix is valid for route determination. The size of this field is 32 bits. For an infinite route lifetime, the Route Lifetime field is set to 0xFFFFFFFF.

  • Prefix

    The Prefix field indicates the route prefix. The size of the Prefix field can be 0, 64, or 128 bits depending on the value of the Prefix Length field. If the prefix length is 0, the size of the Prefix field is 0. If the prefix length is greater than 0 and less than 65, the size of the Prefix field is 64 bits. If the prefix length is greater than 64, the size of the Prefix field is 128 bits. The prefix length indicates the number of high-order bits in the prefix that are relevant for route determination. All bits in the Prefix field past the prefix length must be set to 0.

A typical use of the Route Information option is to enable hosts to make better forwarding decisions when sending data. Figure 6-13 shows a simple network configuration where the Route Information option can be useful.

Figure 6-13. An example configuration in which the RouteInformation option is used

Without the Route Information option, you would typically configure the routers so that only Router 1 advertises itself as a default router on Subnet 1. Hosts on Subnet 1 sending traffic to hosts on Subnet 2 would have to rely on Redirect messages from Router 1 to inform them that the best next-hop address to reach hosts on Subnet 2 is actually Router 2. For more information, see "Redirect Function" in this chapter.

Using the Route Information option, Router 2 is configured to advertise the prefix of Subnet 2. Upon receipt of router advertisements from both routers, hosts on Subnet 1 automatically add a default route with Router 1 as its next-hop address and a specific route for the Subnet 2 prefix with Router 2 as its next-hop address. Now, all the hosts on Subnet 2 are reachable by hosts on Subnet 1 without having to rely on redirects from Router 1.



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

Similar book on Amazon

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