Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
51
Добавлен:
11.04.2015
Размер:
22.9 Mб
Скачать

130 Understanding IPv6, Second Edition

+ RouterAdvertisement:

- SourceLinkLayerAddress:

Type: Source Link-Layer Address, 1(0x1) Length: 1, in unit of 8 octets

Address: 00-B0-D0-23-47-33

+MTU:

+PrefixInformation: - PrefixInformation:

Type: Prefix Information, 3(0x3) Length: 4, in unit of 8 octets PrefixLength: 64 (0x40)

-Flags: 192 (0xC0)

L:(1.......) On-Link determination allowed

A:(.1......) Autonomous address-configuration

R:(..0.....) Not router Address

S:(...0....) Not a site prefix

P: (....0...) Not a router prefix

Rsv: (.....000)

ValidLifetime: 4294967295 (0xFFFFFFFF)

PreferredLifetime: 4294967295 (0xFFFFFFFF)

Reserved: 0 (0x0)

Prefix: FD43:2DA1:3FE9:2:0:0:0:0

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.

Type = 4

Length

Reserved

Portion of Redirected Packet

• • •

Figure 6-7 The structure of the Redirected Header option

The following list describes the fields in the Redirected Header option:

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 1280 bytes in length.

Chapter 6 Neighbor Discovery

131

Network Monitor Capture

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

Frame:

+Ethernet: Etype = IPv6

+Ipv6: Next Protocol = ICMPv6, Payload Length = 128

- Icmpv6: Redirect, Target = FE80:0:0:0:2B0:D0FF:FE23:4735

MessageType: Redirect, 137(0x89)

-Redirect: Code: 0 (0x0)

Checksum: 31003 (0x791B) Reserved: 0 (0x0)

TargetAddress: FE80:0:0:0:2B0:D0FF:FE23:4735 DestAddress: 2001:DB8:0:0:0:0:0:1

-RedirectedHeader:

Type: Redirected Header, 4(0x4)

Length: 11, in unit of 8 octets

Reserved: 0

(0x0)

 

 

- InvokingPacket: Next Protocol = ICMPv6, Payload Length = 40

- Versions: IPv6, Internet Protocol, DSCP 0

Version:

(0110

............................

) IPv6, Internet Protocol,

6(0x6)

 

 

 

DSCP:

(....

000000......................

) Differentiated services

codepoint 0

 

 

ECT:

(..........

0.....................

) ECN-Capable Transport not

set

 

 

 

CE:

(...........

0....................

) ECN-CE not set

FlowLabe:

(............

 

00000000000000000000) 0

PayloadLength: 40 (0x28)

NextProtocol: ICMPv6, 58(0x3a)

HopLimit: 128 (0x80)

SourceAddress: FE80:0:0:0:260:8FF:FE52:F9D8

DestinationAddress: 3000:0:0:0:0:0:0:1

OriginalIPPayload: Binary Large Object (40 Bytes)

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 because of 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 are not detected through Path MTU Discovery. The MTU option is used to indicate the highest IPv6 MTU supported by all link-layer technologies on the link.

132 Understanding IPv6, Second Edition

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

Host A

Ethernet Switch

IPv6 Router

FDDI

Ethernet

Backbone

FDDI

Rest of IPv6 Network

Ethernet Switch

Host B

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 Fiber Distributed Data Interface (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 4312 (the FDDI IPv6 MTU of 4352, minus 40 bytes of the IPv6 header). However, when TCP data on the connection begins to flow, the switches silently discard IPv6 packets larger than 1500 bytes that are sent between Host A and Host B.

With the MTU option, the IPv6 router for the subnet reports an IPv6 MTU of 1500 in the Router Advertisement message for all hosts on the link. When both Host A and Host B adjust their IPv6 MTU from 4352 to 1500, maximum-sized TCP segments sent between them are not discarded by the intermediate switches.

Note FDDI is an older technology whose use has been made obsolete by 100-Mbps Ethernet. This configuration is unlikely to be used on modern networks and serves only as an example of a mixed-media subnet.

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

Type = 5

Length = 1

Reserved

MTU

Figure 6-9 The structure of the MTU option

The following list describes the fields in the MTU option:

Type The value of this field is 5.

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

Chapter 6 Neighbor Discovery

133

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 3.1 (capture 06_02 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

Frame:

+Ethernet: Etype = IPv6

+Ipv6: Next Protocol = ICMPv6, Payload Length = 96 - Icmpv6: Router Advertisement

MessageType: Router Advertisement, 134(0x86)

+ RouterAdvertisement:

- SourceLinkLayerAddress:

Type: Source Link-Layer Address, 1(0x1) Length: 1, in unit of 8 octets

Address: 00-B0-D0-23-47-33 - MTU:

Type: MTU, 5(0x5)

Length: 1, in unit of 8 octets Reserved: 0 (0x0)

MTU: 1500 (0x5DC)

+PrefixInformation:

+PrefixInformation:

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 RFC 4191.

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

Type

= 24

Length

 

Prefix Length

 

Reserved1

 

Preference

 

Reserved2

 

Route Lifetime

Prefix

Figure 6-10 The structure of the Route Information option

134 Understanding IPv6, Second Edition

The fields in the Route Information option are as follows:

Type The value of this field is 24.

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 through 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-11 shows a simple network configuration where the Route Information option can be useful.

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 the “Redirect Function” section in this chapter.

Соседние файлы в папке Lecture 2_10