Understanding Ipv6

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:

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:

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:

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:

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:

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:

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.

Категории