IPv6 协议

Baidu AI

IPv6 笔记

三大运营商IPv6地址段

IPv6 运营商
240e::/20 中国电信
2409:8000::/20 中国移动
2408:8000::/20 中国联通

IPv6 Vs IPv4

IPv6 地址 IPv4 地址 备注
FE80::/10 169.254.0.0/16 Link-local address(链路本地地址),网卡没有获取到IP地址时,自动配置的IP地址(可以和本地其它主机通过此IP进行通讯),此地址不能路由
::1/128 127.0.0.1/8 Loopback Address(本机回环地址)
::/128 0.0.0.0/0 default route(默认路由)
FD00::/8 192.168.0.0/16 Site-Local address (私网地址)
FD00::/8 172.0.0.1/8 Site-Local address (私网地址)
FEC0:/10 192.168.0.0/16 Site-Local address (私网地址),已弃用
FEC0:/10 172.0.0.1/8 Site-Local address (私网地址),已弃用
FF00::/8 224.0.0.0/8 Multicast address(组播地址)
FF01::1 224.0.0.1 All Nodes in interface-local (所有-节点地址)
FF01::2 224.0.0.2 All Routers in interface-local (所有-路由器地址)
FF02::1 224.0.0.1 All Nodes in link-local (所有节点地址)
FF02::2 All Routers in link-local (链路中所有路由器组播地址)
FF05::1 All Routers in site-local (私网中所有路由器组播地址)
FF02::5 224.0.0.5 OSPFv3 (链路状态(内部)路由协议的组播)
FF02::6 224.0.0.6 OSPFv3 designated Routers 链路状态(内部)路由协议的保留组播地址
FF02::9 224.0.0.9 RIPng 距离向量(内部)路由协议的保留组播地址
FF02::A 224.0.0.10 EIGRP 路由协议的保留组播地址
FF0X::101 224.0.1.1 网络时间协议NTP

常见协议

  • ICMPv6: Internet控制消息协议版本6是ICMP的升级实现,以适应IPv6要求。该协议用于诊断功能,错误和信息消息,统计目的。ICMPv6的邻居发现协议替换ARP,并帮助发现链路上的邻居和路由器。
  • DHCPv6: 动态主机配置协议版本6是DHCP的一种实现。启用IPv6的主机不需要任何DHCPv6服务器获取IP地址,因为它们可以自动配置。 他们也不需要DHCPv6定位DNS服务器,因为可以通过ICMPv6邻居发现协议发现和配置DNS。然而DHCPv6服务器可以用于提供这些信息。
  • DNS: 没有新版本的DNS,但它现在配备了扩展以支持查询IPv6地址,添加新的AAAA(quad-A)记录以回复IPv6查询消息。现在DNS可以用两个IP版本(4和6)回复,但询格式没有任何改变。

ICMPv6 协议

ICMPv6 Packet
Bit offset 0-7 8-15 16–31
0 Type Code Checksum
32 Message body
ICMPv6 Type
Type Code
Value name Meaning Value name Meaning
ICMPv6 Error Messages
1 destination-unreachable Destination unreachable 0 no-route no route to destination
1 communication-prohibited communication with destination administratively prohibited
2 beyond-scope beyond scope of source address
3 address-unreachable address unreachable
4 port-unreachable port unreachable
5 failed-policy source address failed ingress/egress policy
6 reject-route reject route to destination
7 Error in Source Routing Header
2 packet-too-big Packet too big 0
3 time-exceeded Time exceeded 0 ttl-zero-during-transit hop limit exceeded in transit
1 ttl-zero-during-reassembly ragment reassembly time exceeded
4 parameter-problem Parameter problem 0 bad-header erroneous header field encountered
1 unknown-header-type unrecognized Next Header type encountered
2 unknown-option unrecognized IPv6 option encountered
100 Private experimentation
101 Private experimentation
127 Reserved for expansion of ICMPv6 error messages
ICMPv6 Informational Messages
128 echo-request Echo Request 0
129 echo-reply Echo Reply 0
130 Multicast Listener Query (MLD) 0 There are two subtypes of Multicast Listener Query messages:
  • General Query, used to learn which multicast addresses have listeners on an attached link.
  • Multicast-Address-Specific Query, used to learn if a particular multicast address has any listeners on an attached link.
These two subtypes are differentiated by the contents of the Multicast Address field, as described in section 3.6 of RFC 2710
131 Multicast Listener Report (MLD) 0
132 Multicast Listener Done (MLD) 0
133 router-solicitation Router Solicitation (NDP) 0
134 router-advertisement Router Advertisement (NDP) 0
135 neighbour-solicitation Neighbor Solicitation (NDP) 0
136 neighbour-advertisement Neighbor Advertisement (NDP) 0
137 redirect Redirect Message (NDP) 0
138 Router Renumbering 0 Router Renumbering Command
1 Router Renumbering Result
255 Sequence Number Reset
139 ICMP Node Information Query 0 The Data field contains an IPv6 address which is the Subject of this Query.
1 The Data field contains a name which is the Subject of this Query, or is empty, as in the case of a NOOP.
2 The Data field contains an IPv4 address which is the Subject of this Query.
140 ICMP Node Information Response 0 A successful reply. The Reply Data field may or may not be empty.
1 The Responder refuses to supply the answer. The Reply Data field will be empty.
2 The Qtype of the Query is unknown to the Responder. The Reply Data field will be empty.
141 Inverse Neighbor Discovery Solicitation Message 0
142 Inverse Neighbor Discovery Advertisement Message 0
143 Multicast Listener Discovery (MLDv2) reports
144 Home Agent Address Discovery Request Message 0
145 Home Agent Address Discovery Reply Message 0
146 Mobile Prefix Solicitation 0
147 Mobile Prefix Advertisement 0
148 Certification Path Solicitation (SEND)
149 Certification Path Advertisement (SEND)
151 Multicast Router Advertisement (MRD)
152 Multicast Router Solicitation (MRD)
153 Multicast Router Termination (MRD)
155 RPL Control Message
200 Private experimentation
201 Private experimentation
255 Reserved for expansion of ICMPv6 informational messages

References:

  • wikipedia-icmpv6
  • wikipedia-ipv6