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

Chapter 6 Neighbor Discovery

145

Redirect

The Redirect message is sent by an IPv6 router to inform an originating host of a better firsthop 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, you will find the following settings:

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, you will find these settings:

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-16 shows the structure of the Redirect message.

Type

= 137

Code

= 0

Checksum

 

Reserved

 

Target Address

 

Destination Address

Options

• • •

Figure 6-16 The structure of the Redirect message

The following list describes the fields in the Redirect message:

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

146 Understanding IPv6, Second Edition

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.

The options that can be present in a Redirect message are the following:

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

Network Monitor Capture

Here is an example of 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

Summary of Neighbor Discovery Messages and Options

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

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