Neighbor Discovery
精选 转载Neighbor Discovery
IPv6 Neighbor Discovery (ND)為一些messages的集合,其功用主要是用來決定在同一個link上相鄰的node.
ND取代了在IPv4中的ARP, ICMP, Router Discovery,和ICMP Redirect,並且提供了一些額外的功能.
Neighbor Discovery Message Format
ND訊息採用ICMPv6訊息結構,和ICMPv6 type 133到137. ND訊息包含一個ND訊息標頭,包含一個ICMPv6
標頭和ND訊息資料,以及零個或多個ND options.如下圖.
the format of a Neighbor Discovery message
此外ND messages包含五個不同的功能
Ø Router Solicitation
Ø Router Advertisement
Ø Neighbor Solicitation
Ø Neighbor Advertisement
Ø Redirect
ND messages options提供一些額外的資訊,包含MAC address, 在此link上的prefix and MTU資訊,以及redirection data.
此外所有的ND messages are sent with a hop limit of 255. 當一個ND message被接受到時,在IPv6封包欄位中的hop limit
欄位會先被檢查,若此值不是255時則丟棄. (但為何設為255,並不是很清楚), 以下便針對此五種messages分別做說明
Neighbor Solicitation
此訊息是被用來發現在相同link上的IPv6 node的link-layer address.它包含了發送者的link-layer address. Typical
Neighbor Solicitation are multicast for address resolution and unicast when the reachability of a neighboring node is being
Verified
舉例說明,當此link為ethernet, in the Ethernet header of the Neighbor Solicitation message
Ø 在來源位址欄位為發送者的網路卡的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
Ø 來源位址為發送者的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,保留給未來使用且設為0
Target Address – 128bit,指IP address of the target
Source Link-Layer Address option – 包含發送者的link-layer address
Neighbor Advertisement
此種訊息為IPv6 node當接收到Neighbor Solicitation message時所做的回應. 一個IPv6 node也會發送unsolicited Neighbor
Advertisements告知鄰近的node其link-layer address已改變
舉例說明,假設local link為ethernet, in the Ethernet header of the Neighbor Advertisement message
Ø 來源位址欄位為發送這網路介面的MAC address
Ø 對solicited Neighbor Advertisement而言其目地位址為一開始發送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
Ø 來源位址為發送者介面的link-local address
Ø 對solicited Neighbor Advertisement而言其目地位址為一開始發送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.
上一篇:perl 字符串操作
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
IPv6 NDP—Neighbor discovery protocol 结构
该文章会介绍一下NDP协议的架构,分别是基于什么原理来进行工作的,这个文章只是一个brief,目的是建立一个基本的框架,后期我会慢慢的对每一个子协议进行分解的
休闲 IPv6 NDP NDP 协议 NDP 结构 NDP 原理