Neighbor Discovery
IPv6 Neighbor Discovery (ND)
�橐恍�
messages
的集合
,
其功用主要是用��Q定在同一��
link
上相�的
node.
ND
取代了在
IPv4
中的
ARP, ICMP, Router Discovery,
和
ICMP Redirect,
�K且提供了一些�~外的功能
.
Neighbor Discovery Message Format
ND
�息�裼�
ICMPv6
�息�Y��
,
和
ICMPv6 type 133
到
137. ND
�息包含一��
ND
�息�祟^
,
包含一��
ICMPv6
�祟^和
ND
�息�Y料
,
以及零��或多��
ND options.
如下�D
.
the
format of a Neighbor Discovery message
此外
ND messages
包含五��不同的功能
Ø
Router Solicitation
Ø
Router Advertisement
Ø
Neighbor Solicitation
Ø
Neighbor Advertisement
Ø
Redirect
ND messages options
提供一些�~外的�Y�
,
包含
MAC address,
在此
link
上的
prefix and MTU
�Y�
,
以及
redirection data.
此外所有的
ND messages are sent with a hop limit of 255.
��一��
ND message
被接受到�r
,
在
IPv6
封包�谖恢械�
hop limit
�谖��先被�z查
,
若此值不是
255
�r�t�G��
. (
但�楹卧O��
255,
�K不是很清楚),
以下便��Υ宋宸N
messages
分�e做�f明
Neighbor Solicitation
此�息是被用�戆l�F在相同
link
上的
IPv6 node
的
link-layer address.
它包含了�l送者的
link-layer address. Typical
Neighbor Solicitation are multicast for address resolution and unicast when the reachability of a neighboring node is being
Verified
�e例�f明
,
��此
link
��
ethernet
, in the Ethernet header of the Neighbor Solicitation message
Ø
在�碓次恢�谖�榘l送者的�W路卡的
MAC address
Ø
��於
multicast Neighbor Solicitation
而言
,
目的位址�谖��
Etherner
MAC address that corresponds to the solicited
-node Multicast address of the target.
��於
unicast
Neighbor Solicitation
而言
,
目地位址�橄懔�
node
的
MAC address
In the IPv6 header of the Neighbor Solicitation message
Ø
�碓次恢�榘l送者的
IPv6 address
Ø
��於
multicast Neighbor Solicitation
而言
,
目的位址�谖��
solicited-node Multicast address of the target.
��於
unicast
Neighbor Solicitation
而言
,
目地位址�谖��
unicast
or anycast address of target
Ø
Hop limit field is set to 255
the format of the Neighbor Solicitation message
Checksum --
此�谖��
ICMPv6
的
checksum
Reserved --
此�谖��
32bit,
保留�o未�硎褂们以O��
0
Target Address �C 128bit,
指
IP address of the target
Source Link-Layer Address option �C
包含�l送者的
link-layer address
Neighbor Advertisement
此�N�息��
IPv6 node
��接收到
Neighbor Solicitation message
�r所做的回��
.
一��
IPv6 node
也���l送
unsolicited Neighbor
Advertisements
告知�近的
node
其
link-layer address
已改�
�e例�f明
,
假�O
local link
��
ethernet
, in the Ethernet header of the Neighbor Advertisement message
Ø
�碓次恢�谖�榘l送�@�W路介面的
MAC address
Ø
��
solicited Neighbor Advertisement
而言其目地位址�橐婚_始�l送
Neighbor Solicitation message
的
node
的
unicast
MAC address
��
an unsolicited Neighbor Advertisement
而言其目地位址��
33-33-00-00-00-01, the Ethernet MAC address
corresponding
to the link-Local scope all-nodes multicast address
In the IPv6 header of the Neighbor Advertisement message
Ø
�碓次恢�榘l送者介面的
link-local address
Ø
��
solicited Neighbor Advertisement
而言其目地位址�橐婚_始�l送
Neighbor Solicitation message
的
node
的
unicast
IP
address
��
an unsolicited Neighbor Advertisement
而言其目地位址��
link-local scope all-nodes multicast address (FF02::1)
Ø
Hop limit field is set to 255
Address Resolution
The address resolution process for IPv6 nodes consists of an exchange of Neighbor Solicitation and Neighbor Advertisement
messages
to resolve the link-layer address of the on-link next-hop address for a given destination. The sending host sends a
multicast
Neighbor Solicitation message on the appropriate interface. The multicast address of the Neighbor Solicitation message
is
the solicited-node multicast
address derived from the target IP address. The Neighbor Solicitation message includes the link-layer
address
of the sending host in the Source
Link-Layer Address option. For information on how a host determines the next-hop
address
for a destination, see “Host Sending Algorithm.
When the target host receives the Neighbor Solicitation message, it updates its own neighbor cache based on the source address
of
the
Neighbor Solicitation message and the link-layer address in the Source Link-Layer Address option. Next, the target node sends
a
unicast
Neighbor Advertisement to the Neighbor Solicitation sender. The Neighbor Advertisement includes the Target Link-Layer
Address
option.
After receiving the Neighbor Advertisement from the target, the sending host updates its neighbor cache with an entry
for
the target
based upon the information in the Target Link-Layer Address option. At this point, unicast IPv6 traffic between the sending
host
and the target of the Neighbor
Solicitation can be sent.
Address Resolution Example :
Host A has an Ethernet MAC address of 00-AA- 00-11-11 -11 and a corresponding link-local address of FE80::2AA:FF:FE11:1111.
Host B has an Ethernet MAC address of 00-AA-00-22-22-22 and a corresponding link-local address of FE80::2AA:FF:FE22:2222. To
send
a packet to Host B, Host A must use address resolution to resolve Host B’s link-layer address.Based on Host B’s IP address,
Host A sends a solicited
-node multicast Neighbor Solicitation to the address of FF02::1:FF22:2222
.
Host B, having registered the solicited-node multicast address of 33-33-FF-22-22-22 with its Ethernet adapter, receives and processes
the
Neighbor
Solicitation. Host B responds with a unicast Neighbor Advertisement message
.