30-PIM典型配置举例
本章节下载: 30-PIM典型配置举例 (254.54 KB)
目 录
本章介绍了通过PIM(Protocol Independent Multicast,协议无关组播)协议生成组播路由表来指导组播转发的典型配置案例。
PIM分为以下几种类型:
· PIM-DM(Protocol Independent Multicast-Dense Mode,协议无关组播—密集模式),属于ASM(Any-Source Multicast,任意信源组播)模型,通常适用于组播组成员相对比较密集的小型网络。
· PIM-SM(Protocol Independent Multicast-Sparse Mode,协议无关组播—稀疏模式),属于ASM(Any-Source Multicast,任意信源组播)模型,通常适用于组播组成员分布相对分散、范围较广的大中型网络。为了实现精细化管理,PIM-SM中增加了管理域机制,通过私有组地址为特定区域提供专门的服务。
同一台设备所有接口上所启用的PIM模式必须相同。
表1 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图1所示,用户网络N1、N2和组播源网络分别与三层网络内的Switch A、Switch B、Switch C相连,整个网络单播路由正常。
现要求通过在该网络内的各三层交换机上配置PIM-DM,实现用户网络N1、N2内的组播接收者能通过该网络接收到组播源发来的组播数据报文。
图1 PIM-DM典型配置组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Switch A |
Vlan-int100 |
10.110.1.1/24 |
Switch C |
Vlan-int300 |
10.110.5.1/24 |
|
Vlan-int102 |
192.168.1.1/24 |
|
Vlan-int102 |
192.168.1.2/24 |
Switch B |
Vlan-int200 |
10.110.2.1/24 |
|
Vlan-int101 |
192.168.2.2/24 |
|
Vlan-int101 |
192.168.2.1/24 |
|
|
|
需要在三层网络中连接用户网络的边界三层交换机上使能IGMP功能,以建立和维护各组播组成员关系。
(1) 配置IP地址和单播路由协议
请按照1.3.2 图1配置各接口的IP地址和子网掩码,具体配置过程略。
配置PIM-DM域内的各交换机之间采用OSPF协议进行互连,确保PIM-DM域内部在网络层互通,并且各交换机之间能够借助单播路由协议实现动态路由更新,具体配置过程略。
(2) 使能IP组播路由,并配置PIM-DM功能
# 在Switch A上使能IP组播路由,在各接口上使能PIM-DM。
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] pim dm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] pim dm
[SwitchA-Vlan-interface102] quit
Switch B和Switch C的配置与Switch A相似,配置过程略。
(3) 在连接网络N1和N2的设备接口上使能IGMPv2功能
# 在Switch A的接口Vlan-interface100上使能IGMP(缺省情况下,IGMP的版本为IGMPv2)。
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp enable
[SwitchA-Vlan-interface100] quit
Switch B的配置与Switch A相似,配置过程略。
配置完成后,通过Host A、Host C和Source检验一下配置效果:
· Host A和Host C分别发送IGMPv2成员关系报告报文,指定加入组播组G(225.1.1.1),成为该组播组的接收者;
· 组播源S(10.110.5.100/24)向该组播组G发送组播数据报文。
通过使用display pim routing-table命令可以查看交换机上的PIM路由表信息。例如:
# 查看Switch C上的PIM路由表信息。
[SwitchC] display pim routing-table
Total 0 (*, G) entry; 1 (S, G) entry
(10.110.5.100, 225.1.1.1)
Protocol: pim-dm, Flag: LOC ACT
UpTime: 00:03:27
Upstream interface: Vlan-interface300
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 2
1: Vlan101
Protocol: pim-dm, UpTime: 00:03:27, Expires: -
2: Vlan102
Protocol: pim-dm, UpTime: 00:03:27, Expires: -
# 查看Switch A上的PIM路由表信息。
[SwitchA] display pim routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
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: Vlan100
Protocol: igmp, UpTime: 00:04:25, Expires: -
(10.110.5.100, 225.1.1.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:06:14
Upstream interface: Vlan-interface102,
Upstream neighbor: 192.168.1.2
RPF prime neighbor: 192.168.1.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan100
Protocol: pim-dm, UpTime: 00:04:25, Expires: -
# 查看Switch B上的PIM路由表信息。
[SwitchB] display pim routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
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: Vlan200
Protocol: igmp, UpTime: 00:04:25, Expires: -
(10.110.5.100, 225.1.1.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:06:14
Upstream interface: Vlan-interface101,
Upstream neighbor: 192.168.2.2
RPF prime neighbor: 192.168.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan200
Protocol: pim-dm, UpTime: 00:04:25, Expires: -
由上显示信息可见,当组播源S发送组播组G的组播数据时,会通过扩散生成SPT,SPT路径中各交换机(以Switch A和Switch B路径为例)上都存在(S,G)表项;因Host A向Switch A发送IGMP成员关系报告报文进行注册,所以在Switch A上会生成(*,G)表项。
(1) Switch A配置信息
#
multicast routing-enable
#
vlan 100
#
vlan 102
#
interface Vlan-interface100
ip address 10.110.1.1 255.255.255.0.
pim dm
igmp enable
#
interface Vlan-interface102
ip address 192.168.1.1 255.255.255.0
pim dm
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
#
(2) Switch B配置信息
#
multicast routing-enable
#
vlan 101
#
vlan 200
#
interface Vlan-interface101
ip address 192.168.2.1 255.255.255.0.
pim dm
#
interface Vlan-interface200
ip address 10.110.2.1 255.255.255.0
pim dm
igmp enable
#
ospf 1
area 0.0.0.0
network 10.110.2.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
(3) Switch C配置信息
#
multicast routing-enable
#
vlan 101 to 102
#
vlan 300
#
interface Vlan-interface101
ip address 192.168.2.2 255.255.255.0.
pim dm
#
interface Vlan-interface102
ip address 192.168.1.2 255.255.255.0
pim dm
#
interface Vlan-interface300
ip address 10.110.5.1 255.255.255.0
pim dm
#
ospf 1
area 0.0.0.0
network 10.110.5.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
表2 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图2所示,三层网络内的Switch A连接用户网络N1,Switch B和Switch C共同连接用户网络N2,Switch D连接组播源网络,整个网络单播路由正常。
现要求通过在该网络内的各三层交换机上配置PIM-SM,实现用户网络N1、N2内的组播接收者能通过该网络接收到组播源发来的225.1.1.0/24范围内的组播数据报文。
图2 PIM-SM典型配置组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Switch A |
Vlan-int100 |
10.110.1.1/24 |
Switch D |
Vlan-int300 |
10.110.5.1/24 |
|
Vlan-int101 |
192.168.1.1/24 |
|
Vlan-int101 |
192.168.1.2/24 |
|
Vlan-int102 |
192.168.9.1/24 |
|
Vlan-int105 |
192.168.4.2/24 |
Switch B |
Vlan-int200 |
10.110.2.1/24 |
Switch E |
Vlan-int104 |
192.168.3.2/24 |
|
Vlan-int103 |
192.168.2.1/24 |
|
Vlan-int103 |
192.168.2.2/24 |
Switch C |
Vlan-int200 |
10.110.2.2/24 |
|
Vlan-int102 |
192.168.9.2/24 |
|
Vlan-int104 |
192.168.3.1/24 |
|
Vlan-int105 |
192.168.4.1/24 |
(1) 根据组网需求限定的组播组范围,来指定PIM-SM网络中C-RP所服务的组播组范围。
(2) 为缓解单个RP的负担,可在PIM-SM网络中配置多个C-RP,例如选取本例中Switch D和Switch E作为C-RP,通过自举机制,实现不同的C-RP服务于不同的组播组。
(3) 为避免因单个BSR发生故障致使网络中的组播业务被中断,可在PIM-SM网络中配置多个C-BSR,例如选取与C-RP相同的设备作为C-BSR,这样,一旦BSR发生故障,其余C-BSR能够通过自动选举产生新的BSR。
· 用户网络所处的共享网段内有多台三层设备时,需要在各三层设备上都配置IGMP和PIM-SM,避免因某台三层设备出现故障,而中断组播流量转发。
· 建议候选BSR和候选RP应配置在骨干网的三层交换机上。
· 配置C-RP时,若不指定其所服务的组播组范围,该RP将为所有组播组服务。
(1) 配置IP地址和单播路由协议
请按照1.4.2 图2配置各接口的IP地址和子网掩码,具体配置过程略。
配置PIM-SM域内的各交换机之间采用OSPF协议进行互连,确保PIM-SM域内部在网络层互通,并且各交换机之间能够借助单播路由协议实现动态路由更新,具体配置过程略。
(2) 使能IP组播路由,并在各接口上使能PIM-SM
# 在Switch A上使能IP组播路由,在各接口上使能PIM-SM。
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] pim sm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] pim sm
[SwitchA-Vlan-interface101] quit
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] pim sm
[SwitchA-Vlan-interface102] quit
Switch B、Switch C、Switch D和Switch E的配置与Switch A相似,配置过程略。
(3) 在连接网络N1和N2的接口上使能IGMPv2功能
# 在Switch A的接口Vlan-interface100上使能IGMP(缺省情况下,IGMP的版本为IGMPv2)。
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp enable
[SwitchA-Vlan-interface100] quit
Switch B和Switch C的配置与Switch A相似,配置过程略
(4) 配置C-BSR和C-RP
# 在Switch D上配置RP通告的服务范围,以及C-BSR和C-RP的位置,并指定哈希掩码长度为32,C-BSR的优先级为10。
<SwitchD> system-view
[SwitchD] acl number 2005
[SwitchD-acl-basic-2005] rule permit source 225.1.1.0 0.0.0.255
[SwitchD-acl-basic-2005] quit
[SwitchD] pim
[SwitchD-pim] c-bsr 192.168.4.2 hash-length 32 priority 10
[SwitchD-pim] c-rp 192.168.4.2 group-policy 2005
[SwitchD-pim] quit
# 在Switch E上配置RP通告的服务范围,以及C-BSR和C-RP的位置,并指定哈希掩码长度为32,C-BSR的优先级为20。
<SwitchE> system-view
[SwitchE] acl number 2005
[SwitchE-acl-basic-2005] rule permit source 225.1.1.0 0.0.0.255
[SwitchE-acl-basic-2005] quit
[SwitchE] pim
[SwitchE-pim] c-bsr 192.168.9.2 hash-length 32 priority 20
[SwitchE-pim] c-rp 192.168.9.2 group-policy 2005
[SwitchE-pim] quit
(1) 查看共享网络N2内IGMP查询器选举信息和DR选举信息
配置完成后,查看接入共享网络N2的组播路由器Switch B和Switch C上IGMP查询器选举信息和DR选举信息:
# 查看Switch B上IGMP查询器选举信息。
[SwitchB] display igmp interface
Vlan-interface200(10.110.2.1):
IGMP is enabled.
IGMP version: 2
Query interval for IGMP: 125s
Other querier present time for IGMP: 255s
Maximum query response time for IGMP: 10s
Querier for IGMP: 10.110.2.1 (This router)
IGMP groups reported in total: 1
# 查看Switch C上IGMP查询器选举信息。
[SwitchC] display igmp interface
Vlan-interface200(10.110.2.2):
IGMP is enabled.
IGMP version: 2
Query interval for IGMP: 125s
Other querier present time for IGMP: 255s
Maximum query response time for IGMP: 10s
Querier for IGMP: 10.110.2.1
IGMP groups reported in total: 1
由上显示信息可知,通过查询器选举,Switch B成为本共享网段的IGMP查询器(IGMP查询器选举原则:共享网段中IP地址最小的路由器将成为查询器)。
# 查看Switch B上DR选举信息。
[SwitchB] display pim interface
Interface NbrCnt HelloInt DR-Pri DR-Address
Vlan103 1 30 1 192.168.2.2
Vlan200 1 30 1 10.110.2.2
# 查看Switch C上DR选举信息。
[SwitchC] display pim interface
Interface NbrCnt HelloInt DR-Pri DR-Address
Vlan104 1 30 1 192.168.3.2
Vlan200 1 30 1 10.110.2.2 (local)
由上显示信息可知,通过DR选举,Switch C成为本共享网段的DR(DR选举原则:在Hello报文携带的DR竞选优先级相同的情况下,共享网段中IP地址最大的路由器将成为DR)。
(2) 查看交换机的PIM路由表信息
配置完成后,通过Host A和组播源Source检验一下配置效果:
· Host A发送IGMPv2成员关系报告报文,指定加入组播组G(225.1.1.1),成为该组播组的接收者;
· 组播源S(10.110.5.100/24)向该组播组G发送组播数据报文。
通过使用display pim routing-table命令可以查看交换机的PIM路由表信息。例如:
# 查看Switch A上的PIM路由表信息。
[SwitchA] display pim routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
RP: 192.168.9.2
Protocol: pim-sm, Flag: WC
UpTime: 00:13:46
Upstream interface: Vlan-interface102,
Upstream neighbor: 192.168.9.2
RPF prime neighbor: 192.168.9.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan100
Protocol: igmp, UpTime: 00:13:46, Expires: -
(10.110.5.100, 225.1.1.1)
RP: 192.168.9.2
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:42
Upstream interface: Vlan-interface101,
Upstream neighbor: 192.168.1.2
RPF prime neighbor: 192.168.1.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan100
Protocol: pim-sm, UpTime: 00:00:42, Expires: -
Switch B和Switch C上的显示信息与Switch A类似。
# 查看Switch D上的PIM路由表信息。
[SwitchD] display pim routing-table
Total 0 (*, G) entry; 1 (S, G) entry
(10.110.5.100, 225.1.1.1)
RP: 192.168.9.2
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:42
Upstream interface: Vlan-interface300
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan101
Protocol: pim-sm, UpTime: 00:00:42, Expires: -
# 查看Switch E上的PIM路由表信息。
[SwitchE] display pim routing-table
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
RP: 192.168.9.2 (local)
Protocol: pim-sm, Flag: WC
UpTime: 00:13:16
Upstream interface: Register
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan102
Protocol: pim-sm, UpTime: 00:13:16, Expires: -
(10.110.5.100, 225.1.1.1)
RP: 192.168.9.2 (local)
Protocol: pim-sm, Flag: RPT SPT ACT
UpTime: 00:25:32
Upstream interface: Vlan-interface105
Upstream neighbor: 192.168.4.2
RPF prime neighbor: 192.168.4.2
Downstream interface(s) information: None
由上显示信息可知:
· 根据哈希算法得出G对应的RP为Switch E。
· 组播源侧DR(Switch D)和RP(Switch E)之间会生成组播源侧的SPT。
· 接收者侧DR(Switch A)和RP(Switch E)之间会生成RPT,RPT路径中的交换机(Switch A和Switch E)上会生成(*,G)表项。
· 当接收者侧DR(Switch A)收到组播数据后立即执行SPT切换,在接收者侧DR和组播源侧DR之间建立新的SPT,新SPT路径中的交换机(Switch A和Switch D)上存在(S,G)表项。
(1) Switch A配置信息
#
multicast routing-enable
#
vlan 100 to 102
#
interface Vlan-interface100
ip address 10.110.1.1 255.255.255.0
pim sm
igmp enable
#
interface Vlan-interface101
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface Vlan-interface102
ip address 192.168.9.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.9.0 0.0.0.255
network 10.110.1.0 0.0.0.255
#
(2) Switch B配置信息
#
multicast routing-enable
#
vlan 103
#
vlan 200
#
interface Vlan-interface103
ip address 192.168.2.1 255.255.255.0
pim sm
#
interface Vlan-interface200
ip address 10.110.2.1 255.255.255.0
pim sm
igmp enable
#
ospf 1
area 0.0.0.0
network 192.168.2.0 0.0.0.255
network 10.110.2.0 0.0.0.255
#
(3) Switch C配置信息
#
multicast routing-enable
#
vlan 104
#
vlan 200
#
interface Vlan-interface104
ip address 192.168.3.1 255.255.255.0
pim sm
#
interface Vlan-interface200
ip address 10.110.2.2 255.255.255.0
pim sm
igmp enable
#
ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
network 10.110.2.0 0.0.0.255
#
(4) Switch D配置信息
#
multicast routing-enable
#
acl number 2005
rule 0 permit source 225.1.1.0 0.0.0.255
#
vlan 101
#
vlan 105
#
vlan 300
#
interface Vlan-interface101
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface Vlan-interface105
ip address 192.168.4.2 255.255.255.0
pim sm
#
interface Vlan-interface300
ip address 10.110.5.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 10.110.5.0 0.0.0.255
#
pim
c-bsr 192.168.4.2 priority 10 hash-length 32
c-rp 192.168.4.2 group-policy 2005
#
(5) Switch E配置信息
#
multicast routing-enable
#
acl number 2005
rule 0 permit source 225.1.1.0 0.0.0.255
#
vlan 102 to 104
#
vlan 105
#
interface Vlan-interface102
ip address 192.168.9.2 255.255.255.0
pim sm
#
interface Vlan-interface103
ip address 192.168.2.2 255.255.255.0
pim sm
#
interface Vlan-interface104
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface Vlan-interface105
ip address 192.168.4.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.9.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
#
pim
c-bsr 192.168.9.2 priority 20 hash-length 32
c-rp 192.168.9.2 group-policy 2005
#
表3 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图3所示,组播源(Source)和组播接收者(Receiver)之间通过三层交换机相连,整个网络单播路由正常。
现要求通过采用PIM-SM管理域机制,将整个网络划分为管理域1、管理域2和Global域,从而实现:
· 管理域1内的组播源Source 1和管理域2内的组播源Source 2发送本地管理组地址范围内的组播组(239.0.0.0/8范围内的组播组)信息,只有各自管理域内的组播接收者可以点播。
· Global域内的公共组播源Source 3发送除各管理域所服务的组地址范围外的其它组地址的组播组信息,网络内的所有组播接收者都可以进行点播。
图3 PIM-SM管理域配置组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Switch A |
Vlan-int100 |
192.168.1.1/24 |
Switch D |
Vlan-int400 |
192.168.4.1/24 |
|
Vlan-int101 |
10.110.1.1/24 |
|
Vlan-int106 |
10.110.6.2/24 |
Switch B |
Vlan-int200 |
192.168.2.1/24 |
Switch E |
Vlan-int500 |
192.168.5.1/24 |
|
Vlan-int101 |
10.110.1.2/24 |
|
Vlan-int102 |
10.110.2.2/24 |
|
Vlan-int102 |
10.110.2.1/24 |
|
Vlan-int105 |
10.110.5.2/24 |
|
Vlan-int103 |
10.110.3.1/24 |
Switch F |
Vlan-int600 |
192.168.6.1/24 |
Switch C |
Vlan-int300 |
192.168.3.1/24 |
|
Vlan-int103 |
10.110.3.2/24 |
|
Vlan-int104 |
10.110.4.1/24 |
|
Vlan-int104 |
10.110.4.2/24 |
|
Vlan-int105 |
10.110.5.1/24 |
Source 1 |
- |
192.168.2.10/24 |
|
Vlan-int106 |
10.110.6.1/24 |
Source 2 |
- |
192.168.3.10/24 |
|
|
|
Source 3 |
- |
192.168.5.10/24 |
(1) 根据管理域的空间规划,和需求中限定的管理域服务的组地址范围,将管理域中与其它域相连的接口配置为管理域边界,以限定管理域的空间范围和管理的组地址范围。
(2) 为了使管理域和Global域能够为需求中的组播组服务,需要为各管理域和Global域配置C-BSR和C-RP,其中管理域的C-BSR和C-RP所服务的组播组范围与本管理域边界限定的组地址范围保持一致,Global域的C-BSR和C-RP所服务的组播组范围无限制,可为剩余的所有组播组服务。
· 为建立和维护组播组成员关系,还需要在连接接收者的三层交换机上使能IGMP功能。
· 通过multicast boundary命令指定管理域所服务的组播组范围时,其指定的有效的组范围只能在239.0.0.0/8之内。
· 各个管理域的C-BSR和C-RP服务的组范围只能在239.0.0.0/8之内。
(1) 配置IP地址和单播路由协议
请按照1.5.2 图3配置各接口的IP地址和子网掩码,具体配置过程略。
配置PIM-SM域内的各交换机之间采用OSPF协议进行互连,确保PIM-SM域内部在网络层互通,并且各交换机之间能够借助单播路由协议实现动态路由更新,具体配置过程略。
(2) 使能IP组播路由,并使能PIM-SM和IGMP
# 在所有三层交换机上使能IP组播路由,并在各接口上使能PIM-SM,这里以配置Switch A为例。
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] pim sm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] pim sm
[SwitchA-Vlan-interface101] quit
Switch B、Switch C、Switch D、Switch E和Switch F的配置与Switch A相似,配置过程略。
# 在三层交换机的连接有接收者的接口上使能IGMP。这里以配置Switch A的Vlan-interface100接口为例。
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp enable
[SwitchA-Vlan-interface101] quit
Switch D和Switch F的配置与Switch A相似,配置过程略。
(3) 配置管理域边界
# 在Switch B上将接口Vlan-interface102和Vlan-interface103配置为管理域1的边界。
[SwitchB] interface vlan-interface 102
[SwitchB-Vlan-interface102] multicast boundary 239.0.0.0 8
[SwitchB-Vlan-interface102] quit
[SwitchB] interface vlan-interface 103
[SwitchB-Vlan-interface103] multicast boundary 239.0.0.0 8
[SwitchB-Vlan-interface103] quit
# 在Switch C上将接口Vlan-interface104和Vlan-interface105配置为管理域2的边界。
<SwitchC> system-view
[SwitchC] interface vlan-interface 104
[SwitchC-Vlan-interface104] multicast boundary 239.0.0.0 8
[SwitchC-Vlan-interface104] quit
[SwitchC] interface vlan-interface 105
[SwitchC-Vlan-interface105] multicast boundary 239.0.0.0 8
[SwitchC-Vlan-interface105] quit
(4) 配置C-BSR和C-RP
# 在Switch B上配置RP通告的服务范围,并将接口Vlan-interface101配置为管理域1的C-BSR和C-RP。
[SwitchB] acl number 2001
[SwitchB-acl-basic-2001] rule permit source 239.0.0.0 0.255.255.255
[SwitchB-acl-basic-2001] quit
[SwitchB] pim
[SwitchB-pim] c-bsr 10.110.1.2 scope 239.0.0.0 8
[SwitchB-pim] c-rp 10.110.1.2 group-policy 2001
[SwitchB-pim] quit
# 在Switch C上配置RP通告的服务范围,并将接口Vlan-interface106配置为管理域2的C-BSR和C-RP。
[SwitchC] acl number 2001
[SwitchC-acl-basic-2001] rule permit source 239.0.0.0 0.255.255.255
[SwitchC-acl-basic-2001] quit
[SwitchC] pim
[SwitchC-pim] c-bsr 10.110.6.1 scope 239.0.0.0 8
[SwitchC-pim] c-rp 10.110.6.1 group-policy 2001
[SwitchC-pim] quit
# 在Switch E上将接口Vlan-interface102配置为Global域的C-BSR和C-RP。
<SwitchE> system-view
[SwitchE] pim
[SwitchE-pim] c-bsr 10.110.2.2
[SwitchE-pim] c-rp 10.110.2.2
[SwitchE-pim] quit
配置完成后,查看交换机上BSR选举信息以及获取的RP信息。
(1) 使用display pim bsr-info命令查看交换机上BSR选举的信息。例如:
# 查看Switch B上的BSR信息。
[SwitchB] display pim bsr-info
Scope: non-scoped
State: Accept Preferred
Bootstrap timer: 00:01:44
Elected BSR address: 10.110.2.2
Priority: 64
Hash mask length: 30
Uptime: 00:01:45
Scope: 239.0.0.0/8
State: Elected
Bootstrap timer: 00:00:06
Elected BSR address: 10.110.1.2
Priority: 64
Hash mask length: 30
Uptime: 00:04:54
Candidate BSR address: 10.110.1.2
Priority: 64
Hash mask length: 30
# 查看Switch C上的BSR信息。
[SwitchC] display pim bsr-info
Scope: non-scoped
State: Accept Preferred
Bootstrap timer: 00:01:44
Elected BSR address: 10.110.2.2
Priority: 64
Hash mask length: 30
Uptime: 00:01:45
Scope: 239.0.0.0/8
State: Elected
Bootstrap timer: 00:00:06
Elected BSR address: 10.110.6.1
Priority: 64
Hash mask length: 30
Uptime: 00:04:54
Candidate BSR address: 10.110.6.1
Priority: 64
Hash mask length: 30
# 查看Switch E上的BSR信息。
[SwitchE] display pim bsr-info
Scope: non-scoped
State: Accept Preferred
Bootstrap timer: 00:01:44
Elected BSR address: 10.110.2.2
Priority: 64
Hash mask length: 30
Uptime: 00:01:45
Scope: 239.0.0.0/8
State: Elected
Bootstrap timer: 00:00:06
Elected BSR address: 10.110.2.2
Priority: 64
Hash mask length: 30
Uptime: 00:04:54
Candidate BSR address: 10.110.2.2
Priority: 64
Hash mask length: 30
(2) 使用display pim rp-info命令查看交换机上获取的RP信息。例如:
# 查看Switch B上的RP信息。
[SwitchB] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4
RP address Priority HoldTime Uptime Expires
10.110.2.2 192 150 00:03:39 00:01:51
Scope: 239.0.0.0/8
Group/MaskLen: 239.0.0.0/8
RP address Priority HoldTime Uptime Expires
10.110.1.2 (local) 192 150 00:07:44 00:01:51
# 查看Switch C上的RP信息。
[SwitchC] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4
RP address Priority HoldTime Uptime Expires
10.110.2.2 192 150 00:03:39 00:01:51
Scope: 239.0.0.0/8
Group/MaskLen: 239.0.0.0/8
RP address Priority HoldTime Uptime Expires
10.110.6.1 (local) 192 150 00:07:44 00:01:51
# 查看Switch E上的RP信息。
[SwitchE] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4
RP address Priority HoldTime Uptime Expires
10.110.2.2(local) 192 150 00:03:39 00:01:51
# 查看Switch F上的RP信息。
[SwitchF] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4
RP address Priority HoldTime Uptime Expires
10.110.2.2 192 150 00:03:39 00:01:51
由此可见,管理域1内的接收者若要点播本管理域内部的组播视频信息(239.0.0.0/8范围内的组播组),将由管理域1内部的RP(Switch B)为其组播路由建立提供服务。管理域2内的接收者若要点播本管理域内部的组播视频信息(239.0.0.0/8范围内的组播组),将由管理域2内部的RP(Switch C)为其组播路由建立提供服务。若管理域1、管理域2和Global域内的接收者要点播公共的组播视频信息(239.0.0.0/8范围以外的组播组),将由Global域的RP(Switch E)为其组播路由建立提供服务。
(1) Switch A配置信息
#
multicast routing-enable
#
vlan 100 to 101
#
interface Vlan-interface100
ip address 192.168.1.1 255.255.255.0
pim sm
igmp enable
#
interface Vlan-interface101
ip address 10.110.1.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 10.110.1.0 0.0.0.255
#
(2) Switch B配置信息
#
multicast routing-enable
#
acl number 2001
rule 0 permit source 239.0.0.0 0.255.255.255
#
vlan 101 to 103
#
vlan 200
#
interface Vlan-interface101
ip address 10.110.1.2 255.255.255.0
pim sm
#
interface Vlan-interface102
ip address 10.110.2.1 255.255.255.0
multicast boundary 239.0.0.0 8
pim sm
#
interface Vlan-interface103
ip address 10.110.3.1 255.255.255.0
multicast boundary 239.0.0.0 8
pim sm
#
interface Vlan-interface200
ip address 192.168.2.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.2.0 0.0.0.255
network 10.110.1.0 0.0.0.255
network 10.110.2.0 0.0.0.255
network 10.110.3.0 0.0.0.255
#
pim
c-bsr 10.110.1.2 scope 239.0.0.0 255.0.0.0
c-rp 10.110.1.2 group-policy 2001
#
(3) Switch C配置信息
#
multicast routing-enable
#
acl number 2001
rule 0 permit source 239.0.0.0 0.255.255.255
#
vlan 104 to 106
#
vlan 300
#
interface Vlan-interface104
ip address 10.110.4.1 255.255.255.0
multicast boundary 239.0.0.0 8
pim sm
#
interface Vlan-interface105
ip address 10.110.5.1 255.255.255.0
multicast boundary 239.0.0.0 8
pim sm
#
interface Vlan-interface106
ip address 10.110.6.1 255.255.255.0
pim sm
#
interface Vlan-interface300
ip address 192.168.3.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
network 10.110.4.0 0.0.0.255
network 10.110.5.0 0.0.0.255
network 10.110.6.0 0.0.0.255
#
pim
c-bsr 10.110.6.1 scope 239.0.0.0 255.0.0.0
c-bsr group 239.0.0.0 255.0.0.0
#
(4) Switch D配置信息
#
multicast routing-enable
#
vlan 106
#
vlan 400
#
interface Vlan-interface106
ip address 10.110.6.2 255.255.255.0
pim sm
#
interface Vlan-interface400
ip address 192.168.4.1 255.255.255.0
pim sm
igmp enable
#
ospf 1
area 0.0.0.0
network 192.168.4.0 0.0.0.255
network 10.110.6.0 0.0.0.255
#
(5) Switch E配置信息
#
multicast routing-enable
#
vlan 102
#
vlan 105
#
vlan 500
#
interface Vlan-interface102
ip address 10.110.2.2 255.255.255.0
pim sm
#
interface Vlan-interface105
ip address 10.110.5.2 255.255.255.0
pim sm
#
interface Vlan-interface500
ip address 192.168.5.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.5.0 0.0.0.255
network 10.110.2.0 0.0.0.255
network 10.110.5.0 0.0.0.255
#
pim
c-bsr 10.110.2.2
c-rp 10.110.2.2
#
(6) Switch F配置信息
#
multicast routing-enable
#
vlan 103 to 104
#
vlan 600
#
interface Vlan-interface103
ip address 10.110.3.2 255.255.255.0
pim sm
#
interface Vlan-interface104
ip address 10.110.4.2 255.255.255.0
pim sm
#
interface Vlan-interface600
ip address 192.168.6.1 255.255.255.0
pim sm
igmp enable
#
ospf 1
area 0.0.0.0
network 192.168.6.0 0.0.0.255
network 10.110.3.0 0.0.0.255
network 10.110.4.0 0.0.0.255
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!