4配置举例
4.1组网需求
SwitchA、SwitchB和SwitchC组成一个PIM-SM的组播网络,其中SwitchA连接组播源,SwitchB和SwitchC连接不同的接收者,接收者指定源加入。
设备接口IP地址设备接口IP地址
SwitchAVlan-int10010.10.1.1/24SwitchCVlan-int10210.102.1.1/24
Vlan-int1210.12.1.1/24Vlan-int2310.23.1.3/24
Vlan-int1310.13.1.1/24Vlan-int1310.13.1.3/24
SwitchBVlan-int10110.101.1.1/24
Vlan-int1210.12.1.2/24
Vlan-int2310.23.1.2/24
4.2配置思路
SwitchA、SwitchB和SwitchC上分别配置单播路由协议,使各设备和组播源、接收者之间路由可达;
SwitchA、SwitchB和SwitchC上分别使能组播路由协议,并配置各接口的PIM-SM协议,连接接收者的接口配置IGMPv3协议;
配置SSM组地址范围。
4.3使用版本
本举例是在S12500-CMW520-B1131版本上进行配置和验证的。
4.4配置步骤
&说明:
本文的组网环境可能与您的实际环境存在差异。为了保证配置效果,请确认设备上现有配置和以下配置不冲突。
4.4.1设备A的配置
1.配置步骤
(1)全局启动组播路由
[SwitchA]multicastrouting-enable
(2)配置各接口及接口地址,并使能PIMSM
#配置连接组播源的接口及接口地址,使能PIMSM
[SwitchA]vlan100
[SwitchA-vlan100]portGigabitEthernet3/0/1
[SwitchA-vlan100]interfacevlan100
[SwitchA-Vlan-interface100]ipaddress10.10.1.124
[SwitchA-Vlan-interface100]pimsm
#配置连接SwitchB的接口及接口地址,使能PIMSM
[SwitchA]vlan12
[SwitchA-vlan12]portGigabitEthernet3/0/2
[SwitchA-vlan12]interfacevlan12
[SwitchA-Vlan-interface12]ipaddress10.12.1.124
[SwitchA-Vlan-interface12]pimsm
#配置连接SwitchC的接口及接口地址,使能PIMSM
[SwitchA]vlan13
[SwitchA-vlan13]portGigabitEthernet3/0/3
[SwitchA-vlan13]interfacevlan13
[SwitchA-Vlan-interface13]ipaddress10.13.1.124
[SwitchA-Vlan-interface13]pimsm
(3)配置SSM组地址范围
[SwitchA]aclnumber2000
[SwitchA-acl-basic-2000]rulepermitsource225.0.0.00.255.255.255
[SwitchA-acl-basic-2000]pim
[SwitchA-pim]ssm-policy2000
(4)发布PIM接口单播路由
[SwitchA]ospf1
[SwitchA-ospf-1]import-routedirect
[SwitchA-ospf-1]area0.0.0.0
[SwitchA-ospf-1-area-0.0.0.0]network10.0.0.00.255.255.255
2.配置文件
#
multicastrouting-enable
#
aclnumber2000
rulepermitsource225.0.0.00.255.255.255
#
interfaceVlan-interface12
ipaddress10.12.1.1255.255.255.0
pimsm
#
interfaceVlan-interface13
ipaddress10.13.1.1255.255.255.0
pimsm
#
interfaceVlan-interface100
ipaddress10.10.1.1255.255.255.0
pimsm
#
ospf1
import-routedirect
area0.0.0.0
network10.0.0.00.255.255.255
#
pim
ssm-policy2000
#
4.4.2设备B的配置
1.配置步骤
(1)全局启动组播路由
[SwtichB]multicastrouting-enable
(2)配置各接口及接口地址,并使能PIMSM
#配置连接SwtichA的接口及接口地址,使能PIMSM
[SwitchB]vlan12
[SwitchB-vlan12]portGigabitEthernet3/0/2
[SwitchB-vlan12]interfacevlan12
[SwitchB-Vlan-interface12]ipaddress10.12.1.224
[SwitchB-Vlan-interface12]pimsm
#配置连接SwtichC的接口及接口地址,使能PIMSM
[SwitchB]vlan23
[SwitchB-vlan23]portGigabitEthernet3/0/3
[SwitchB-vlan23]interfacevlan23
[SwitchB-Vlan-interface23]ipaddress10.23.1.224
[SwitchB-Vlan-interface23]pimsm
#配置连接HostA的接口及接口地址,使能PIMSM和IGMPv3
[SwitchB]vlan101
[SwitchB-vlan101]portGigabitEthernet3/0/1
[SwitchB-vlan101]interfacevlan101
[SwitchB-Vlan-interface101]ipaddress10.101.1.124
[SwitchB-Vlan-interface101]pimsm
[SwitchB-Vlan-interface101]igmpenable
[SwitchB-Vlan-interface101]igmpversion3
(3)配置SSM组地址范围
[SwitchB]aclnumber2000
[SwitchB-acl-basic-2000]rulepermitsource225.0.0.00.255.255.255
[SwitchB-acl-basic-2000]pim
[SwitchB-pim]ssm-policy2000
(4)发布PIM接口单播路由
[SwitchB]ospf1
[SwitchB-ospf-1]import-routedirect
[SwitchB-ospf-1]area0.0.0.0
[SwitchB-ospf-1-area-0.0.0.0]network10.0.0.00.255.255.255
【编辑推荐】