07-IPv6组播路由与转发配置
本章节下载: 07-IPv6组播路由与转发配置 (497.07 KB)
IPv6组播路由与转发中有以下三种表:
· 每个IPv6组播路由协议都有一个协议自身的路由表,如IPv6 PIM路由表。
· 各IPv6组播路由协议的IPv6组播路由信息经过综合形成一个总的IPv6组播路由表,该表由一系列(S,G)表项组成,即一系列由IPv6组播源S向IPv6组播组G发送IPv6组播数据的IPv6组播路由信息。IPv6组播路由表中包含了由一或多种IPv6组播路由协议生成的IPv6组播路由。
· IPv6组播转发表直接用于控制IPv6组播数据包的转发,它与IPv6组播路由表保持一致,IPv6组播路由表中最优的IPv6组播路由会直接下发到IPv6组播转发表中。
IPv6组播路由协议在创建和维护IPv6组播路由表项时,运用了RPF(Reverse Path Forwarding,逆向路径转发)检查机制,以确保IPv6组播数据能够沿正确的路径传输,同时还能避免由于各种原因而造成的环路。
执行RPF检查的过程如下:
(1) 首先,以“报文源”的IPv6地址为目的地址,分别从IPv6单播路由表和IPv6 MBGP路由表中各选出一条最优路由。
根据IPv6组播报文传输的具体情况不同,“报文源”所代表的具体含义也不同:
· 如果当前报文沿从组播源到接收者或RP(Rendezvous Point,汇集点)的SPT(Shortest Path Tree,最短路径树)进行传输,则以组播源为“报文源”进行RPF检查。
· 如果当前报文沿从RP到接收者的RPT(Rendezvous Point Tree,共享树)进行传输,或者沿从组播源到RP的组播源侧RPT进行传输,则都以RP为“报文源”进行RPF检查。
· 如果当前报文为BSR(Bootstrap Router,自举路由器)报文,沿从BSR到各路由器的路径进行传输,则以BSR为“报文源”进行RPF检查。
有关SPT、RPT、组播源侧RPT、RP和BSR的详细介绍,请参见“IP组播配置指导”中的“IPv6 PIM”。
(2) 然后,从这些最优路由中再选出一条作为RPF路由。选取规则如下:
· 如果配置了按照最长匹配选择路由,则:
¡ 选择前缀长度最长的路由。
¡ 如果前缀长度相同,则选择路由优先级最高的路由。
¡ 如果路由优先级也相同,则按照IPv6 MBGP路由、IPv6单播路由的顺序进行选择。
· 如果没有配置按照最长匹配选择路由,则:
¡ 选择路由优先级最高的路由。
¡ 如果路由优先级相同,则按照IPv6 MBGP路由、IPv6单播路由的顺序进行选择。
RPF路由中包含有RPF接口和RPF邻居的信息,不论RPF路由为IPv6单播路由还是IPv6 MBGP路由,该路由表项的出接口都是RPF接口,下一跳都是RPF邻居。
(3) 最后,判断报文实际到达的接口与RPF接口是否相同:
· 相同,RPF检查通过。
· 不同,RPF检查失败。
对每一个收到的IPv6组播数据报文都进行RPF检查会给路由器带来较大负担,而利用IPv6组播转发表可以解决这个问题。在建立IPv6组播路由和转发表时,会把IPv6组播数据报文(S,G)的RPF接口记录为(S,G)表项的入接口。当路由器收到IPv6组播数据报文(S,G)后,查找IPv6组播转发表:
(1) 如果IPv6组播转发表中不存在(S,G)表项,则对该报文执行RPF检查,将其RPF接口作为入接口,结合相关路由信息创建相应的表项,并下发到IPv6组播转发表中:
· 若该报文实际到达的接口正是其RPF接口,则RPF检查通过,向所有的出接口转发该报文;
· 若该报文实际到达的接口不是其RPF接口,则RPF检查失败,丢弃该报文。
(2) 如果IPv6组播转发表中已存在(S,G)表项,且该报文实际到达的接口与入接口相匹配,则向所有的出接口转发该报文。
(3) 如果IPv6组播转发表中已存在(S,G)表项,但该报文实际到达的接口与入接口不匹配,则对此报文执行RPF检查:
· 若其RPF接口与入接口一致,则说明(S,G)表项正确,丢弃这个来自错误路径的报文;
· 若其RPF接口与入接口不符,则说明(S,G)表项已过时,于是把入接口更新为RPF接口。如果该报文实际到达的接口正是其RPF接口,则向所有的出接口转发该报文,否则将其丢弃。
图1-1 RPF检查过程
如图1-1所示,假设网络中IPv6单播路由畅通,未配置IPv6 MBGP。IPv6组播报文(S,G)沿从组播源(Source)到接收者(Receiver)的SPT进行传输。假定Router C上的IPv6组播转发表中已存在(S,G)表项,其记录的入接口为GigabitEthernet2/1/2:
· 如果该IPv6组播报文从接口GigabitEthernet2/1/2到达Router C,与(S,G)表项的入接口相匹配,则向所有的出接口转发该报文。
· 如果该IPv6组播报文从接口GigabitEthernet2/1/1到达Router C,与(S,G)表项的入接口不匹配,则对其执行RPF检查:通过查找IPv6单播路由表发现到达Source的出接口(即RPF接口)是GigabitEthernet2/1/2,与(S,G)表项的入接口一致。这说明(S,G)表项是正确的,该报文来自错误的路径,RPF检查失败,于是丢弃该报文。
网络中可能存在不支持IPv6组播协议的路由器,从IPv6组播源发出的IPv6组播数据沿IPv6组播路由器逐跳转发,当下一跳路由器不支持IPv6组播协议时,IPv6组播转发路径将被阻断。而通过在处于IPv6单播网段两端的IPv6组播路由器之间建立隧道,则可以实现跨IPv6单播网段的IPv6组播数据转发。
图1-2 使用隧道传输IPv6组播数据
如图1-2所示,在IPv6组播路由器Router A和Router B之间建立隧道。Router A将IPv6组播数据封装在IPv6单播报文中,通过IPv6单播路由器转发至隧道另一端的Router B,再由Router B将IPv6单播报文头剥掉后继续进行IPv6组播传输。
表1-1 IPv6组播路由与转发配置任务简介
配置任务 |
说明 |
详细配置 |
|
使能IPv6组播路由 |
必选 |
||
配置IPv6组播路由与转发 |
配置按照最长匹配选择RPF路由 |
可选 |
|
配置对IPv6组播流量进行负载分担 |
可选 |
||
配置IPv6组播转发边界 |
可选 |
||
配置IPv6静态组播MAC地址表项 |
可选 |
在公网实例或VPN实例中配置各项三层IPv6组播功能之前,必须先在该实例中使能IPv6组播路由。
表1-2 使能IPv6组播路由
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
使能IPv6组播路由,并进入IPv6 MRIB(Multicast Routing Information Base,组播路由信息库)视图 |
ipv6 multicast routing [ vpn-instance vpn-instance-name ] |
缺省情况下,IPv6组播路由处于关闭状态 |
在配置IPv6组播路由与转发之前,需完成以下任务:
· 配置任一IPv6单播路由协议,实现域内网络层互通
· 配置IPv6 PIM-DM或IPv6 PIM-SM
用户可以配置组播路由器按照最长匹配原则来选择RPF路由,有关RPF路由选择的详细介绍,请参见“1.1.1 1. RPF检查过程”一节。
表1-3 配置按照最长匹配选择RPF路由
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
进入IPv6 MRIB视图 |
ipv6 multicast routing [ vpn-instance vpn-instance-name ] |
- |
配置按照最长匹配选择RPF路由 |
longest-match |
缺省情况下,选择路由优先级最高的路由作为RPF路由 |
用户通过配置根据组播源或组播源组进行IPv6组播流量的负载分担,可以优化存在多条IPv6组播数据流时的网络流量。
表1-4 配置对IPv6组播流量进行负载分担
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
进入IPv6 MRIB视图 |
ipv6 multicast routing [ vpn-instance vpn-instance-name ] |
- |
配置对IPv6组播流量进行负载分担 |
load-splitting { source | source-group } |
缺省情况下,不对IPv6组播流量进行负载分担 本命令对IPv6双向PIM不生效 |
进行本配置不需要使能IPv6组播路由。
IPv6组播信息在网络中的转发并不是漫无边际的,每个IPv6组播组对应的IPv6组播信息都必须在确定的范围内传递。IPv6组播转发边界为指定范围或Scope值的IPv6组播组划定了边界条件,如果IPv6组播报文的目的地址与边界条件匹配,就停止转发。当在一个接口上配置了IPv6组播转发边界后,将不能从该接口转发IPv6组播报文(包括本机发出的IPv6组播报文),也不能从该接口接收IPv6组播报文。
表1-5 配置IPv6组播转发边界
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
进入接口视图 |
interface interface-type interface-number |
- |
配置IPv6组播转发边界 |
ipv6 multicast boundary { ipv6-group-address prefix-length | scope { scope-id | admin-local | global | organization-local | site-local } } |
缺省情况下,接口上不存在IPv6组播转发边界 |
· 进行本配置不需要使能IPv6组播路由。
· 可手工配置的组播MAC地址表项必须是尚未使用的组播MAC地址(即最高字节的最低比特位为1的MAC地址)。
通过手工方式配置IPv6组播MAC地址表项,将端口与IPv6组播MAC地址进行静态绑定,以便灵活控制IPv6组播信息送达的目的端口。
用户既可以在系统视图对指定接口进行配置,也可以在接口视图下只对当前接口进行配置。
表1-6 系统视图下配置IPv6静态组播MAC地址表项
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
配置静态组播MAC地址表项 |
mac-address multicast mac-address interface interface-list vlan vlan-id |
缺省情况下,没有配置静态组播MAC地址表项 本命令的详细介绍请参见“IP组播命令参考”中的“组播路由与转发” |
表1-7 接口视图下配置IPv6静态组播MAC地址表项
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
进入二层以太网或二层聚合接口视图 |
interface interface-type interface-number |
- |
配置静态组播MAC地址表项 |
mac-address multicast mac-address vlan vlan-id |
缺省情况下,没有配置静态组播MAC地址表项 本命令的详细介绍请参见“IP组播命令参考”中的“组播路由与转发” |
执行reset命令清除IPv6组播路由表或IPv6组播转发表中的信息,可能导致IPv6组播信息无法正常传输。
在完成上述配置后,在任意视图下执行display命令可以显示配置后IPv6组播路由与转发的运行情况,通过查看显示信息验证配置的效果。
在用户视图下执行reset命令可以清除IPv6组播路由与转发的统计信息。
表1-8 IPv6组播路由与转发显示和维护
操作 |
命令 |
显示IPv6静态组播MAC地址表信息 |
display mac-address [ mac-address [ vlan vlan-id ] | [ multicast ] [ vlan vlan-id ] [ count ] ] |
显示IPv6 MRIB维护的接口信息 |
display ipv6 mrib [ vpn-instance vpn-instance-name ] interface [ interface-type interface-number ] |
显示IPv6组播边界的信息 |
display ipv6 multicast [ vpn-instance vpn-instance-name ] boundary { group [ ipv6-group-address [ prefix-length ] ] | scope [ scope-id ] } [ interface interface-type interface-number ] |
显示IPv6组播快速转发表项信息(独立运行模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] fast-forwarding cache [ ipv6-source-address | ipv6-group-address ] * [ slot slot-number ] |
显示IPv6组播快速转发表项信息(IRF模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] fast-forwarding cache [ ipv6-source-address | ipv6-group-address ] * [ chassis chassis-number slot slot-number ] |
显示IPv6组播转发的DF信息(独立运行模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding df-info [ ipv6-rp-address ] [ verbose ] [ slot slot-number ] |
显示IPv6组播转发的DF信息(IRF模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding df-info [ ipv6-rp-address ] [ verbose ] [ chassis chassis-number slot slot-number ] |
显示IPv6组播转发的事件统计信息(独立运行模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding event [ slot slot-number ] |
显示IPv6组播转发的事件统计信息(IRF模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding event [ chassis chassis-number slot slot-number ] |
显示IPv6组播转发表的信息(独立运行模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding-table [ ipv6-source-address [ prefix-length ] | ipv6-group-address [ prefix-length ] | incoming-interface interface-type interface-number | outgoing-interface { exclude | include | match } interface-type interface-number | slot slot-number | statistics ] * |
显示IPv6组播转发表的信息(IRF模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding-table [ ipv6-source-address [ prefix-length ] | ipv6-group-address [ prefix-length ] | chassis chassis-number slot slot-number | incoming-interface interface-type interface-number | outgoing-interface { exclude | include | match } interface-type interface-number | statistics ] * |
显示IPv6组播转发表的DF列表信息(独立运行模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding-table df-list [ ipv6-group-address ] [ verbose ] [ slot slot-number ] |
显示IPv6组播转发表的DF列表信息(IRF模式) |
display ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding-table df-list [ ipv6-group-address ] [ verbose ] [ chassis chassis-number slot slot-number ] |
显示IPv6组播路由表的信息 |
display ipv6 multicast [ vpn-instance vpn-instance-name ] routing-table [ ipv6-source-address [ prefix-length ] | ipv6-group-address [ prefix-length ] | incoming-interface interface-type interface-number | outgoing-interface { exclude | include | match } interface-type interface-number ] * |
显示IPv6组播源的RPF信息 |
display ipv6 multicast [ vpn-instance vpn-instance-name ] rpf-info ipv6-source-address [ ipv6-group-address ] |
清除IPv6组播快速转发表中的转发项(独立运行模式) |
reset ipv6 multicast [ vpn-instance vpn-instance-name ] fast-forwarding cache { { ipv6-source-address | ipv6-group-address } * | all } [ slot slot-number ] |
清除IPv6组播快速转发表中的转发项(IRF模式) |
reset ipv6 multicast [ vpn-instance vpn-instance-name ] fast-forwarding cache { { ipv6-source-address | ipv6-group-address } * | all } [ chassis chassis-number slot slot-number ] |
清除IPv6组播转发的事件统计信息 |
reset ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding event |
清除IPv6组播转发表中的转发项 |
reset ipv6 multicast [ vpn-instance vpn-instance-name ] forwarding-table { { ipv6-source-address [ prefix-length ] | ipv6-group-address [ prefix-length ] | incoming-interface { interface-type interface-number } } * | all } |
清除IPv6组播路由表中的路由项 |
reset ipv6 multicast [ vpn-instance vpn-instance-name ] routing-table { { ipv6-source-address [ prefix-length ] | ipv6-group-address [ prefix-length ] | incoming-interface interface-type interface-number } * | all } |
· 有关display mac-address multicast命令的详细介绍,请参见“IP组播命令参考”中的“组播路由与转发”。
· 清除IPv6组播路由表中的路由项后,IPv6组播转发表中的相应表项也将随之删除。
· 清除IPv6组播转发表中的转发项后,IPv6组播路由表中的相应表项也将随之删除。
· Router A和Router C支持IPv6组播功能并运行IPv6 PIM-DM,但Router B不支持IPv6组播功能;
· Router A、Router B和Router C之间运行OSPFv3协议(不发布或引入组播源所在接口前缀);
· 要求通过配置,使Receiver能够接收来自Source的IPv6组播信息。
图1-3 利用GRE隧道实现IPv6组播转发配置组网图
(1) 配置IPv6地址和IPv6单播路由协议
请按照图1-3配置各接口的IPv6地址和前缀长度,并在各路由器上配置OSPFv3协议(不发布或引入组播源所在接口前缀),具体配置过程略。
(2) 配置GRE隧道
# 在Router A上创建接口Tunnel0,并指定其隧道模式为GRE over IPv6隧道。
<RouterA> system-view
[RouterA] interface tunnel 0 mode gre ipv6
# 在Router A上为Tunnel0接口配置IPv6地址,并指定隧道的源地址和目的地址。
[RouterA-Tunnel0] ipv6 address 5001::1 64
[RouterA-Tunnel0] source 2001::1
[RouterA-Tunnel0] destination 3001::2
[RouterA-Tunnel0] quit
# 在Router C上创建接口Tunnel0,并指定其隧道模式为GRE over IPv6隧道。
<RouterC> system-view
[RouterC] interface tunnel 0 mode gre ipv6
# 在Router C上为Tunnel0接口配置IPv6地址,并指定隧道的源地址和目的地址。
[RouterC-Tunnel0] ipv6 address 5001::2 64
[RouterC-Tunnel0] source 3001::2
[RouterC-Tunnel0] destination 2001::1
[RouterC-Tunnel0] quit
(3) 使能IPv6组播路由,并使能IPv6 PIM-DM和MLD
# 在Router A上使能IPv6组播路由,并在各接口上使能IPv6 PIM-DM。
[RouterA] ipv6 multicast routing
[RouterA-mrib6] quit
[RouterA] interface gigabitethernet 2/1/1
[RouterA-GigabitEthernet2/1/1] ipv6 pim dm
[RouterA-GigabitEthernet2/1/1] quit
[RouterA] interface gigabitethernet 2/1/2
[RouterA-GigabitEthernet2/1/2] ipv6 pim dm
[RouterA-GigabitEthernet2/1/2] quit
[RouterA] interface tunnel 0
[RouterA-Tunnel0] ipv6 pim dm
[RouterA-Tunnel0] quit
# 在Router C上使能IPv6组播路由,在主机侧接口GigabitEthernet2/1/1上使能MLD,并在其它接口上使能IPv6 PIM-DM。
[RouterC] ipv6 multicast routing
[RouterC-mrib6] quit
[RouterC] interface gigabitethernet 2/1/1
[RouterC-GigabitEthernet2/1/1] mld enable
[RouterC-GigabitEthernet2/1/1] quit
[RouterC] interface gigabitethernet 2/1/2
[RouterC-GigabitEthernet2/1/2] ipv6 pim dm
[RouterC-GigabitEthernet2/1/2] quit
[RouterC] interface tunnel 0
[RouterC-Tunnel0] ipv6 pim dm
[RouterC-Tunnel0] quit
(4) 配置IPv6静态路由
# 在Router C上配置IPv6静态路由,该路由的目的地址为1001::1/64,下一跳地址为Tunnel0。
[RouterC] ipv6 route-static 1001::1 64 tunnel 0
IPv6组播源向IPv6组播组FF1E::101发送IPv6组播数据,接收者加入该IPv6组播组后能够收到IPv6组播源发来的IPv6组播数据。
# 显示Router C上的IPv6 PIM路由表信息。
[RouterC] display ipv6 pim routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, FF1E::101)
Protocol: pim-dm, Flag: WC
UpTime: 00:04:25
Upstream interface: NULL
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet2/1/1
Protocol: mld, UpTime: 00:04:25, Expires: -
(1001::100, FF1E::101)
Protocol: pim-dm, Flag: ACT
UpTime: 00:06:14
Upstream interface: Tunnel0
Upstream neighbor: FE80::A01:101:1
RPF prime neighbor: FE80::A01:101:1
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet2/1/1
Protocol: pim-dm, UpTime: 00:04:25, Expires: -
Router C的RPF邻居为Router A,IPv6组播数据通过GRE隧道由直接Router A发往Router C。
Spoke与Hub之间建立ADVPN隧道。
· Hub和Spoke支持组播功能并运行PIM-SM,ADVPN隧道口运行NBMA模式;
· Hub1、Hub2、Spoke1和Spoke2之间运行OSPF协议;
要求通过配置,使Spoke1能够接收来自Hub1的组播信息。
图1-4 IPv6 ADVPN支持组播转发配置组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Hub1 |
GE2/1/1 |
1::1/64 |
Hub2 |
GE2/1/1 |
1::2/64 |
|
Tunnel1 |
192:168::1/64 FE80::1 |
|
Tunnel1 |
192:168::2/64 FE80::2 |
|
Loop0 |
44::44/64 |
|
Loop0 |
55::55/64 |
GE2/1/2 |
100::100/64 |
|
|
|
|
Spoke1 |
GE2/1/1 |
1::3/64 |
Spoke2 |
GE2/1/1 |
1::4/64 |
|
Tunnel1 |
192:168::3/64 FE80::3 |
|
Tunnel1 |
192:168::4/64 FE80::4 |
GE2/1/2 |
200::100/64 |
|
|
|
|
Server |
GE2/1/1 |
1::11/64 |
|
|
|
(1) 配置IPv6地址
请按照图1-3配置各接口的IPv6地址和前缀长度,具体配置过程略。
(2) 配置IPv6 ADVPN信息
#配置Server
# 创建ADVPN域abc。
<Server>system-view
[Server]vam server advpn-domain abc id 1
# 配置VAM Server的预共享密钥为123456。
[Server-vam-server-domain-abc] pre-shared-key simple 123456
# 配置对VAM Client不进行认证。
[Server-vam-server-domain-abc] authentication-method none
# 启动该ADVPN域的VAM Server功能。
[Server-vam-server-domain-abc] server enable
# 创建Hub组0。
[Server-vam-server-domain-abc] hub-group 0
# 指定Hub组内Hub的IPv6私网地址。
[Server-vam-server-domain-abc-hub-group-0] hub ipv6 private-address 192:168::1
[Server-vam-server-domain-abc-hub-group-0] hub ipv6 private-address 192:168::2
# 指定Hub组内Spoke的IPv6私网地址范围。
[Server-vam-server-domain-abc-hub-group-0] spoke ipv6 private-address range 192:168:: 192:168::FFFF:FFFF:FFFF:FFFF
[Server-vam-server-domain-abc-hub-group-0] quit
[Server-vam-server-domain-abc] quit
#配置Hub1
# 创建VAM Client Hub1。
< Hub1> system-view
[Hub1] vam client name Hub1
# 配置VAM Client所属的ADVPN域为abc。
[Hub1-vam-client-Hub1] advpn-domain abc
# 配置VAM Server的IP地址。
[Hub1-vam-client-Hub1] server primary ipv6-address 1::11
# 配置VAM Client的预共享密钥。
[Hub1-vam-client-Hub1] pre-shared-key simple 123456
# 开启VAM Client功能。
[Hub1-vam-client-Hub1] client enable
#配置Hub2
# 创建VAM Client Hub2。
<Hub2> system-view
[Hub2] vam client name hub2
# 配置VAM Client所属的ADVPN域为abc。
[Hub2-vam-client-hub2] advpn-domain abc
# 配置VAM Server的IP地址。
[Hub2-vam-client-hub2] server primary ipv6-address 1::11
# 配置VAM Client的预共享密钥。
[Hub2-vam-client-hub2] pre-shared-key simple 123456
# 开启VAM Client功能。
[Hub2-vam-client-hub2] client enable
#配置Spoke1
# 创建VAM Client Spoke1。
<Spoke1> system-view
[Spoke1] vam client name Spoke1
# 配置VAM Client所属的ADVPN域为abc。
[Spoke1-vam-client-Spoke1] advpn-domain abc
# 配置VAM Server的IP地址。
[Spoke1-vam-client-Spoke1] server primary ipv6-address 1::11
# 配置VAM Client的预共享密钥。
[Spoke1-vam-client-Spoke1] pre-shared-key simple 123456
# 开启VAM Client功能。
[Spoke1-vam-client-Spoke1] client enable
[Spoke1-vam-client-Spoke1] quit
#配置Spoke2
# 创建VAM Client Spoke2。
<Spoke2> system-view
[Spoke2] vam client name Spoke2
# 配置VAM Client所属的ADVPN域为abc。
[Spoke2-vam-client-Spoke2] advpn-domain abc
# 配置VAM Server的IP地址。
[Spoke2-vam-client-Spoke2] server primary ipv6-address 1::11
# 配置VAM Client的预共享密钥。
[Spoke2-vam-client-Spoke2] pre-shared-key simple 123456
# 开启VAM Client功能。
[Spoke2-vam-client-Spoke2] client enable
[Spoke2-vam-client-Spoke2] quit
(3) 配置IPv6 ADVPN隧道
# Hub1配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。
[Hub1] interface tunnel 1 mode advpn gre ipv6
[Hub1-Tunnel1] source gigabitethernet 2/1/1
[Hub1-Tunnel1] ipv6 address FE80::1 link-local
[Hub1-Tunnel1] ipv6 address 192:168::1 64
[Hub1-Tunnel1] vam ipv6 client hub1
[Hub1-Tunnel1] quit
# Hub2配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。
[Hub2] interface tunnel 1 mode advpn gre ipv6
[Hub2-Tunnel1] source gigabitethernet 2/1/1
[Hub2-Tunnel1] ipv6 address FE80::2 link-local
[Hub2-Tunnel1] ipv6 address 192:168::2 64
[Hub2-Tunnel1] vam ipv6 client hub1
[Hub2-Tunnel1] quit
# Spoke1配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。
[Spoke1] interface tunnel 1 mode advpn gre ipv6
[Spoke1-Tunnel1] source gigabitethernet 2/1/1
[Spoke1-Tunnel1] ipv6 address FE80::3 link-local
[Spoke1-Tunnel1] ipv6 address 192:168::3/64
[Spoke1-Tunnel1] vam ipv6 client spoke1
[Spoke1-Tunnel1] quit
# Spoke2配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。
[Spoke2] interface tunnel 1 mode advpn gre ipv6
[Spoke2-Tunnel1] source gigabitethernet 2/1/1
[Spoke2-Tunnel1] ipv6 address FE80::4 link-local
[Spoke2-Tunnel1] ipv6 address 192:168::4/64
[Spoke2-Tunnel1] vam ipv6 client spoke2
[Spoke2-Tunnel1] quit
(4) 配置OSPFv3路由协议
#Hub1 配置路由信息。
<Hub1> system-view
[Hub1] ospfv3
[Hub1-ospfv3-1] router-id 0.0.0.1
[Hub1-ospfv3-1] area 0.0.0.0
[Hub1-ospfv3-1-area-0.0.0.0] quit
[Hub1-ospfv3-1] quit
[Hub1] interface loopback 0
[Hub1-LoopBack0] ospfv3 1 area 0.0.0.0
[Hub1-LoopBack0] quit
[Hub1] interface gigabitethernet 2/1/2
[Hub1-GigabitEthernet2/1/2] ospfv3 1 area 0.0.0.0
[Hub1-GigabitEthernet2/1/2] quit
[Hub1] interface tunnel 1
[Hub1-Tunnel1] ospfv3 1 area 0.0.0.0
[Hub1-Tunnel1] ospfv3 network-type p2mp
[Hub1-Tunnel1] quit
#Hub2配置路由信息。
<Hub2> system-view
[Hub2] ospfv3
[Hub2-ospfv3-1] router-id 0.0.0.2
[Hub2-ospfv3-1] area 0.0.0.0
[Hub2-ospfv3-1-area-0.0.0.0] quit
[Hub2-ospfv3-1] quit
[Hub2] interface loopback 0
[Hub2-LoopBack0] ospfv3 1 area 0.0.0.0
[Hub2-LoopBack0] quit
[Hub2] interface tunnel 1
[Hub2-Tunnel1] ospfv3 1 area 0.0.0.0
[Hub2-Tunnel1] ospfv3 network-type p2mp
[Hub2-Tunnel1] quit
#Spoke1配置路由信息。
<Spoke1> system-view
[Spoke1] ospfv3 1
[Spoke1-ospfv3-1] router-id 0.0.0.3
[Spoke1-ospfv3-1] area 0.0.0.0
[Spoke1-ospfv3-1-area-0.0.0.0] quit
[Spoke1-ospfv3-1] quit
[Spoke1] interface tunnel 1
[Spoke1-Tunnel1] ospfv3 1 area 0.0.0.0
[Spoke1-Tunnel1] ospfv3 network-type p2mp
[Spoke1-Tunnel1] quit
#Spoke2配置路由信息。
<Spoke2> system-view
[Spoke2] ospfv3 1
[Spoke2-ospfv3-1] router-id 0.0.0.4
[Spoke2-ospfv3-1] area 0.0.0.0
[Spoke2-ospfv3-1-area-0.0.0.0] quit
[Spoke2-ospfv3-1] quit
[Spoke2] interface tunnel 1
[Spoke2-Tunnel1] ospfv3 1 area 0.0.0.0
[Spoke2-Tunnel1] ospfv3 network-type p2mp
[Spoke2-Tunnel1] quit
[Spoke2] interface gigabitethernet 2/1/2
[Spoke2-GigabitEthernet2/1/2] ospfv3 1 area 0.0.0.0
[Spoke2-GigabitEthernet2/1/2] quit
(5) 使能IPv6组播路由,并使能IPv6 PIM-SM和MLD
#Hub1使能IPv6组播路由,并使能IPv6 PIM-SM、IPv6 PIM-NBMA
<Hub1> system-view
[Hub1] ipv6 multicast routing
[Hub1-mrib6] quit
[Hub1] interface loopback 0
[Hub1-LoopBack0] ipv6 pim sm
[Hub1-LoopBack0] quit
[Hub1] interface gigabitethernet 2/1/2
[Hub1-GigabitEthernet2/1/2] ipv6 pim sm
[Hub1-GigabitEthernet2/1/2] quit
[Hub1] interface tunnel 1
[Hub1-Tunnel1] ipv6 pim sm
[Hub1-Tunnel1] ipv6 pim nbma-mode
[Hub1-Tunnel1] quit
#配置C-BSR、C-RP
<Hub1> system-view
[Hub1] ipv6 pim
[Hub1-pim6] c-bsr 44::44
[Hub1-pim6] c-rp 44::44
[Hub1-pim6] quit
#Hub2使能IPv6组播路由,并使能IPv6 PIM-SM、IPv6 PIM-NBMA
<Hub2> system-view
[Hub2] ipv6 multicast routing
[Hub2-mrib6] quit
[Hub2] interface loopback 0
[Hub2-LoopBack0] ipv6 pim sm
[Hub2-LoopBack0] quit
[Hub2] interface tunnel 1
[Hub2-Tunnel1] ipv6 pim sm
[Hub2-Tunnel1] ipv6 pim nbma-mode
[Hub2-Tunnel1] quit
#配置C-BSR、C-RP
<Hub2> system-view
[Hub2] ipv6 pim
[Hub2-pim6] c-bsr 55::55
[Hub2-pim6] c-rp 55::55
[Hub2-pim6] quit
#Spoke1使能IPv6组播路由,并使能IPv6 PIM-SM、IPv6 PIM-NBMA、MLD
<Spoke1> system-view
[Spoke1] ipv6 multicast routing
[Spoke1-mrib6] quit
[Spoke1] interface tunnel 1
[Spoke1-Tunnel1] ipv6 pim sm
[Spoke1-Tunnel1] ipv6 pim nbma-mode
[Spoke1-Tunnel1] quit
[Spoke1] interface gigabitethernet 2/1/2
[Spoke1-GigabitEthernet2/1/2] mld enable
[Spoke1-GigabitEthernet2/1/2] quit
#Spoke2使能IPv6组播路由,并使能IPv6 PIM-SM、IPv6 PIM-NBMA
<Spoke2> system-view
[Spoke2] ipv6 multicast routing
[Spoke2-mrib6] quit
[Spoke2] interface tunnel 1
[Spoke2-Tunnel1] ipv6 pim sm
[Spoke2-Tunnel1] ipv6 pim nbma-mode
[Spoke2-Tunnel1] quit
组播源向Hub1发送组播组FF0e::1组播数据,接收者向Spoke1加入该组播组后能够收到组播源发来的组播数据。
# 显示Hub1上的PIM路由表信息。
[Hub1] display ipv6 pim routing-table
Total 1 (*, G) entries; 1 (S, G) entries
(*, FF0E::1)
RP: 44::44 (local)
Protocol: pim-sm, Flag: WC
UpTime: 17:02:10
Upstream interface: Register-Tunnel1
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface information:
Total number of downstream interfaces: 1
1: Tunnel1, FE80::3
Protocol: pim-sm, UpTime: 17:01:23, Expires: 00:02:41
(100::1, FF0E::1)
RP: 44::44 (local)
Protocol: pim-sm, Flag: SPT LOC ACT
UpTime: 00:00:02
Upstream interface: GigabitEthernet2/1/3
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface information:
Total number of downstream interfaces: 1
1: tunnel1, FE80::3
Protocol: pim-sm, UpTime: 00:00:02, Expires: 00:03:28
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!