4配置举例
4.1组网需求
SwitchA、SwitchB和SwitchC组成一个PIM-SM的组播网络,其中SwitchA连接组播源,SwitchB和SwitchC连接不同的接收者,接收者指定源加入。如图1所示:
设备
接口
IP地址
设备
接口
IP地址
SwitchA
Vlan-int100
10.10.1.1/24
SwitchC
Vlan-int102
10.102.1.1/24
Vlan-int12
10.12.1.1/24
Vlan-int23
10.23.1.3/24
Vlan-int13
10.13.1.1/24
Vlan-int13
10.13.1.3/24
SwitchB
Vlan-int101
10.101.1.1/24
Vlan-int12
10.12.1.2/24
Vlan-int23
10.23.1.2/24
图1PIMSSM特性典型配置组网图
4.2配置思路
lSwitchA、SwitchB和SwitchC上分别配置单播路由协议,使各设备和组播源、接收者之间路由可达;
lSwitchA、SwitchB和SwitchC上分别使能组播路由协议,并配置各接口的PIM-SM协议,连接接收者的接口配置IGMPv3协议;
l配置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
2.配置文件
#
multicastrouting-enable
#
aclnumber2000
rulepermitsource225.0.0.00.255.255.255
#
interfaceVlan-interface12
ipaddress10.12.1.2255.255.255.0
pimsm
#
interfaceVlan-interface23
ipaddress10.23.1.2255.255.255.0
pimsm
#
interfaceVlan-interface101
ipaddress10.101.1.1255.255.255.0
igmpenable
igmpversion3
pimsm
#
ospf1
import-routedirect
area0.0.0.0
network10.0.0.00.255.255.255
#
pim
ssm-policy2000
#
4.4.3设备C的配置
1.配置步骤
(1)全局启动组播路由
[SwtichC]multicastrouting-enable
(2)配置各接口及接口地址,并使能PIMSM
#配置连接SwtichA的接口及接口地址,使能PIMSM
[SwitchC]vlan13
[SwitchC-vlan13]portGigabitEthernet3/0/3
[SwitchC-vlan13]interfacevlan13
[SwitchC-Vlan-interface13]ipaddress10.13.1.324
[SwitchC-Vlan-interface13]pimsm
#配置连接SwtichB的接口及接口地址,使能PIMSM
[SwitchC]vlan23
[SwitchC-vlan23]portGigabitEthernet3/0/2
[SwitchC-vlan23]interfacevlan23
[SwitchC-Vlan-interface23]ipaddress10.23.1.324
[SwitchC-Vlan-interface23]pimsm
#配置连接HostB的接口及接口地址,使能PIMSM和IGMPv3协议
[SwitchC]vlan102
[SwitchC-vlan102]portGigabitEthernet3/0/1
[SwitchC-vlan102]interfacevlan102
[SwitchC-Vlan-interface102]ipaddress10.102.1.124
[SwitchC-Vlan-interface102]pimsm
[SwitchC-Vlan-interface102]igmpenable
[SwitchC-Vlan-interface102]igmpversion3
(3)配置SSM组地址范围
[SwitchC]aclnumber2000
[SwitchC-acl-basic-2000]rulepermitsource225.0.0.00.255.255.255
[SwitchC-acl-basic-2000]pim
[SwitchC-pim]ssm-policy2000
(4)发布PIM接口单播路由
[SwitchC]ospf1
[SwitchC-ospf-1]import-routedirect
[SwitchC-ospf-1]area0.0.0.0
[SwitchC-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-interface13
ipaddress10.13.1.3255.255.255.0
pimsm
#
interfaceVlan-interface23
ipaddress10.23.1.3255.255.255.0
pimsm
#
interfaceVlan-interface102
ipaddress10.102.1.1255.255.255.0
igmpenable
igmpversion3
pimsm
#
ospf1
import-routedirect
area0.0.0.0
network10.0.0.00.255.255.255
#
pim
ssm-policy2000
#
4.5验证结果
按照如上配置,SwitchA、SwitchB、SwitchC两两之间建立PIM邻居关系,HostA进行源为10.10.1.2组为225.1.1.1的IGMPv3加入后能生成SG的PIMRouting表项。
可以通过以下方式验证上述配置:
(1)SwitchB上与其他设备建立PIM邻居关系
[SwtichB]displaypimneighbor
VPN-Instance:publicnet
TotalNumberofNeighbors=2
NeighborInterfaceUptimeExpiresDr-Priority
10.12.1.1Vlan1200:00:0500:01:401
10.13.1.3Vlan2300:00:2000:01:411
(2)假如HostA需要接收组播源组(10.10.1.2,225.1.1.1)的信息,通过使用displaypimrouting-table命令可以查看到PIM路由表信息。
#查看SwitchB上的PIM路由表信息
[SwitchB]displaypimrouting-table
VPN-Instance:publicnet
Total1(S,G)entry
(10.10.1.2,225.1.1.1)
Protocol:pim-ssm,Flag:
UpTime:00:14:24
Upstreaminterface:Vlan-interface12
Upstreamneighbor:10.12.1.1
RPFprimeneighbor:10.12.1.1
Downstreaminterface(s)information:
Totalnumberofdownstreams:1
1:Vlan-interface101
Protocol:igmp,UpTime:00:14:24,Expires:-
#查看SwitchA上的PIM路由表信息
[SwitchA]displaypimrouting-table
VPN-Instance:publicnet
Total1(S,G)entry
(10.10.1.2,225.1.1.1)
Protocol:pim-ssm,Flag:LOC
UpTime:00:00:22
Upstreaminterface:Vlan-interface100
Upstreamneighbor:NULL
RPFprimeneighbor:NULL
Downstreaminterface(s)information:
Totalnumberofdownstreams:1
1:Vlan-interface12
【编辑推荐】