03-H3C S12500 IPv6 PIM-SM典型配置举例
本章节下载: 03-H3C S12500 IPv6 PIM-SM典型配置举例 (169.52 KB)
Copyright © 2013 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍了IPv6 PIM-SM配置举例。
IPv6 PIM-SM(Protocol Independent Multicast-Sparse Mode,稀疏模式协议无关组播)属于稀疏模式的IPv6组播路由协议,使用“拉(Pull)模式”传送IPv6组播数据,通常适用于IPv6组播组成员分布相对分散、范围较广的大中型网络。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解IPv6 PIM-SM特性。
如图1所示,三层交换机SwitchA、SwitchB和SwitchC之间采用OSPFv3协议进行互连,IPv6单播路由正常。接收者通过IPv6组播方式接收视频点播信息,末梢用户网络N1、N2、N3中存在不同视频信息的接收者。
要求在该网络中采用IPv6 PIM-SM协议实现IPv6组播数据的分发,并通过自举机制来动态选举RP,同时配置静态RP以避免动态RP故障而使通信中断。
图1 IPv6 PIM-SM配置组网图
设备 |
接口 |
IPv6地址 |
设备 |
接口 |
IPv6地址 |
Switch A |
Vlan-int100(GE3/0/1) |
2001:100::1/64 |
Switch C |
Vlan-int102(GE3/0/1) |
2001:102::1/64 |
|
Vlan-int12(GE3/0/2) |
2001:12::1/64 |
|
Vlan-int13(GE3/0/3) |
2001:13::3/64 |
|
Vlan-int13(GE3/0/3) |
2001:13::1/64 |
|
Vlan-int23(GE3/0/2) |
2001:23::3/64 |
|
Loopback0 |
2001:2001::1/128 |
|
Vlan-int33(GE3/0/4) |
2001:33::3/64 |
Switch B |
Vlan-int101(GE3/0/1) |
2001:101::1/64 |
|
|
|
|
Vlan-int12(GE3/0/2) |
2001:12::2/64 |
|
|
|
|
Vlan-int23(GE3/0/3) |
2001:23::2/64 |
|
|
|
· 为了确保一个C-RP故障时,另一个C-RP能够生效,将Switch A的Loopback接口0和Switch B的VLAN接口12均配置为C-RP,其中前者的优先级较高;同时为了确保上述两个接口都发生故障时静态RP能够生效,将Swtich C的VLAN接口13配置为静态RP。
· 为了能动态选举出RP,还需要在SwitchA和Switch B上配置C-BSR来自动选举产生BSR,以负责收集C-RP发来的宣告报文。
本举例是在S12500-CMW520-R1825P01版本上进行配置和验证的。
· 为实现IPv6报文在各个交换机上能正常转发,必须先使能IPv6报文转发功能(缺省情况为关闭)。
· 同一台设备所有接口上所使能的IPv6 PIM模式必须相同。
· BSR和RP接口必须使能IPv6 PIM-SM。
· 在边界设备连接用户网络的接口上必须使能MLDv1功能,以建立和维护各IPv6组播组的成员关系。
(1) 使能组播路由功能和IPv6报文转发功能
<SwitchA> system-view
[SwitchA] multicast ipv6 routing-enable
[SwitchA] ipv6
(2) 配置OSPFv3路由协议
# 配置OSPFv3路由协议。
[SwitchA] ospfv3 1
[SwitchA-ospfv3-1] router-id 1.1.1.1
[SwitchA-ospfv3-1] area 0
[SwitchA-ospfv3-1-area-0.0.0.0] quit
[SwitchA-ospfv3-1] quit
(3) 配置各接口及接口地址,并使能IPv6 PIM-SM和OSPFv3
# 配置作为BSR和RP的Loopback口0的IPv6地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchA] interface LoopBack 0
[SwitchA-LoopBack0] ipv6 address 2001:2001::1 128
[SwitchA-LoopBack0] pim ipv6 sm
[SwitchA-LoopBack0] ospfv3 1 area 0.0.0.0
[SwitchA-LoopBack0] quit
# 配置连接组播源的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchA] vlan 100
[SwitchA-vlan100] port GigabitEthernet 3/0/1
[SwitchA-vlan100] quit
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ipv6 address 2001:100::1 64
[SwitchA-Vlan-interface100] pim ipv6 sm
[SwitchA-Vlan-interface100] ospfv3 1 area 0.0.0.0
[SwitchA-Vlan-interface100] undo shutdown
[SwitchA-Vlan-interface100] quit
[SwitchA] interface GigabitEthernet 3/0/1
[SwitchA-GigabitEthernet3/0/1] undo shutdown
[SwitchA-GigabitEthernet3/0/1] quit
# 配置连接SwitchB的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchA] vlan 12
[SwitchA-vlan12] port GigabitEthernet 3/0/2
[SwitchA-vlan12] quit
[SwitchA] interface Vlan-interface 12
[SwitchA-Vlan-interface12] ipv6 address 2001:12::1 64
[SwitchA-Vlan-interface12] pim ipv6 sm
[SwitchA-Vlan-interface12] ospfv3 1 area 0.0.0.0
[SwitchA-Vlan-interface12] undo shutdown
[SwitchA-Vlan-interface12] quit
[SwitchA] interface GigabitEthernet 3/0/2
[SwitchA-GigabitEthernet3/0/2] undo shutdown
[SwitchA-GigabitEthernet3/0/2] quit
# 配置连接SwitchC的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchA] vlan 13
[SwitchA-vlan13] port GigabitEthernet 3/0/3
[SwitchA-vlan13] quit
[SwitchA] interface Vlan-interface 13
[SwitchA-Vlan-interface13] ipv6 address 2001:13::1 64
[SwitchA-Vlan-interface13] pim ipv6 sm
[SwitchA-Vlan-interface13] ospfv3 1 area 0.0.0.0
[SwitchA-Vlan-interface13] undo shutdown
[SwitchA-Vlan-interface13] quit
[SwitchA] interface GigabitEthernet 3/0/3
[SwitchA-GigabitEthernet3/0/3] undo shutdown
[SwitchA-GigabitEthernet3/0/3] quit
(4) 配置C-RP和静态RP
# 指定Loopback接口0的IPv6地址为C-BSR和C-RP,其中C-RP的优先级为10。
[SwitchA] pim ipv6
[SwitchA-pim6] c-bsr 2001:2001::1
[SwitchA-pim6] c-rp 2001:2001::1 priority 10
# 指定Switch C的VLAN接口13的IPv6地址为静态RP的IPv6地址。
[SwitchA-pim6] static-rp 2001:13::3
[SwitchA-pim6] quit
(1) 使能组播路由功能和IPv6报文转发功能
<SwitchB> system-view
System View: return to User View with Ctrl+Z.
[SwitchB] ipv6 multicast routing-enable
[SwitchB] ipv6
(2) 配置OSPFv3路由协议
# 配置OSPFv3路由协议。
[SwitchB] ospfv3 1
[SwitchB-ospfv3-1] router-id 1.1.1.2
[SwitchB-ospfv3-1] area 0
[SwitchB-ospfv3-1-area-0.0.0.0] quit
[SwitchB-ospfv3-1] quit
(3) 配置各接口及接口地址,并使能IPv6 PIM-SM和OSPFv3
# 配置连接SwitchA的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchB] vlan 12
[SwitchB-vlan12] port GigabitEthernet 3/0/2
[SwitchB-vlan12] quit
[SwitchB] interface Vlan-interface 12
[SwitchB-Vlan-interface12] ipv6 address 2001:12::2 64
[SwitchB-Vlan-interface12] pim ipv6 sm
[SwitchB-Vlan-interface12] ospfv3 1 area 0.0.0.0
[SwitchB-Vlan-interface12] undo shutdown
[SwitchB-Vlan-interface12] quit
[SwitchB] interface GigabitEthernet 3/0/2
[SwitchB-GigabitEthernet3/0/2] undo shutdown
[SwitchB-GigabitEthernet3/0/2] quit
# 配置连接SwitchC的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchB] vlan 23
[SwitchB-vlan23] port GigabitEthernet 3/0/3
[SwitchB-vlan23] quit
[SwitchB] interface Vlan-interface 23
[SwitchB-Vlan-interface23] ipv6 address 2001:23::2 64
[SwitchB-Vlan-interface23] pim ipv6 sm
[SwitchB-Vlan-interface23] ospfv3 1 area 0.0.0.0
[SwitchB-Vlan-interface23] undo shutdown
[SwitchB-Vlan-interface23] quit
[SwitchB] interface GigabitEthernet 3/0/3
[SwitchB-GigabitEthernet3/0/3] undo shutdown
[SwitchB-GigabitEthernet3/0/3] quit
# 配置连接网络N1的接口及接口地址,使能IPv6 PIM-SM、OSPFv3和MLD。
[SwitchB] vlan 101
[SwitchB-vlan101] port GigabitEthernet 3/0/1
[SwitchB-vlan101] quit
[SwitchB] interface Vlan-interface 101
[SwitchB-Vlan-interface101] ipv6 address 2001:101::1 64
[SwitchB-Vlan-interface101] pim ipv6 sm
[SwitchB-Vlan-interface101] ospfv3 1 area 0.0.0.0
[SwitchB-Vlan-interface101] mld enable
[SwitchB-Vlan-interface101] undo shutdown
[SwitchB-Vlan-interface101] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] quit
(4) 配置C-RP和静态RP
# 指定VLAN接口12的IPv6地址为C-BSR和C-RP,其中C-RP的优先级为20。
[SwitchB] pim ipv6
[SwitchB-pim6] c-bsr 2001:12::2
[SwitchB-pim6] c-rp 2001:12::2 priority 20
# 指定Switch C的VLAN接口13的IPv6地址为静态RP的IPv6地址。
[SwitchB-pim6] static-rp 2001:13::3
[SwitchB-pim6] quit
(1) 使能组播路由功能和IPv6报文转发功能
<SwitchC> system-view
System View: return to User View with Ctrl+Z.
[SwitchC] ipv6 multicast routing-enable
[SwitchC] ipv6
(2) 配置OSPFv3路由协议
# 配置OSPFv3路由协议。
[SwitchC] ospfv3 1
[SwitchC-ospfv3-1] router-id 1.1.1.3
[SwitchC-ospfv3-1] area 0
[SwitchC-ospfv3-1-area-0.0.0.0] quit
[SwitchC-ospfv3-1] quit
(3) 配置各接口及接口地址,并使能IPv6 PIM-SM和OSPFv3
# 配置连接SwitchA的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchC] vlan 13
[SwitchC-vlan13] port GigabitEthernet 3/0/3
[SwitchC-vlan13] quit
[SwitchC] interface Vlan-interface 13
[SwitchC-Vlan-interface13] ipv6 address 2001:13::3 64
[SwitchC-Vlan-interface13] pim ipv6 sm
[SwitchC-Vlan-interface13] ospfv3 1 area 0.0.0.0
[SwitchC-Vlan-interface13] undo shutdown
[SwitchC-Vlan-interface13] quit
[SwitchC] interface GigabitEthernet 3/0/3
[SwitchC-GigabitEthernet3/0/3] undo shutdown
[SwitchC-GigabitEthernet3/0/3] quit
# 配置连接SwitchB的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchC] vlan 23
[SwitchC-vlan23] port GigabitEthernet 3/0/2
[SwitchC-vlan23] quit
[SwitchC] interface Vlan-interface 23
[SwitchC-Vlan-interface23] ipv6 address 2001:23::3 64
[SwitchC-Vlan-interface23] pim ipv6 sm
[SwitchC-Vlan-interface23] ospfv3 1 area 0.0.0.0
[SwitchC-Vlan-interface23] undo shutdown
[SwitchC-Vlan-interface23] quit
[SwitchC] interface GigabitEthernet 3/0/2
[SwitchC-GigabitEthernet3/0/2] undo shutdown
[SwitchC-GigabitEthernet3/0/2] quit
# 配置连接网络N2的接口及接口地址,使能IPv6 PIM-SM、OSPFv3和MLD。
[SwitchC] vlan 102
[SwitchC-vlan102] port GigabitEthernet 3/0/1
[SwitchC-vlan102] quit
[SwitchC] interface Vlan-interface 102
[SwitchC-Vlan-interface102] ipv6 address 2001:102::1 64
[SwitchC-Vlan-interface102] pim ipv6 sm
[SwitchC-Vlan-interface102] ospfv3 1 area 0.0.0.0
[SwitchC-Vlan-interface102] mld enable
[SwitchC-Vlan-interface102] undo shutdown
[SwitchC-Vlan-interface102] quit
[SwitchC] interface GigabitEthernet 3/0/1
[SwitchC-GigabitEthernet3/0/1] undo shutdown
[SwitchC-GigabitEthernet3/0/1] quit
# 配置连接网络N3的接口及接口地址,使能IPv6 PIM-SM、OSPFv3和MLD。
[SwitchC] vlan 33
[SwitchC-vlan33] port GigabitEthernet 3/0/4
[SwitchC-vlan33] quit
[SwitchC] interface Vlan-interface 33
[SwitchC-Vlan-interface33] ipv6 address 2001:33::3 64
[SwitchC-Vlan-interface33] pim ipv6 sm
[SwitchC-Vlan-interface33] ospfv3 1 area 0.0.0.0
[SwitchC-Vlan-interface33] mld enable
[SwitchC-Vlan-interface33] undo shutdown
[SwitchC-Vlan-interface33] quit
[SwitchC] interface GigabitEthernet 3/0/4
[SwitchC-GigabitEthernet3/0/4] undo shutdown
[SwitchC-GigabitEthernet3/0/4] quit
(4) 配置静态RP。指定VLAN接口13的IPv6地址为静态RP的IPv6地址
[SwitchC] pim ipv6
[SwitchC-pim6] static-rp 2001:13::3
[SwitchC-pim6] quit
(1) 按照如上配置,查看配置信息发现SwitchA、SwitchB、SwitchC两两之间建立IPv6 PIM邻居关系。
# 查看SwitchA上的PIM邻居信息。
[SwtichA] display pim neighbor
VPN-Instance: public net
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires Dr-Priority Mode
FE80::201:FF:FE Vlan12 00:01:23 00:01:20 1
01:1140
FE80::223:89FF: Vlan23 00:01:25 00:01:21 1
FEBC:8580
# 查看SwitchB上的IPv6 PIM邻居信息。
[SwtichB] display pim ipv6 neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires Dr-Priority Mode
FE80::A01:101:1 Vlan12 00:01:23 00:01:27 1
FE80::223:89FF: Vlan23 00:01:44 00:01:28 1
FEBC:8580
# 查看SwitchC上的PIM邻居信息。
[SwtichC] display pim neighbor
VPN-Instance: public net
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires Dr-Priority Mode
FE80::A01:101:1 Vlan13 00:01:44 00:01:30 1
FE80::201:FF:FE Vlan23 00:01:25 00:01:31 1
01:1140
(2) 通过使用display ipv6 pim rp-info命令可以查看IPv6 PIM-SM域中的RP信息。
# 查看SwitchB上所有IPv6组播组对应的RP信息。
[SwitchB] display pim ipv6 rp-info
PIM-SM BSR RP information:
prefix/prefix length: FF00::/8
RP: 2001:2001::1
Priority: 10
HoldTime: 150
Uptime: 04:09:40
Expires: 00:02:30
PIM-SM static RP information:
Static RP: 2001:13::3
Switch A、Switch C上的显示信息与Switch B类似。
(3) 查看交换机的IPv6 PIM路由表信息。
# Host A指定加入IPv6组播组G(FF0E::101)后,查看Switch B上的IPv6 PIM路由表信息,可以看出具体的(S,G)表项,(*,G)与(S,G)表项总数、IPv6 PIM的模式、入接口、上游邻居、RPF邻居和下游接口信息。
[SwitchB] display pim ipv6 routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, FF1E::101)
RP: FE80::2E0:FF:FEFC:3100
Protocol: pim-sm, Flag: WC
UpTime: 00:02:00
Upstream interface: Vlan-interface12
Upstream neighbor: FE80::2E0:FF:FEFC:3100
RPF prime neighbor: FE80::2E0:FF:FEFC:3100
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan-interface101
Protocol: mld, UpTime: 00:02:00, Expires: -
(2001:100::2, FF1E::101)
RP: FE80::2E0:FF:FEFC:3100
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:12
Upstream interface: Vlan-interface12
Upstream neighbor: FE80::2E0:FF:FEFC:3100
RPF prime neighbor: FE80::2E0:FF:FEFC:3100
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan-interface101
Protocol: pim-sm, UpTime: - , Expires: -
Switch A、Switch C上的显示信息与Switch B类似。
· Switch A
#
vlan 12 to 13
#
vlan 100
#
ipv6
#
multicast ipv6 routing-enable
#
interface Vlan-interface12
ipv6 address 2001:12::1/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface Vlan-interface13
ipv6 address 2001:13::1/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface Vlan-interface100
ipv6 address 2001:100::1/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface LoopBack0
ipv6 address 2001:2001::1/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 100
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 12
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 13
#
ospfv3 1
router-id 1.1.1.1
area 0.0.0.0
#
pim ipv6
c-bsr 2001:2001::1
c-rp 2001:2001::1 priority 10
static-rp 2001:13::3
#
· Switch B
#
vlan 12
#
vlan 23
#
vlan 101
#
ipv6
#
multicast ipv6 routing-enable
#
interface Vlan-interface12
ipv6 address 2001:12::2/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface Vlan-interface23
ipv6 address 2001:23::2/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface Vlan-interface101
ipv6 address 2001:101::1/64
ospfv3 1 area 0.0.0.0
mld enable
pim ipv6 sm
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 101
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 12
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 23
#
ospfv3 1
router-id 1.1.1.2
area 0.0.0.0
#
pim ipv6
c-bsr 2001:12::2
c-rp 2001:12::2 priority 20
static-rp 2001:13::3
#
· Switch C
#
vlan 13
#
vlan 23
#
valn33
#
vlan 102
#
ipv6
#
multicast ipv6 routing-enable
#
interface Vlan-interface13
ipv6 address 2001:13::3/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface Vlan-interface23
ipv6 address 2001:23::3/64
ospfv3 1 area 0.0.0.0
pim ipv6 sm
#
interface Vlan-interface33
ipv6 address 2001:33::3/64
ospfv3 1 area 0.0.0.0
mld enable
pim ipv6 sm
#
interface Vlan-interface102
ipv6 address 2001:102::1/64
ospfv3 1 area 0.0.0.0
mld enable
pim ipv6 sm
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 102
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 23
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 13
#
interface GigabitEthernet3/0/4
port link-mode bridge
port access vlan 33
#
ospfv3 1
router-id 1.1.1.3
area 0.0.0.0
#
pim ipv6
static-rp 2001:13::3
#
· 《H3C S12500系列路由交换机 IP组播配置指导》中的“IPv6 PIM”
· 《H3C S12500系列路由交换机 IP组播命令参考》中的“IPv6 PIM”
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!