02-S12500_IPv6_PIM-SM典型配置举例
本章节下载: 02-S12500_IPv6_PIM-SM典型配置举例 (171.15 KB)
目 录
本文档介绍了IPv6 PIM-SM配置举例。
IPv6 PIM-SM(Protocol Independent Multicast-Sparse Mode,稀疏模式协议无关组播)属于稀疏模式的IPv6组播路由协议,使用“拉(Pull)模式”传送IPv6组播数据,通常适用于IPv6组播组成员分布相对分散、范围较广的大中型网络。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解IPv6 PIM-SM特性。
如图1所示,三层交换机Switch A、Switch B和Switch C之间采用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,需要在Switch A和Switch B上配置C-BSR来自动选举产生BSR,以负责收集C-RP发来的宣告报文。
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
· 同一台设备所有接口上所使能的IPv6 PIM模式必须相同。
· BSR和RP接口必须使能IPv6 PIM-SM。
· 在边界设备连接用户网络的接口上必须使能MLDv1功能,以建立和维护各IPv6组播组的成员关系。
(1) 使能IPv6组播路由功能
<SwitchA> system-view
System View: return to User View with Ctrl+Z.
[SwitchA] ipv6 multicast routing-enable
(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] ipv6 pim sm
[SwitchA-LoopBack0] ospfv3 1 area 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] ipv6 pim sm
[SwitchA-Vlan-interface100] ospfv3 1 area 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
# 配置连接Switch B的接口及接口地址,使能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] ipv6 pim sm
[SwitchA-Vlan-interface12] ospfv3 1 area 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
# 配置连接Switch C的接口及接口地址,使能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] ipv6 pim sm
[SwitchA-Vlan-interface13] ospfv3 1 area 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] ipv6 pim
[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
(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
# 配置连接Switch A的接口及接口地址,使能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] ipv6 pim sm
[SwitchB-Vlan-interface12] ospfv3 1 area 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
# 配置连接Switch C的接口及接口地址,使能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] ipv6 pim sm
[SwitchB-Vlan-interface23] ospfv3 1 area 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(缺省情况下,MLD的版本为MLDv1)。
[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] ipv6 pim sm
[SwitchB-Vlan-interface101] ospfv3 1 area 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] ipv6 pim
[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
(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
# 配置连接Switch A的接口及接口地址,使能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] ipv6 pim sm
[SwitchC-Vlan-interface13] ospfv3 1 area 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
# 配置连接Switch B的接口及接口地址,使能IPv6 PIM-SM和OSPFv3。
[SwitchC] vlan 23
[SwitchC-vlan23] port GigabitEthernet3/0/2
[SwitchC-vlan23] quit
[SwitchC] interface Vlan-interface 23
[SwitchC-Vlan-interface23] ipv6 address 2001:23::3 64
[SwitchC-Vlan-interface23] ipv6 pim sm
[SwitchC-Vlan-interface23] ospfv3 1 area 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(缺省情况下,MLD的版本为MLDv1)。
[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] ipv6 pim sm
[SwitchC-Vlan-interface102] ospfv3 1 area 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(缺省情况下,MLD的版本为MLDv1)。
[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] ipv6 pim
[SwitchC-pim6] static-rp 2001:13::3
[SwitchC-pim6] quit
(1) 按照如上配置,查看配置信息发现Switch A、Switch B、Switch C两两之间建立IPv6 PIM邻居关系。
# 查看Switch A上的IPv6 PIM邻居信息。
[SwitchA] display ipv6 pim neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires DR-Priority
FE80::201:FF:FE Vlan12 00:15:51 00:01:37 1
01:1140
FE80::223:89FF: Vlan23 00:06:10 00:01:17 1
FEBC:8580
# 查看Switch B上的IPv6 PIM邻居信息。
[SwitchB] display ipv6 pim neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires DR-Priority
FE80::A01:101:1 Vlan12 00:11:51 00:01:37 1
FE80::223:89FF: Vlan23 00:03:10 00:01:17 1
FEBC:8580
# 查看Switch C上的IPv6 PIM邻居信息。
[SwitchC] display ipv6 pim neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires DR-Priority
FE80::A01:101:1 Vlan13 00:16:51 00:01:37 1
FE80::201:FF:FE Vlan23 00:04:10 00:01:17 1
01:1140
(2) 通过使用display ipv6 pim bsr-info命令可以查看IPv6 PIM-SM域中的BSR信息。
# 查看Switch A上PIM-SM域中的BSR信息。
[SwitchA] display ipv6 pim bsr-info
Scope: non-scoped
State: Elected
Bootstrap timer: 00:01:44
Elected BSR address: 2001:2001::1
Priority: 64
Hash mask length: 128
Uptime: 00:01:18
Candidate BSR address: 2001:2001::1
Priority: 64
Hash mask length: 128
# 查看Switch B上PIM-SM域中的BSR信息。
[SwitchB] display ipv6 pim bsr-info
Scope: non-scoped
State: Candidate
Bootstrap timer: 00:01:44
Elected BSR address: 2001:2001::1
Priority: 64
Hash mask length: 128
Uptime: 00:05:26
Candidate BSR address: 2001:12::2
Priority: 64
Hash mask length: 128
# 显示Switch C上IPv6 PIM-SM域中的BSR信息。
[SwitchC] display ipv6 pim bsr-info
Scope: non-scoped
State: Accept Preferred
Bootstrap timer: 00:01:46
Elected BSR address: 2001:2001::1
Priority: 64
Hash mask length: 128
Uptime: 00:04:22
(3) 通过使用display ipv6 pim rp-info命令可以查看IPv6 PIM-SM域中的RP信息。
# 查看Switch A上所有组播组对应的RP信息。
[SwitchA] display ipv6 pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: FF00::/8
RP address Priority HoldTime Uptime Expires
2001:2001::1 (local) 10 150 00:51:45 00:02:22
2001:12::2 20 150 00:15:36 00:02:29
Static RP information:
RP address ACL Mode Preferred
2001:13::3 ---- pim-sm No
# 查看Switch B上所有组播组对应的RP信息。
[SwitchB] display ipv6 pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: FF00::/8
RP address Priority HoldTime Uptime Expires
2001:2001::1 10 150 00:05:06 00:02:51
2001:12::2 (local) 20 150 00:20:36 00:02:35
Static RP information:
RP address ACL Mode Preferred
2001:13::3 ---- pim-sm No
# 查看Switch C上所有组播组对应的RP信息。
[SwitchC] display ipv6 pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: FF00::/8
RP address Priority HoldTime Uptime Expires
2001:2001::1 10 150 00:04:06 00:02:51
2001:12::2 20 150 03:02:36 00:02:35
Static RP information:
RP address ACL Mode Preferred
2001:13::3 ---- pim-sm No
(4) 查看交换机的IPv6 PIM路由表信息。
# Host A指定加入IPv6组播组G(FF0E::101)后,查看Switch B上的IPv6 PIM路由表信息,可以看出具体的(S,G)表项,(*,G)与(S,G)表项总数、IPv6 PIM的模式、入接口、上游邻居、RPF邻居和下游接口信息。
[SwitchB] display ipv6 pim routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, FF0E::101)
RP: FE80::A01:101:1
Protocol: pim-sm, Flag: WC
UpTime: 00:04:27
Upstream interface: Vlan-interface12
Upstream neighbor: FE80::A01:101:1
RPF prime neighbor: FE80::A01:101:1
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan101
Protocol: mld, UpTime: 00:04:27, Expires: -
(2001:100::2, FF0E::101)
RP: FE80::A01:101:1
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:05
Upstream interface: Vlan-interface12
Upstream neighbor: FE80::A01:101:1
RPF prime neighbor: FE80::A01:101:1
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan101
Protocol: pim-sm, UpTime: 00:00:05, Expires: -
Switch A、Switch C上的显示信息与Switch B类似。
· Switch A
#
vlan 12 to 13
#
vlan 100
#
ipv6 multicast routing-enable
#
interface Vlan-interface12
ipv6 address 2001:12::1/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface Vlan-interface13
ipv6 address 2001:13::1/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface Vlan-interface100
ipv6 address 2001:100::1/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface LoopBack0
ipv6 address 2001:2001::1/128
ospfv3 1 area 0.0.0.0
ipv6 pim 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
#
ipv6 pim
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 routing-enable
#
interface Vlan-interface12
ipv6 address 2001:12::2/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface Vlan-interface23
ipv6 address 2001:23::2/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface Vlan-interface101
ipv6 address 2001:101::1/64
ospfv3 1 area 0.0.0.0
mld enable
ipv6 pim 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
#
ipv6 pim
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 routing-enable
#
interface Vlan-interface13
ipv6 address 2001:13::3/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface Vlan-interface23
ipv6 address 2001:23::3/64
ospfv3 1 area 0.0.0.0
ipv6 pim sm
#
interface Vlan-interface33
ipv6 address 2001:33::3/64
ospfv3 1 area 0.0.0.0
mld enable
ipv6 pim sm
#
interface Vlan-interface102
ipv6 address 2001:102::1/64
ospfv3 1 area 0.0.0.0
mld enable
ipv6 pim 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
#
ipv6 pim
static-rp 2001:13::3
#
· 《H3C S12500系列路由交换机 IP组播配置指导》中的“IPv6 PIM”
· 《H3C S12500系列路由交换机 IP组播命令参考》中的“IPv6 PIM”
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!