neighbor discovery in ipv6

合集下载

H3C IPv6邻居发现经典讲义

H3C IPv6邻居发现经典讲义

无表项
有可达表项 获得可达信息
获得可达信息 报文发送 组装报文
地址解析
表项的清除方式
•目的缓存和邻居缓存: 邻居不可达检测机制保证无用表项的删除
没有必要周期性的清除目的和邻居缓存表项。尽管缓存表可能会不正确的保留 有陈旧的表项,但是邻居不可达检测机制能够保证在该不正确的表项被使用时 清除该表项。
•前缀列表和路由器列表:
请求发向单播地址,不打扰其他节点。如果发生变故 将收不到任何响应。
重定向功能
2002::3,把这个 包裹送到2001::1 那里,小心轻放。
2002::3为我提供 长期快递服务 (包月的),给 我媳妇2001::1寄 个包裹啥的也得 找它。
2001::1?让 2002::4送不是 更快?
2002::3,把这个 包裹送到2001::1 那里,小心轻放。
•目的缓存表(Destination Cache)
最近有流量发送的目的地址组成的表项,由重定向报文更新。
•前缀列表(Prefix List)
从路由器公告中接收到的前缀建立的表项,由路由器公告中提取。
•默认路由器列表(Default Router List)
本网段路由器组成的表项,从路由器公告中提取。
Type:4 IP header+data:触发该重定向消息的IP数据包的部分或全部,但要保 证重定向消息报文长度不超过1280字节。
MTU选项
Type:5
Length:1
MTU:链路推荐的MTU值
• • •
• • •
接口应保持的信息
•邻居缓存表(Neighbor Cache)
最近向其发送过流量的邻居组成的表项,由各种ND报文更新。
邻居缓存表

IPv6网络配置

IPv6网络配置

NDP(Neighbor Discovery Protocol,邻居发现协议)是IPv6的一个关键协议,它组合了IPv4中的ARP、ICMP路由器发现和ICMP重定向等协议,并对它们作了改进。

作为IPv6的基础性协议,NDP还提供了前缀发现、邻居不可达检测、重复地址监测、地址自动配置等功能。

1.地址解析:地址解析是一种确定目的节点的链路层地址的方法。

NDP中的地址解析功能不仅替代了原IPv4中的ARP,同时还用邻居不可达检测(NUD)方法来维持邻居节点之间的可达性状态信息。

2.无状态地址配置:NDP中特有的地址自动配置机制,包括一些列相关功能,如路由器发现、接口ID自动生成、重复地址监测等。

通过无状态自动配置机制,链路上的节点可以自动获得IPv6全球单播地址。

a)路由器发现:路由器与其他相连的链路上发布网络参数信息,主机捕获此信息后,可以获得全球单播IPv6地址前缀、默认路由、链路参数(链路MTU)等信息。

b)接口ID自动生成:主机根据EUI-64规范或其他方式为接口自动生成接口标识符。

c)重复地址监测(DAD):根据前缀信息生成或手动配置IPv6地址后,为保证该地址的唯一性,在其可以使用之前,主机需要检验它是否已被链路上的其他节点所使用。

d)前缀重新编址:当网络前缀变化时,路由器在与其相连的链路上发布新的网络参数信息,主机捕获这些新信息后,重新配置前缀、链路MTU等地址相关信息。

3.路由重定向:当在本地链路上存在一个更好的到达目的网络的路由器时,路由器需要通告节点来进行相应配置改变。

NDP定义了5种ICMPv6报文类型,包括RS、RA、NS、NA和Redirect报文,如表2-1所示。

表2-1 ICMPv6报文类型ICMPv6类型消息名称 ICMPv6类型消息名称Type=133 RS(Router Solicitation,路由器请求)Type=136 NA(Neighbor Advertisement,邻居公告)Type=134 RA(Router Advertisment,路由器公告 Type=137 Redirect(重定向报文)Type=135 NS(Neighbor Solicitationh,领居请求)IPv6地址解析地址解析在报文转发过程中具有至关重要的作用。

IPV6 - ND

IPV6 - ND

| Cur Hop Limit |M|O| Reserved |
Router Lifetime
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Reachable Time
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
第5页 共20页
- ICMP 核验有效 - ICMP 的 code 字段为 0 - 所有包含的选项长度大于 0 2)保留字段的内容,以及无法识别的选项,必须丢弃 3)目前在 RA 中定义的选项包含:源链路层地址、前缀消息选项和 MTU 选项 4)通过消息检测的 RA 称为有效通告(valid advertisement)
2.1.4 消息实例
内部传阅
这是一个常见的 RS 消息,包含一个源链路层地址选项,其中的链路层地址等发送接口的链路层地址
第3页 共20页
内部传阅
00:1e:e3:60:27:f2。 ICMP Type 为 133 表示 RS 消息,ICMP Code 为 0,检验和为 correct 表示有效,IP 首部的 Hop Limit

IPv6邻居发现协议

IPv6邻居发现协议
IPv6邻居发现协议
IPv6邻居发现协议
概述 邻居发现协议的消息类型 路由器发现 地址自动配置 地址冲突检测 邻居地址解析
概述
IPv6具有即插即用的特性,而该特性就 是通过邻居发现协议(Neighbor Discovery Protocol, NDP)来实现的。 NDP消息通常应该在链路本地的范围内 收发。因此,封装NDP消息的数据包也始终 使用IPv6链路本地地址,或者链路本地范围 内的多播地址。
路由器发现
路由器通过在相连的链路上周期性地发送 路由器通告消息,表明它的存在并通告配 置的所有参数。大多数情况下在广播链路 上使用。 刚刚连接到某个链路接口的主机需要获得 一份路由器通告消息,以便能够发现链路 上的路由器并学习到链路的参数。因此连 接到链路时,主机会发送一条路由器请求 消息去请求一条路由器通告消息。收到后 将该路由器添加到缺省路由器列表中。
邻居发现协议的消息类型
邻居发现协议(NDP)是在RFC2461中定义的, 为了完成某些功能,它使用ICMPv6协议来 交换一些必要的消息,主要有5种: 路由器通告(Router Advertisement, RA)消息 路由器请求(Router Solicitation, RS)消息 邻居通告(Neighbor Advertisement, NA)消息 邻居请求(Neighbor Solicitation, NR)消息 重定向(Redirect)消息
地址冲突检测
被请求节点的多播地址是由前缀 FF02:0:0:0:0:1:FF00::/104加上目标地址的 最后24位组成。这样做的原因是这个地址 可以匹配该节点自动配置的所有地址。除 此以外,如果两个节点同时对一个地址进 行冲突检测时,它们可以互相检测到。
邻居地址解析

ndp是什么意思

ndp是什么意思

ndp是什么意思ndp全称为Net Domestic Product,表示国内生产净值,即用国内生产总值扣除资本折旧所得到的。

NDP=GDP-资本折旧(Depreciation)。

邻居发现协议(英语:Neighbor Discovery Protocol简称:NDP或ND)是TCP/IP协议栈的一部分,主要与IPv6共同使用。

它工作在网络层,负责在链路上发现其他节点和相应的地址,并确定可用路由和维护关于可用路径和其他活动节点的信息可达性。

拓展资料:ndp的IPv61、网际协议第6版(英文:InternetProtocolversion6,缩写:IPv6)是网际协议(IP)的最新版本,用作互联网的网络层协议,用它来取代IPv4主要是为了解决IPv4地址枯竭问题,不过它也在其他很多方面对IPv4有所改进。

IPv6的设计目的是取代IPv4,然而长期以来IPv4在互联网流量中仍占据主要地位,IPv6的使用增长缓慢。

在2017年7月,通过IPv6使用Google服务的用户百分率首次超过20%。

2、IPv6的计划是创建未来互联网扩充的基础,其目标是取代IPv4,虽然IPv6在1994年就已被IETF指定作为IPv4的下一代标准,由于早期的路由器、防火墙、企业的企业资源计划系统及相关应用程序皆须改写,所以在世界范围内使用IPv6部署的公众网与IPv4相比还非常的少,技术上仍以双架构并存居多。

预计在2025年以前IPv4仍会被支持,以便给新协议的修正留下足够的时间。

3、IPv6能解决的核心问题与互联网所面临的关键问题之间出现了明显的偏差,难以给互联网的发展带来革命性的影响。

与IPv4的各种地址复用解决方案相比,IPv6能够降低复杂性和成本,然而却只有制造商较能够感受到这个优势,用户和运营商无法直接感受到,导致产业链缺乏推动IPv6的动力。

4、互联网控制消息协议第六版即ICMPv6(Internet Control Message Protocol Version 6或ICMP for IPv6)是互联网控制消息协议(ICMP)在IPv6协议下的新版本。

IPv6网络邻居发现概述

IPv6网络邻居发现概述
[Router-Ethernet0/0] ipv6 neighbors max-learningnum number
15
配置RA消息相关参数
取消对RA消息发布的抑制
[Router-Ethernet0/0] undo ipv6 nd ra halt
配置RA消息发布的时间间隔
[Router-Ethernet0/0] ipv6 nd ra interval maxinterval-value min-interval-value
1::2:B/64
Stale Delay Probe Reachable Stale
10
目录
邻居发现协议 地址解析 无状态地址自动配置 ND协议配置
IPv6地址自动配置
有状态地址自动配置
从DHCP服务器获取地址及相关信息
无状态地址配置
根据路由器发布的信息而自动配置IPv6地址及相 关信息
IPv6网络邻居发现概述
技术创新,变革未来
引入
ND(Neighbor Discovery,邻居发现)协议是IPv6 的一个关键协议,它综合了IPv4中的一些协议如 ARP、ICMP路由器发现和ICMP重定向等,并对他 们做了改进。本章介绍了IPv6邻居发现协议中的地 址解析、无状态地址自动配置等重要功能,并对如何 配置ND协议进行了讲解。
Type = 137
Redirect -(重定向消息)
5
目录
邻居发现协议 地址解析 无状态地址自动配置 ND协议配置
IPv6地址解析概述
与IPv4中的地址解析不同,IPv6地址解析包 含了两个过程
解析IPv6地址所对应的链路层地址过程 邻居可达性状态的维护过程,即邻居不可达检测
(NUD)

IPV6 - ND

IPV6 - ND
正文:
介绍
本文主要根据RFC2461,介绍IPV6的邻居发现(NeighborDiscovery,ND)。通过邻居 发现,实现以下功能:
1)包括主机和路由器的节点通过邻居发现来侦测邻居的链路层地址; 2)主机通过邻居发现找到可用的邻近路由器,用以转发数据包; 3)主机通过邻居发现可以实现对邻居的可达性保持跟踪; 4)主机侦测链路层地址的变化; 5)实现无状态地址自动配置;上述的 功能,通过以下消息实现: 1)路由请求(RouterSolicitation) 2)路由通告(RouterAdvertisement) 3)邻居请求(NeighborSolicitation) 4)邻居通告(NeighborAdvertisement)5)重定向消息(RedirectMessage)
1比特,其他状态位,决定是否自动配置除 地址外的其他配置(如NDS)Reserved6比特预 留,置0,接收时忽略RouterLifetime
16比特,与默认路由器相关,如果为0则表示路由器没有默认路由,同时不应该出现在路由列表 中ReachableTime
32比特,以单位为毫秒,用来邻 居可达性检测RetransTimer2比特,以 单位为毫秒,用来地址解析和邻居可 达性检测,是再次发送RS的时间间隔
8比特,RS消息固定为135
8 比特,固定为0
16 比特,校验和
预留,设置为0,被接收者忽 略TargetAddress目标的链路本地 地址,不能是多播地址Options可 选项有:源链路层地址 首部字 段的说明:
-SourceAddressA)发送接口的链路本地地址:地址解析和目的可达性检测B)未指定地址:用 于冲突检测时
展认证首部,消息认证通过-ICMP核验有效-ICMP的code字段为0-所有包含的选项长度大于0-如 果源地址是未指定的地址,那么不能有源链路层地址选项

IPv6邻居发现ND

IPv6邻居发现ND
修改 <1::1, MAC1, Reachable>
RECHEABLETIME以后。。。 修改
<1::1, MAC1, Stale>
Unicast Neighbor Advertisement:[1::2, MAC2]
上层要发送报文 <1::2, 1::1>
Unicast Neighbor Solicitation:[1::1,?],[FE80::,MAC2]
Neighbor Advertisement:[1:;1::1,MAC1, STALE>
修改 <1::1, MAC1, Delay>
修改 <1::1, MAC1,Probe>
16
地址解析示意图
1::1:A/64
1::2:B/64
00E0-FC00-0001
A
NS报文
00E0-FC00-0002
B
源MAC:00E0-FC00-0001;目的MAC:3333-FF02-000B 源IP地址: 1::1:A; 目的IP地址: FF02::1:FF02:B (被请求节点组播地址) 目标地址: 1::2:B 选项: 00E0-FC00-0001(源节点MAC地址)
3
IPv4 和 IPv6 报文头对比
IPv4 报头
Version IHL
Type of Service
Total Length
Identification
Flags
Fragment Offset
Time to Live
Protocol
Header Checksum
Source Address Destination Address Options
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Neighbor Discovery in IPv61.1 IntroductionThe lack of internet (IP) addresses in the Internet community today have forced a development of a new extended addressing protocol, namely IPv6. IPv6 has been developed with an address space of 128 bit as opposed to the older currently used version IPv4 with a 32 bit addressing space. Thereby solving the shortage of IP addresses problem on the Internet. When improving the Internet protocol IP the internet community also made a lot of other additions and improvements that is supported by IPv6. One of these improvements are Neighbor Discovery. In IP and mobile IP version 6 a very important component is Neighbor discovery, some of the features in Neighbor discovery are new others are renamed and altered compared to the earlier version of IP (IPv4).1.1.2 Neighbor discovery is used by nodes to:Determine the link-layer addresses for neighboring nodes (nodes residing on the same link) and quickly remove cached values we they become invalid.Find routers willing to forward their packets, that is acting as a default router.Keep track of which nodes are reachable and on which path they can be reached.1.1.3 Functions in Neighbor discoveryTo do this a number of functions are introduced:Router discovery: How to locate routers on the link.Prefix discovery: How to determine the network prefixes on the link. The prefixes are used to distinguish between nodes on the same link as node(neighbors) and nodes reached through a router.Parameter discovery: To find link parameters such as MTU, the value to put in the hop limit field.Address resolution: To determine neighbors link-layer address given its IP address.Next-hop determination: To decide next hop for packets going through a router.Neighbor unreachability detection: To detect that a neighbor no longer is reachable.Duplicate Address Detection: To determine that a nodes address is unique.Redirect: When a router informs the node of the better next hop.1.1.4 ICMP types providing the Neighbor discovery functionsThe neighbor functions are provided using five different ICMP (version 6) message types:Router solicitations: Requests from host to a router for router advertisements.Router advertisements: For routers to advertise their presence and parameters.Neighbor solicitations: To determine the link-layer address of a neighbor, to determine if the neighbor is still reachable and to detect duplicate addresses.Neighbor Advertisement: for nodes to announce their link-layer address.Redirect: For routers to inform hosts of better next hop.2.1 Requirements on hostsAll these features set requirements on the hosts. They are required to have a Neighbor cache, destination cache, a prefix list and a default router list.2.1.2 The Neighbor cacheThe Neighbor cache must have a set of entries about the neighbors such as their link-layer address, IP addresses, a flag indicating if the node is a router or a host, a pointer to queued packets waiting for the Address Resolution to complete. It also contains information regarding nodes reachability state, numbers of unanswered probes and next time a Neighbor Unreachability Detection is to take place.Each entry in this cache must have one of 5 different sates, stated below. These states will help the node to keep track of the status of each neighbor. Each entry also contains a timer so that old values change state when no update has occurred for a while.The different states in the neighbor cache are:Incomplete: The address resolution is in progress trying to obtain the link-layer Address Reachable: The entry is complete, the node is assumed reachable.Stale: Entry is known to be reachable but no verification attempt should be tried until traffic is sent to the neighbor.Delay: The reachability is uncertain but traffic is sent and solicitations are delayed. Probe: A probe message is sent to verify reachability2.1.3 The Destination cacheThe Destination cache contains destination information about recently sent traffic. IP addresses and a pointer to the next hop address stored in the neighbor cache. The cache is updated by Redirect messages from routers. This cache contains information about nodes residing both on the same link (neighbors) and on others as opposed to the destination cache that only contains information about nodes on the same link. 2.1.4 The prefix listThe prefix list contains entries for every prefix on the link. The hosts to determine if the destination is on the same link use this information. Thereby knowing if the packet should be sent directly or via the default router.2.1.5 Default router listA list containing the routers on the link that are willing to act like a default router for the node.3.1 Packet transmissionA node about to send a packet will use the three above described caches. When a packet is transmitted the node looks into the Destination cache, the prefix list and the default router to determine the IP address. This is done via a longest prefix match among the prefixes stored in the prefix list. This match will show if the node is on the same link or should be sent via the default router. Once the IP address is known the Node looks into the Neighbor cache to get the link-layer address for a suitable next hop. If the node doesn’t have an entry in the Neighbor cache, it creates an entry and starts the address resolution, while this process is running packets to that address are queued.Every time the Neighbor cache is used the reachability information is checked and if the status isn’t reachable suitable measures are being made, these according to what is stated in the Unreacability Detection function, described further down.4.1 Router and prefix discoveryRouter discovery is used to find neighboring routers, prefixes and configuration parameters such as the default value of the Hop limit or MTU on the present link. Routers periodically send a multicast router advertisement or as a response of a router solicitation. The nodes on the link receiving this advertisement use it to build up their list of default routers (the router can choose not to be listed to enable load balancing). The prefixes the nodes can learn from the advertisement are used to the get the IP-addresses of the nodes that are currently on the link. The prefix information is sent as an option. Moreover the Advertisement contains a set of flags that informs the routers about how to perform the Autoconfiguration (i.e. stateful or stateless)5.1 The Address resolutionAfter the prefix discovery the nodes has to determine or verify the link-layer addresses on the link. This is discovered by using Neighbor solicitations and Neighbor Advertisements. A node starts with sending a Neighbor Solicitation message to make the wanted node to return its link-layer address and at the same time providing the nodes own link-layer address. The solicitation is sent as a multicast message if an address needs to be resolved and unicast when an address needs to be verified.When positive acknowledgement does not verify that sent data is delivered neighbor solicitation can be sent to find out about the nodes reachability this will force the receiver to send an advertisement that confirms its reachability. The solicitation messages are also used to discover duplicate addresses, to see if more then one node is using the same address.6.1 Neighbor UnreachabilityThe frequency of router advertisements is not high enough to detect unreachability problems. Therefore the Neighbor Unreachability detection procedure is introduced. When the reachability isn’t confirmed by upper layer protocols (such as TCP) the node must probe to test the reachability. This is done via using Neighbor Solicitations.A node that has been regarded as reachable will after a certain time change state to the Stale state, when a packet is to be sent the state enters the delay state and a probe issent. Once a confirmation (neighbor solicitation) is received the state is changed to reachable.If a node changes its link layer address the neighbor unreachability detection will eventually deal with this problem. To improve the performance the neighbor discovery states that a node that does a link layer change shall send a few Neighbor advertisements.7.1 Redirect functionWhen a packet is transmitted to a node that appears not to be on the same like, it is sent via a router. If the chosen next hop is not an optimal one the router will transmit a redirect message to the source. This to present a better next hop alternative. The redirect message is trigged to be sent when the router forwards a packet on the same interface as it was received. When a node receives a redirection message it assumes that the node it is redirected to resides on the same link as it self. This will result in a neighbor or solicitation to get the link-layer address. This will give the nodes the ability to directly exchange messages to links on different subnets without passing through a router.8.1 Duplicate address detectionA node send a Neighbor Solicitation message to check if it’s own address is in use. If a response is received then we have a address duplication problem that the network administrator have to solve.9.1 Ipv4 comparison:Table 1.1 below states the Ipv6 Neighbor discovery functions and the corresponding IPv4 functionalities:IPv6 Neighbor Discovery Functions Similar IPv4 FunctionalityRouter Discovery ICMP Router DiscoveryPrefix Discovery DHCP or manual Configuration Parameter Discovery Manual configurationAddress resolution ARPNext hop determination Routing table searchesNeighbor Unreachability Detection No standard mechanismDuplicate Address detection No standard mechanismRedirect ICMP RedirectTable 1.1 Ipv6 Neighbor discovery functions and the corresponding IPv4 functionalities.10.1 Extensions made for mobile nodesA mobile node with its mobile behavior has different characteristics compared to regular fixed nodes. There are several additions and changes done to introduce mobility support in the neighbor discovery process. The Mobile IPv6 is still under development and just drafted yet, so what I’m describing may change in the near future.The Router Advertisment have an additional flag which makes it possible for the router to state whether it’s serving as a home agent or not. The prefix option information is extended so that the router is providing its global address and not just the link-local address. This extension is essential so that the mobile node can establish a forward service from it’s previous location. An other option has been added whichgives their router the ability to state the interval at which unsolicited Router Advertisements are sent. A second option extension is allows the home agent to advertise information such as Home agent life time and a preference value which indicates how preferable this Home agent is in case of several on the same link. To support mobile nodes movement detection (described below) the Advertisements are allowed to be sent more frequently.Router Solicitations are, when the node is not connected to its home link, for the same reason (make movement detection easier) allowed to be sent more frequently then in mobile IPv6.10.2 Movement detection using neighbor discoveryWhen a mobile node for example has moved out of range of wireless access point and is in range of another this must be detected. When this is detected the mobile node can configure a new care-of address from a new router that advertises.Some of the neighbor discovery functions are involved when a mobile node is to detect that it has moved. The entries from the nodes different caches contain information about routers and their prefixes. One of these entries defines the router that is the default router.To detect that the default router is unreachable the mobile node uses Neighbor Unreachability Detection described above. The router is also continually probed with Neighbor Solicitation messages and a failure in response can be seen, as the router is unreachable. Any received packet from the router will be taking as an acknowledgement that the router is still reachable. This can be exploit on some link when the node is set in a promiscuous mode so that all packets on the link will be received and not just those addressed to the node itself.However according to the Mobility support draft[1] any combination of movement detection that the mobile node can perform is allowed. This means that the movement detection with the neighbor discovery processes can be supplemented with for instance lower layer detection schemes. Lower layer schemes could be measuring the signal strength and when it’s to low from the current link change to another with higher, even if router advertisements still are getting thorough.11 Future – will Ipv6 be used?There are already several IPv6 networks in operation, 6bone run by NTT in Japan and MCI Worldcom in the USA. But the major driving force in introducing IPv6 is the Mobile industry. Companies as Ericsson and Nokia are running large research projects regarding Mobile IPv6, which probably will be introduced in the third generation of mobile networks, UMTS.The question of introducing IPv6 is also a regional issue. Asia has a lot higher demand for IPv4 addresses then America since they have more assigned to them. This means that USA is more reluctant to introducing IPv6 since all upgrades are costly. The transitation between IPv4 and IPv6 will not happened over a night. There are schemes like the NAT (network address translator) that will make a coexistence of IPv4 and IPv6 possible for a period. For a while we will have to cope with a dual stack system with both IPv4 and IPv6.However the lack of addresses and the mobile industries efforts will sooner or later force the Internet community to make the transitation to Mobile IPv6.12 References:[1] David B Johnson, Charles Perkins, Mobility Support in IPv6, 2 July 2001.[2]T. Narten, E. Nordmark, W. Simpson, Neighbor Discovery for IP Version 6(IPv6) RFC 2461, December 1998.[3]James D. Solomon, Mobile IP The internet unplugged, Prentice Hall PTR1998.[4][5]。

相关文档
最新文档