41-MSR系列路由器PIM-SM C-BSR和C-RP功能的配置举例
本章节下载: 41-MSR系列路由器PIM-SM C-BSR和C-RP功能的配置举例 (135.11 KB)
MSR系列路由器PIM-SM C-BSR和C-RP功能的配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍PIM-SM C-BSR和C-RP功能的配置。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解PIM-SM特性。
如图1所示,Router A连接组播源,Router B和Router C各连接一台组播接收者,三台MSR设备两两相连。
现要求通过配置PIM SM实现:
· 组播接收者收到组播源发送的组播组;
· PIM SM的C-BSR和C-RP功能。
图1 PIM-SM配置组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Router A |
Eth0/0 |
192.168.0.1/24 |
Router C |
Eth0/0 |
192.168.0.2/24 |
|
Eth0/1 |
10.0.1.1/24 |
|
Eth0/1 |
192.168.2.2/24 |
|
Eth0/2 |
192.168.1.1/24 |
|
Eth0/2 |
10.0.3.1/24 |
Router B |
Eth0/0 |
192.168.1.2/24 |
Host A |
|
10.0.2.2/24 |
|
Eth0/1 |
192.168.2.1/24 |
Host B |
|
10.0.3.2/24 |
|
Eth0/2 |
10.0.2.1/24 |
Source |
|
10.0.1.2/24 |
· 各路由器使能OSPF,使各路由器之间能够借助单播路由协议实现动态路由更新。
· 为使组播接收者接收组播数据全局启动组播,配置C-BSR与C-RP,并在连接组播接收者的路由器接口使能IGMP。
本举例是在Release 2317版本上进行配置和验证的。
· 配置PIM-SM域内的各路由器之间采用OSPF协议进行互连,确保PIM-SM域中Router A、Router B、Router C之间能够在网络层互通,并且各路由器之间能够借助单播路由协议实现动态路由更新;
· 在连接末梢网络的接口使能IGMP协议。
<RouterA> system-view
# 全局开启组播
[RouterA] multicast routing-enable
[RouterA] interface ethernet 0/0
[RouterA-Ethernet0/0] ip address 192.168.0.1 24
[RouterA-Ethernet0/0] pim sm
[RouterA-Ethernet0/0] quit
[RouterA] interface ethernet 0/1
[RouterA-Ethernet0/1] ip address 192.168.1.1 24
[RouterA-Ethernet0/1] pim sm
[RouterA-Ethernet0/1] quit
[RouterA] interface ethernet 0/2
[RouterA-Ethernet0/2] ip address 10.0.1.1 24
[RouterA-Ethernet0/2] pim sm
[RouterA-Ethernet0/2] quit
# 配置OSPF
[RouterA] ospf 1
[RouterA-ospf-1] area 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] network 10.0.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
<RouterB> system-view
# 全局开启组播
[RouterB] multicast routing-enable
[RouterB] interface ethernet 0/0
[RouterB-Ethernet0/0] ip address 192.168.1.2 24
[RouterB-Ethernet0/0] pim sm
[RouterB-Ethernet0/0] quit
[RouterB] interface ethernet 0/1
[RouterB-Ethernet0/1] ip address 192.168.2.1 24
[RouterB-Ethernet0/1] pim sm
[RouterB-Ethernet0/1] quit
[RouterB] interface ethernet 0/2
[RouterB-Ethernet0/2] ip address 10.0.2.1 24
[RouterB-Ethernet0/2] igmp enable
[RouterB-Ethernet0/2] quit
# 配置OSPF
[RouterB] ospf 1
[RouterB-ospf-1] area 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 10.0.2.0 0.0.0.255
<RouterC> system-view
# 全局开启组播
[RouterC] multicast routing-enable
[RouterC] interface ethernet 0/0
[RouterC-Ethernet0/0] ip address 192.168.0.2 24
[RouterC-Ethernet0/0] pim sm
[RouterC-Ethernet0/0] quit
[RouterC] interface ethernet 0/1
[RouterC-Ethernet0/1] ip address 192.168.2.2 24
[RouterC-Ethernet0/1] pim sm
[RouterC-Ethernet0/1] quit
[RouterC] interface ethernet 0/2
[RouterC-Ethernet0/2] ip address 10.0.3.1 24
[RouterC-Ethernet0/2] igmp enable
[RouterC-Ethernet0/2] quit
# 创建一条ACL 2005
[RouterC] acl number 2005
[RouterC-acl-basic-2005] rule 0 permit source 224.1.1.0 0.0.0.255
[RouterC-acl-basic-2005] quit
# 配置C-BSR和C-RP
[RouterC] pim
[RouterC-pim] c-bsr ethernet 0/1
[RouterC-pim] c-rp ethernet 0/1 group-policy 2005
[RouterC-pim] quit
# 配置OSPF
[RouterC] ospf 1
[RouterC-ospf-1] area 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 10.0.3.0 0.0.0.255
(1) 使用display pim rp-info命令查看路由器上获取的RP信息
# Router B上的RP信息
<RouterB> display pim rp-info
VPN-Instance: public net
PIM-SM BSR RP information:
Group/MaskLen: 224.1.1.0/24
RP: 192.168.2.2
Priority: 192
HoldTime: 150
Uptime: 00:50:26
Expires: 00:02:19
# Router C上的RP信息
<RouterC> display pim rp-info
VPN-Instance: public net
PIM-SM BSR RP information:
Group/MaskLen: 224.1.1.0/24
RP: 192.168.2.2 (local)
Priority: 192
HoldTime: 150
Uptime: 00:51:42
Expires: 00:01:48
(2) 用display pim routing-table命令查看路由器的PIM路由表信息
<RouterB> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 224.1.1.1)
RP: 192.168.2.2
Protocol: pim-sm, Flag: WC EXT
UpTime: 00:00:28
Upstream interface: Ethernet0/1
Upstream neighbor: 192.168.2.2
RPF prime neighbor: 192.168.2.2
Downstream interface(s) information: None
(10.0.1.2, 224.1.1.1)
RP: 192.168.2.2
Protocol: pim-sm, Flag: RPT SPT ACT
UpTime: 00:00:29
Upstream interface: Ethernet0/0
Upstream neighbor: 192.168.1.1
RPF prime neighbor: 192.168.1.1
Downstream interface(s) information: None
<RouterC> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 224.1.1.1)
RP: 192.168.2.2 (local)
Protocol: pim-sm, Flag: WC
UpTime: 00:02:31
Upstream interface: Register
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: Ethernet0/1
Protocol: pim-sm, UpTime: 00:02:31, Expires: 00:03:00
(10.0.1.2, 224.1.1.1)
RP: 192.168.2.2 (local)
Protocol: pim-sm, Flag: RPT SPT 2MSDP ACT
UpTime: 00:34:21
Upstream interface: Ethernet0/0
Upstream neighbor: 192.168.0.1
RPF prime neighbor: 192.168.0.1
Downstream interface(s) information: None
<RouterC> display pim rp-info
VPN-Instance: public net
PIM-SM BSR RP information:
Group/MaskLen: 224.1.1.0/24
RP: 192.168.2.2 (local)
Priority: 192
HoldTime: 150
Uptime: 00:51:42
Expires: 00:01:48
(3) 使用display pim bsr-info命令查看路由器上BSR选举的信息
# Router C上的BSR选举信息
<RouterC> display pim bsr-info
VPN-Instance: public net
Elected BSR Address: 192.168.2.2
Priority: 64
Hash mask length: 30
State: Elected
Scope: Not scoped
Uptime: 02:08:11
Next BSR message scheduled at: 00:00:23
Candidate BSR Address: 192.168.2.2
Priority: 64
Hash mask length: 30
State: Elected
Scope: Not scoped
Candidate RP: 192.168.2.2(Ethernet0/1)
Priority: 192
HoldTime: 150
Advertisement Interval: 60
Next advertisement scheduled at: 00:00:58
# Router B上的BSR选举信息
<RouterB> display pim bsr-info
VPN-Instance: public net
Elected BSR Address: 192.168.2.2
Priority: 64
Hash mask length: 30
State: Accept Preferred
Scope: Not scoped
Uptime: 01:40:49
Expires: 00:01:39
· Router A:
#
router id 10.0.1.0
#
multicast routing-enable
#
interface Ethernet0/0
port link-mode route
ip address 192.168.0.1 255.255.255.0
pim sm
#
interface Ethernet0/1
port link-mode route
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface Ethernet0/2
port link-mode route
ip address 10.0.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 192.168.0.0 0.0.0.255
network 10.0.1.0 0.0.0.255
#
· Router B :
#
router id 10.0.2.1
#
multicast routing-enable
#
interface Ethernet0/0
port link-mode route
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface Ethernet0/1
port link-mode route
ip address 192.168.2.1 255.255.255.0
pim sm
#
interface Ethernet0/2
port link-mode route
ip address 10.0.2.1 255.255.255.0
igmp enable
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 10.0.2.0 0.0.0.255
#
· Router C
#
router id 10.0.3.1
#
multicast routing-enable
#
dar p2p signature-file cfa0:/p2p_default.mtd
#
port-security enable
#
undo ip http enable
#
multicast routing-enable
#
password-recovery enable
#
acl number 2005
rule 0 permit source 224.1.1.0 0.0.0.255
#
interface Ethernet0/0
port link-mode route
ip address 192.168.0.2 255.255.255.0
pim sm
#
interface Ethernet0/1
port link-mode route
ip address 192.168.2.2 255.255.255.0
pim sm
#
interface Ethernet0/2
port link-mode route
ip address 10.0.3.1 255.255.255.0
igmp enable
#
ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 10.0.3.0 0.0.0.255
#
pim
c-bsr Ethernet0/1
c-rp Ethernet0/1 group-policy 2005
#
· H3C MSR 系列路由器 命令参考(V5)-R2311
· H3C MSR 系列路由器 配置指导(V5)-R2311
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!