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

140Understanding IPv6, Second Edition

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

Advertisement Interval option For more information, see Appendix F.

Home Agent Information option For more information, see Appendix F.

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 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: Code: 0 (0x0)

Checksum: 8095 (0x1F9F)

CurHopLimit: 0 (0x0)

-RouterAdvertisementFlag:

M:(0.......) Not managed address configuration

O:(.0......) Not other stateful configuration

A: (..0.....) Not a Mobile IP Home Agent

RouterPreference: (...00...) Medium,0(0x0)

Reserved: (.....000)

RouterLifetime: 0 (0x0)

ReachableTime: 0 (0x0)

RetransTimer: 0 (0x0)

+SourceLinkLayerAddress:

+MTU:

+PrefixInformation:

+PrefixInformation:

Neighbor Solicitation

IPv6 nodes send the Neighbor Solicitation message to discover the link-layer address of an on-link IPv6 node or to confirm a previously determined link-layer address. 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, you will find the following settings:

The Source Address field is set to the MAC address of the sending network adapter.

Chapter 6 Neighbor Discovery

141

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

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 solicitednode 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-14 shows the structure of the Neighbor Solicitation message.

Type

Code

Checksum

Reserved

Target Address

Options

Figure 6-14

= 135

= 0

• • •

The structure of the Neighbor Solicitation message

The fields in the Neighbor Solicitation message are as follows:

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.

142 Understanding IPv6, Second Edition

Network Monitor Capture

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

Frame:

-Ethernet: Etype = IPv6

+DestinationAddress: 3333FF 026EA5

+SourceAddress: 00105A AA20A2 EthernetType: IPv6, 34525(0x86dd)

-Ipv6: Next Protocol = ICMPv6, Payload Length = 32

+Versions: IPv6, Internet Protocol, DSCP 0 PayloadLength: 32 (0x20)

NextProtocol: ICMPv6, 58(0x3a) HopLimit: 255 (0xFF)

SourceAddress: FE80:0:0:0:210:5AFF:FEAA:20A2 DestinationAddress: FF02:0:0:0:0:1:FF02:6EA5

-Icmpv6: Neighbor Solicitation, Target = FE80:0:0:0:260:97FF:FE02:6EA5

MessageType: Neighbor Solicitation, 135(0x87)

-NeighborSolicitation: Code: 0 (0x0) Checksum: 3893 (0xF35) Reserved: 0 (0x0)

TargetAddress: FE80:0:0:0:260:97FF:FE02:6EA5

-SourceLinkLayerAddress:

Type: Source Link-Layer Address, 1(0x1)

Length: 1, in unit of 8 octets

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, 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, for a solicited Neighbor Advertisement, to the unicast MAC address of the initial Neighbor Solicitation sender. For an unsolicited Neighbor

Chapter 6 Neighbor Discovery

143

Advertisement, the Destination Address field is set to 33-33-00-00-00-01, which is the Ethernet MAC address corresponding to the link-local scope all-nodes multicast address.

In the IPv6 header of the Neighbor Advertisement message, you will find these settings:

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-15 shows the structure of the Neighbor Advertisement message.

Type

= 136

Code

= 0

Checksum

 

Router Flag

 

Solicited Flag

 

Override Flag

 

Reserved

 

Target Address

 

Options

• • •

 

Figure 6-15 The structure of the Neighbor Advertisement message

The following list describes the fields in the Neighbor Advertisement message:

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

144 Understanding IPv6, Second Edition

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

Frame:

+ Ethernet: Etype = IPv6

-Ipv6: Next Protocol = ICMPv6, Payload Length = 32

+Versions: IPv6, Internet Protocol, DSCP 0 PayloadLength: 32 (0x20)

NextProtocol: ICMPv6, 58(0x3a) HopLimit: 255 (0xFF)

SourceAddress: FE80:0:0:0:260:97FF:FE02:6EA5 DestinationAddress: FE80:0:0:0:210:5AFF:FEAA:20A2

-Icmpv6: Neighbor Advertisement, Target = FE80:0:0:0:260:97FF:FE02:6EA5

MessageType: Neighbor Advertisement, 136(0x88)

-NeighborAdvertisement: Code: 0 (0x0)

Checksum: 35244 (0x89AC)

-NeighborAdvertisementFlag: 1610612736 (0x60000000)

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

S:(.1..............................) Solicited

O:

(..1

.............................)

Override

Rsv:

(...

00000000000000000000000000000)

 

TargetAddress: FE80:0:0:0:260:97FF:FE02:6EA5

+ TargetLinkLayerAddress:

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