首页 » Concept » FAQ » IPv6: Multicast地址(多播/组播)与Anycast地址(任播)

IPv6: Multicast地址(多播/组播)与Anycast地址(任播)

作者: lesca 分类: FAQ, IPv6, Tutorials 发布时间: 2012-06-07 15:14 ė浏览 6,010 次 6没有评论

1.Multicast地址(多播/组播地址)

Multicast address
| 8  bits | 4  bits | 4  bits |            112 bits              |
+---------+---------+---------+----------------------------------+
|1111 1111|  Flags  |  Scope  |            Group ID              |
+---------+---------+---------+----------------------------------+

Multicast地址的具有以下特征:

  • 多个节点可以加入到同一Multicast组内
  • 这些节点可以通过共同的Multicast地址监听Multicast请求
  • 一个节点也可以加入多个Multicast组
  • 一个节点可以同时通过多个Multicast地址监听Multicast请求

Multicast地址的结构:

  • Multicast地址前缀为FF00::/8
  • Flags目前有以下两个值:
    • 0000:表示该Multicast地址由IANA组织固定分配,是Well-known Multicast地址(见下节)
    • 0001:表示该Multicast地址尚未被IANA固定分配,是临时Multicast地址
  • Scope表示路由范围:
    • 1 – Interface-local Scope
    • 2 – Link-local Scope
    • 5 – Site-local Scope
  • Group ID用来标识此组的唯一标识

2.Well-known Multicast地址

Well-known IPv6 multicast addresses
Address Description
ff01::1 Interface-local scope all-nodes multicast address
ff01::2 Interface-local scope all-routers multicast address
ff02::1 All nodes on the local network segment
ff02::2 All routers on the local network segment
ff02::5 OSPFv3 AllSPF routers
ff02::6 OSPFv3 AllDR routers
ff02::9 RIP routers
ff02::a EIGRP routers
ff02::d PIM routers
ff02::16 MLDv2 reports (defined in RFC 3810)
ff02::1:2 All DHCP servers and relay agents on the local network site (defined in RFC3315)
ff05::1:3 All DHCP servers on the local network site (defined in RFC 3315)
ff05::2 Site-local scope all-routers multicast address
ff0x::fb Multicast DNS
ff0x::101 Network Time Protocol
ff0x::108 Network Information Service
ff0x::114 Used for experiments

3.Solicited-node multicast地址

IPv4通过ARP广播询问目标主机的MAC地址,但是在IPv6网络中,通过将Solicited-node multicast地址IPv6 Neighbor Discovery协议相结合,能够有效减少广播范围。Solicited-Node multicast address由前缀FF02:0:0:0:0:1:FF00::/104Unicast地址或Anycast地址的最后24位产生

Unicast Address to Solicited-Node multicast address
|             64 bits           |             64 bits            |
+-------------------------------+--------------------------------+
|         Unicast Prefix        |          Interface ID          |
+-------------------------------+----------------------+---------+
                                                       ↓ 24 bits ↓
+------------------------------------------------------+---------+
|                   FF02:0:0:0:0:1:FF                  |         |
+------------------------------------------------------+---------+

下面介绍一下IPv6主机获得目标IPv6主机MAC地址的大致过程,以供参考。
在IPv6中,首先构造和对方IPv6地址相关的Solicited-node Multicast地址,以下是一个典型的转换过程:

Example: Unicast Address to Solicited-Node multicast address
fe80::2aa:ff:fe28:9c5a                      Target address (compressed notation)
fe80:0000:0000:0000:02aa:00ff:fe28:9c5a     Target address (uncompressed notation)
                                -- ----     the last 24-bits
ff02::1:ff00:0000/104                       Solicited-node Multicast Address prefix
ff02:0000:0000:0000:0000:0001:ff00:0000/104    (uncompressed)
---- ---- ---- ---- ---- ---- --            The first 104 bits
ff02:0000:0000:0000:0000:0001:ff28:9c5a     Result
ff02::1:ff28:9c5a                           Result (compressed notation)

然后,再将“Neighbor Solicitation packet”发送给这个地址,具有目标IPv6单播地址的主机一直监听自己所在的Solicited-Node multicast组,以回应自己的物理地址。

注意事项:

  • Solicited-Node multicast address仅在本地链路有效
  • 每个网络接口至少有一个Solicited-Node multicast地址
  • 具有IPv6单播地址的主机一直监听自己所在的Solicited-Node multicast组
  • 主机试图获得Unicast或者Anycast地址的物理地址时,才需要加入Solicited-Node multicast组
  • Solicited-Node multicast地址被用于“邻居发现协议”中,以获得其他Solicited-node的链路层地址

4.Anycast地址(任播地址)

IPv6中,Anycast指一个发送方同最近的一组接收方之间的通信。Anycast地址具有以下特点:

  • Anycast地址语义上与Unicast地址没有差别, 只是Anycast强调一组接口。
  • 发到Anycast地址的数据包仅发送到(路由距离)最近的Anycast节点(不是所有节点)
  • Anycast地址只能用于数据包的目的地址

References:

[1] 戴友炜,Windows Server 2008 R2安装于管理,清华大学出版社
[2] Link-local address
[3] IPv6(English Version)
[4] IPv6(中文版)
[5] Multicast address
[6] Solicited-node multicast address
[7] 被请求节点的组播地址(solicited-node multicast address)
[8] Anycast
[9] IPv6

本文出自 Lesca技术宅,转载时请注明出处及相应链接。

本文永久链接: http://lesca.me/archives/ipv6-multicast-and-anycast-address.html

Leave a Reply

Your email address will not be published. Required fields are marked *

Ɣ回顶部