好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



 

5.4.1 PIM SSM 配置举例

 

注意事项

在配置过程中,请注意以下几点:

l                            如果没有配置SSM的组地址,默认为232.0.0.0232.255.255.255

l                            必须使用IGMPv3指定源加入

l                            目前不支持以exclude模式加入组。

 

组网需求

RouterARouterBRouterC组成一个PIM-SM的组播网络,其中RouterA连接组播源,RouterBRouterC连接不同的接收者,接收者指定源加入。通过配置改变SSM组地址范围。如组网图所示:

   

 

配置思路

l           RouterARouterBRouterC上分别配置单播路由协议,使各设备和组播源、接收

者之间路由可达

 

l           RouterARouterBRouterC上分别使能组播路由协议,并配置各接口的PIM-SM

协议,连接接收者的接口配置IGMPv3协议

 

l           配置SSM组地址范围

 

配置步骤

 

设备A的配置

1、配置步骤

#全局启动组播路由

[RouterA]multicast routing-enable

 

#配置连接组播源的接口地址,并且启用PIM-SM协议

[RouterA]interface gigabitethernet3/1/1

[RouterA-GigabitEthernet3/1/1]ip address 10.10.1.1 24

[RouterA-GigabitEthernet3/1/1]pim sm

 

#配置连接RouterB的接口地址,并且启用PIM-SM协议

[RouterA]interface gigabitethernet3/1/3

[RouterA-GigabitEthernet3/1/3]ip address 10.30.1.1 24

[RouterA-GigabitEthernet3/1/3]pim sm

 

#配置连接RouterC的接口地址,并且启用PIM-SM协议

[RouterA]interface gigabitethernet3/1/2

[RouterA-GigabitEthernet3/1/2]ip address 10.20.1.1 24

[RouterA-GigabitEthernet3/1/2]pim sm

 

#配置SSM组地址范围

[RouterA]acl number 2000

[RouterA-acl-basic-2000]rule permit source 225.0.0.0 0.255.255.255

[RouterA-acl-basic-2000]pim

[RouterA-pim]ssm-policy 2000

 

#发布PIM接口单播路由

[RouterA]ospf

[RouterA-ospf-1]import-route direct

[RouterA-ospf-1]area 0.0.0.0

[RouterA-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

 

2、配置文件

#

multicast routing-enable

#

acl number 2000

 rule permit source 225.0.0.0 0.255.255.255

#

interface GigabitEthernet3/1/1

 ip address 10.10.1.1 255.255.255.0

 pim sm

#

interface GigabitEthernet3/1/2

 ip address 10.20.1.1 255.255.255.0

 pim sm

#

interface GigabitEthernet3/1/3

 ip address 10.30.1.1 255.255.255.0

 pim sm

#

ospf 1

 import-route direct

 area 0.0.0.0

  network  10.0.0.0 0.255.255.255

  network  1.1.1.1 0.0.0.0

#

pim

 ssm-policy 2000

#

 

 

设备B的配置

1、配置步骤

#全局启动组播路由

[RouterB]multicast routing-enable

 

#配置连接RouterA的接口地址,并且启用PIM-SM协议

[RouterB]interface gigabitethernet3/1/3

[RouterB-GigabitEthernet3/1/3]ip address 10.30.1.2 24

[RouterB-GigabitEthernet3/1/3]pim sm

 

#配置连接RouterC的接口地址,并且启用PIM-SM协议

[RouterB]interface gigabitethernet3/1/2

[RouterB-GigabitEthernet3/1/2]ip address 10.40.1.1 24

[RouterB-GigabitEthernet3/1/2]pim sm

 

#配置连接HostA的接口地址,并且启用PIM-SM和IGMPv3协议

[RouterB]interface gigabitethernet3/1/1

[RouterB-GigabitEthernet3/1/1]ip address 10.101.1.1 24

[RouterB-GigabitEthernet3/1/1]pim sm

[RouterC-GigabitEthernet3/1/1]igmp enable

[RouterC-GigabitEthernet3/1/1]igmp version 3

 

#配置SSM组地址范围

[RouterB]acl number 2000

[RouterB-acl-basic-2000]rule permit source 225.0.0.0 0.255.255.255

[RouterB-acl-basic-2000]pim

[RouterB-pim]ssm-policy 2000

 

#发布PIM接口单播路由

[RouterB]ospf

[RouterB-ospf-1]import-route direct

[RouterB-ospf-1]area 0.0.0.0

[RouterB-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

 

2、配置文件

#

multicast routing-enable

#

acl number 2000

 rule permit source 225.0.0.0 0.255.255.255

#

interface GigabitEthernet3/1/1

 ip address 10.101.1.1 255.255.255.0

 pim sm

 igmp enable

 igmp version 3

#

interface GigabitEthernet3/1/2

 ip address 10.40.1.1 255.255.255.0

 pim sm

#

interface GigabitEthernet3/1/3

 ip address 10.30.1.2 255.255.255.0

 pim sm

#

ospf 1

 import-route direct

 area 0.0.0.0

  network  10.0.0.0 0.255.255.255

#

pim

 ssm-policy 2000

#

 

 

设备C的配置

1、配置步骤

#全局启动组播路由

[RouterC]multicast routing-enable

 

#配置连接RouterA的接口地址,并且启用PIM-SM协议

[RouterC]interface gigabitethernet3/1/2

[RouterC-GigabitEthernet3/1/2]ip address 10.20.1.2 24

[RouterC-GigabitEthernet3/1/2]pim sm

 

#配置连接RouterB的接口地址,并且启用PIM-SM协议

[RouterC]interface gigabitethernet3/1/3

[RouterC-GigabitEthernet3/1/3]ip address 10.40.1.2 24

[RouterC-GigabitEthernet3/1/3]pim sm

 

#配置连接HostB的接口地址,并且启用PIM-SM和IGMPv3协议

[RouterC]interface gigabitethernet3/1/1

[RouterC-GigabitEthernet3/1/1]ip address 10.102.1.1 24

[RouterC-GigabitEthernet3/1/1]pim sm

[RouterC-GigabitEthernet3/1/1]igmp enable

[RouterC-GigabitEthernet3/1/1]igmp version 3

 

#配置SSM组地址范围

[RouterC]acl number 2000

[RouterC-acl-basic-2000]rule permit source 225.0.0.0 0.255.255.255

[RouterC-acl-basic-2000]pim

[RouterC-pim]ssm-policy 2000

 

#发布PIM接口单播路由

[RouterC]ospf

[RouterC-ospf-1]import-route direct

[RouterC-ospf-1]area 0.0.0.0

[RouterC-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

2、配置文件

#

multicast routing-enable

#

acl number 2000

 rule permit source 225.0.0.0 0.255.255.255

#

interface GigabitEthernet3/1/1

 ip address 10.101.1.1 255.255.255.0

 pim sm

 igmp enable

#

interface GigabitEthernet3/1/2

 ip address 10.40.1.1 255.255.255.0

 pim sm

#

interface GigabitEthernet3/1/3

 ip address 10.30.1.2 255.255.255.0

 pim sm

#

ospf 1

 import-route direct

 area 0.0.0.0

  network  10.0.0.0 0.255.255.255

#

pim

 ssm-policy 2000

#

 

验证结果

可通过以下方式验证上述配置:

 

假如HostA需要接收组播组G(225.1.1.1)的信息,通过使用display pim routing-table命令可以查看路由器的PIM路由表信息。通过配置改变SSM组地址范围。

比如:

#查看RouterB上的PIM路由表信息:

 

[RouterB] display pim routing-table

 Total 0 (*, G) entry; 1 (S, G) entry

 

 (10.10.1.2, 225.1.1.1)

     RP: 1.1.1.1

     Protocol: pim-sm, Flag: SPT ACT

     UpTime: 00:00:42

     Upstream interface: GigabitEthernet3/1/3

         Upstream neighbor: 10.30.1.1

         RPF prime neighbor: 10.30.1.1

     Downstream interface(s) information:

     Total number of downstreams: 1

         1: GigabitEthernet3/1/1

             Protocol: pim-sm, UpTime: 00:00:42, Expires: 00:03:06

 

 

 

 

X Close
X Close