• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C 中低端以太网交换机 IP组播典型配置指导-6W100

08-PIM配置指导

本章节下载 08-PIM配置指导  (287 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/CE3000/CE3000-EI/Configure/Typical_Configuration_Example/H3C_IP_CG-6W100/201111/733138_30005_0.htm

08-PIM配置指导


1 PIM典型配置指导

1.1  PIM概述

PIM是Protocol Independent Multicast(协议无关组播)的简称,表示可以利用静态路由或者任意单播路由协议(包括RIP、OSPF、IS-IS、BGP等)所生成的单播路由表为IP组播提供路由。组播路由与所采用的单播路由协议无关,只要能够通过单播路由协议产生相应的组播路由表项即可。

1.2  PIM-DM基本配置指导

PIM-DM(Protocol Independent Multicast-Dense Mode,协议无关组播—密集模式)属于密集模式的组播路由协议,使用以“扩散—剪枝”方式构建的最短路径树(Shortest Path Tree,SPT)来传送组播数据,通常适用于组播组成员相对比较密集的小型网络。

1.2.1  适用产品、版本

表1-1 配置适用的产品与软件版本关系

产品

软件版本

S7500E系列以太网交换机

Release 6100系列,Release 6300系列,Release 6600系列,Release 6610系列

S7600系列以太网交换机

Release 6600系列,Release 6610系列

S5800&S5820X系列以太网交换机

Release 1110,Release 1211

CE3000-32F以太网交换机

Release 1211

S5500-EI系列以太网交换机

Release 2202,Release 2208

S5500-EI-D系列以太网交换机

Release 2208

S3610&S5510系列以太网交换机

Release 5301,Release 5303,Release 5306,Release 5309

S3500-EA系列以太网交换机

Release 5303,Release 5309

 

1.2.2  组网需求

图1-1所示网络,各三层交换机之间采用OSPF协议进行互连,单播路由正常。接收者通过组播方式接收视频点播信息,研发部网络N1和市场部网络N2中都存在同一视频信息的接收者。Switch A与网络N1之间运行IGMPv2;Switch B和Switch C与网络N2之间也运行IGMPv2。

要求在该网络中采用PIM-DM协议构建SPT,以保证接收者能接收到组播源发来的组播数据。

图1-1 PIM-DM典型配置组网图

设备

接口

IP地址

设备

接口

IP地址

Switch A

Vlan-int100

10.110.1.1/24

Switch D

Vlan-int300

10.110.5.1/24

 

Vlan-int103

192.168.1.1/24

 

Vlan-int103

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

 

Vlan-int102

192.168.3.2/24

Switch C

Vlan-int200

10.110.2.2/24

 

 

 

 

Vlan-int102

192.168.3.1/24

 

 

 

 

1.2.3  配置思路

由于网络规模较小,且接收者比较密集,所以可采用简单的PIM-DM协议实现组播路由。为保证组播源发出的组播数据能到达接收者,需进行如下配置:

(1)        在三层交换机Switch A、Switch B、Switch C和Switch D上使能组播路由功能,并在各VLAN接口上使能PIM-DM功能,以发现PIM邻居,维护各设备之间的PIM邻居关系,从而构建和维护SPT;

(2)        对于边界设备Switch A、Switch B、Switch C,在连接网络N1的接口Vlan-interface100和和连接N2的接口Vlan-interface 200上使能IGMPv2功能,以建立和维护各组播组成员关系。

1.2.4  配置过程和解释

(1)        配置IP地址和单播路由协议

请按照图1-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 103

[SwitchA-Vlan-interface103] pim dm

[SwitchA-Vlan-interface103] quit

Switch B、Switch C和Switch D的配置与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 BSwitch C的配置与Switch A相似,配置过程略

(4)        检验配置效果

配置完成后,Host A和Host B需要接收组播组G(225.1.1.1)的信息,组播源S(10.110.5.100/24)向组播组G发送组播数据。通过使用display pim routing-table命令可查看个交换机上的PIM路由表信息。

# 查看Switch D上的PIM路由表信息。

[SwitchD] 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: 3

         1: Vlan-interface103

             Protocol: pim-dm, UpTime: 00:03:27, Expires: never

         2: Vlan-interface102

             Protocol: pim-dm, UpTime: 00:03:27, Expires: never

# 查看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: Vlan-interface100

                  Protocol: igmp, UpTime: 00:04:25, Expires: never

 (10.110.5.100, 225.1.1.1)

     Protocol: pim-dm, Flag: ACT

     UpTime: 00:06:14

     Upstream interface: Vlan-interface103,

         Upstream neighbor: 192.168.1.2

         RPF prime neighbor: 192.168.1.2

     Downstream interface(s) information:

       Total number of downstreams: 1

           1: Vlan-interface100

                  Protocol: pim-dm, UpTime: 00:04:25, Expires: never

Switch BSwitch C上的显示信息与Switch A类似。

由上显示信息可见,当组播源S向组播组G发送组播数据时,会通过扩散生成SPT,SPT路径中各交换机(以Switch A和Switch D路径为例)上都存在(S,G)表项;因Host A向Switch A发送IGMP成员关系报告报文进行注册,所以在Switch A上会生成(*,G)表项。

1.2.5  完整配置

(1)        Switch A配置信息

#

 multicast routing-enable

#

interface Vlan-interface100

 ip address 10.110.1.1 255.255.255.0.

 igmp enable

 pim dm

#

interface Vlan-interface103

 ip address 192.168.1.1 255.255.255.0

 pim dm

#

(2)        Switch B配置信息

#

 multicast routing-enable

#

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

 igmp enable

 pim dm

#

(3)        Switch C配置信息

#

 multicast routing-enable

#

interface Vlan-interface102

 ip address 192.168.3.1 255.255.255.0.

 pim dm

#

interface Vlan-interface200

 ip address 10.110.2.2 255.255.255.0

 igmp enable

 pim dm

#

(4)        Switch D配置信息

#

 multicast routing-enable

#

interface Vlan-interface101

 ip address 192.168.2.2 255.255.255.0.

 pim dm

#

interface Vlan-interface102

 ip address 192.168.3.2 255.255.255.0

 pim dm

#

interface Vlan-interface103

 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

#

1.2.6  配置注意事项

l              在部署PIM-DM域时,建议在三层交换机的所有非边界接口上均使能PIM-DM。

l              PIM-DM不能与处于SSM组地址范围内的组播组同时使用。

1.3  PIM-SM基本配置指导

PIM-SM(Protocol Independent Multicast-Sparse Mode,协议无关组播—稀疏模式)属于稀疏模式的组播路由协议。组播数据经过RP(Rendezvous Point,汇集点)与组播源侧DR(Designated Router,指定路由器)间建立的SPT到达RP后,被复制并沿着RP与接收者侧DR间建立的RPT(Rendezvous Point Tree,共享树或汇集树)发送给接收者。该协议通常适用于组播组成员分布相对分散、范围较广的大中型网络。

1.3.1  适用产品、版本

表1-2 配置适用的产品与软件版本关系

产品

软件版本

S7500E系列以太网交换机

Release 6100系列,Release 6300系列,Release 6600系列,Release 6610系列

S7600系列以太网交换机

Release 6600系列,Release 6610系列

S5800&S5820X系列以太网交换机

Release 1110,Release 1211

CE3000-32F以太网交换机

Release 1211

S5500-EI系列以太网交换机

Release 2202,Release 2208

S5500-EI-D系列以太网交换机

Release 2208

S3610&S5510系列以太网交换机

Release 5301,Release 5303,Release 5306,Release 5309

S3500-EA系列以太网交换机

Release 5303,Release 5309

 

1.3.2  组网需求

图1-2所示网络,各三层交换机之间采用OSPF协议进行互连,单播路由正常。接收者通过组播方式接收视频点播信息,研发部网络N1和市场部网络N2中都存在同一视频信息的接收者。Switch A与网络N1之间运行IGMPv2;Switch B和Switch C与网络N2之间也运行IGMPv2。

要求在该网络中采用PIM-SM协议构建组播数据分发树,以保证接收者能接收到组播源发来的组播数据。

图1-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.3.3  配置思路

由于采用PIM-SM协议实现组播路由。为保证组播源发出的组播数据能到达接收者,需进行如下配置:

(1)        在三层交换机Switch A、Switch B、Switch C、Switch D和Switch E上使能组播路由功能,并在各VLAN接口上使能PIM-SM功能,以发现PIM邻居,维护各设备之间的PIM邻居关系。

(2)        配置RP。对于静态RP,需要在PIM-SM域内的所有路由器上指定相同的静态RP地址,不适用于大型PIM网络。本配置指导中采用通过BSR机制动态选举(从多个C-RP中动态选举RP,使不同RP服务于不同的组播组)方式选举RP。将Switch D的Vlan-interface105接口和Switch E的Vlan-interface102接口都配置为C-RP,C-RP所服务的组播组范围为225.1.1.0/24,通过哈希函数计算可使此范围内的组地址映射到这两个C-RP上,减轻单个RP的负担。

(3)        由于采用动态方式选举RP,所以还需要配置BSR(BootStrap Router,自举路由器),负责收集C-RP发来的宣告报文。可以配置多个C-BSR。这样,一旦BSR发生故障,其余C-BSR能够通过自动选举产生新的BSR,从而确保业务免受中断。将Switch D的Vlan-interface105接口和Switch E的Vlan-interface102接口都配置为C-BSR,其中Switch E上C-BSR的优先级较高。

(4)        对于边界设备Switch A、Switch B、Switch C,在连接网络N1的接口Vlan-interface100和和连接N2的接口Vlan-interface 200上使能IGMPv2功能,以建立和维护各组播组成员关系。

1.3.4  配置过程和解释

(1)        配置IP地址和单播路由协议

请按照图1-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 BSwitch 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 vlan-interface 105 32 10

[SwitchD-pim] c-rp vlan-interface 105 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 vlan-interface 102 32 20

[SwitchE-pim] c-rp vlan-interface 102 group-policy 2005

[SwitchE-pim] quit

(5)        检验配置效果

配置完成后,先通过Host A检验一下配置效果。Host A需要接收组播组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: Vlan-interface100

                  Protocol: igmp, UpTime: 00:13:46, Expires:00:03:06

 (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: Vlan-interface100

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

Switch BSwitch 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: Vlan-interface101

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

# 查看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: Vlan-interface102

                  Protocol: pim-sm, UpTime: 00:13:16, Expires: 00:03:22


 

 (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,Switch A和Switch E之间会生成RPT。当组播源S(10.110.5.100/24)向RP发起注册后,Switch D和Switch E之间会生成SPT。当Switch A收到组播数据后立即执行从RPT到SPT的切换。RPT路径中的交换机(Switch A和Switch E)上存在(*,G)表项,而SPT路径中的交换机(Switch A和Switch D)上存在(S,G)表项。

1.3.5  完整配置

(1)        Switch A配置信息

#

multicast routing-enable

#

interface Vlan-interface100

 ip address 10.110.1.1 255.255.255.0

 igmp enable

 pim sm

#

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

#

(2)        Switch B配置信息

#

multicast routing-enable

#

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

 igmp enable

 pim sm

#

(3)        Switch C配置信息

#

multicast routing-enable

#

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

 igmp enable

 pim sm

#

(4)        Switch D配置信息

#

acl number 2005

 rule 0 permit source 225.1.1.0 0.0.0.255

#

multicast routing-enable

#

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

#

pim

 c-bsr Vlan-interface105 32 10

 c-rp Vlan-interface105 group-policy 2005

#

(5)        Switch E配置信息

#

acl number 2005

 rule 0 permit source 225.1.1.0 0.0.0.255

#

multicast routing-enable

#

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

#

pim

 c-bsr Vlan-interface102 32 20

 c-rp Vlan-interface102 group-policy 2005

#

1.3.6  配置注意事项

l              同一台设备所有接口上所启用的PIM模式必须相同。

l              一个RP可以为多个组播组服务,也可以为所有组播组服务。每个组播组在任意时刻,只能由唯一的一个RP为其转发数据,而不能由多个RP转发数据。

l              在同一台三层交换机上只能配置一个候选BSR,在另外的接口上配置BSR会取代先前的配置。

l              建议候选BSR和候选RP应配置在骨干网的三层交换机上。

l              配置RP时,若没有指定所服务的组播组范围,该RP为所有组播组服务。否则,所服务组的范围限定为指定范围的组播组。

l              用户可以配置基本访问控制列表,对相关的组播IP地址进行过滤,从而控制静态RP所服务的组播组范围。

l              如果使用静态RP,必须在PIM域内的所有三层交换机上指定相同的静态RP地址。

l              如果配置的静态RP地址是本机某个状态为UP的接口地址,本机就作为静态RP。

l              在BSR机制选举产生的RP有效时,静态RP不起作用。

l              若PIM-SM网络中仅采用静态RP,则不用配置C-BSR。

1.4  PIM-SM管理域配置指导

管理域与组播组相对应,针对不同组播组划分相应的管理域。管理域的边界由ZBR(Zone Border Router,区域边界路由器)构成,每个管理域各维护一个BSR,为特定范围的组播组服务,属于此范围的组播协议报文(如断言报文、BSR自举报文等)无法通过管理域边界。不同管理域所服务的组播组范围可以重叠,该范围内的组播组只在本管理域内有效,相当于私有组地址。而不属于任何管理域服务范围的组播组则一律属于Global域的服务范围,Global域中维护一个BSR,为剩余的所有组播组服务。

通过管理域机制一方面可以有效分担单一BSR的管理压力,另一方面可以使用私有组地址为特定区域提供专门的服务。

1.4.1  适用产品、版本

表1-3 配置适用的产品与软件版本关系

产品

软件版本

S7500E系列以太网交换机

Release 6100系列,Release 6300系列,Release 6600系列,Release 6610系列

S7600系列以太网交换机

Release 6600系列,Release 6610系列

S5800&S5820X系列以太网交换机

Release 1110,Release 1211

CE3000-32F以太网交换机

Release 1211

S5500-EI系列以太网交换机

Release 2202,Release 2208

S5500-EI-D系列以太网交换机

Release 2208

S3610&S5510系列以太网交换机

Release 5301,Release 5303,Release 5306,Release 5309

S3500-EA系列以太网交换机

Release 5303,Release 5309

 

1.4.2  组网需求

在如图1-3所示的网络环境中,公司有公共的组播源Source 3,研发部和市场部也有各自独立的组播源Source 1和Source 2,要求通过配置实现:

l              研发部和市场部的接收者都能通过组播方式接收公司公共视频点播信息。

l              研发部和市场部各自内部的视频点播信息只能被各自的员工点播,部门间的视频信息不能互相点播。

图1-3 PIM-SM管理域配置组网图

设备

接口

IP地址

设备

接口

IP地址

Switch A

Vlan-int100

192.168.1.1/24

Switch D

Vlan-int104

10.110.4.2/24

 

Vlan-int101

10.110.1.1/24

 

Vlan-int108

10.110.7.1/24

Switch B

Vlan-int200

192.168.2.1/24

 

Vlan-int107

10.110.8.1/24

 

Vlan-int101

10.110.1.2/24

Switch E

Vlan-int400

192.168.4.1/24

 

Vlan-int103

10.110.2.1/24

 

Vlan-int105

10.110.5.2/24

 

Vlan-int102

10.110.3.1/24

 

Vlan-int108

10.110.7.2/24

Switch C

Vlan-int300

192.168.3.1/24

Switch F

Vlan-int109

10.110.9.1/24

 

Vlan-int104

10.110.4.1/24

 

Vlan-int107

10.110.8.2/24

 

Vlan-int105

10.110.5.1/24

 

Vlan-int102

10.110.3.2/24

 

Vlan-int103

10.110.2.2/24

Switch G

Vlan-int500

192.168.5.1/24

 

Vlan-int106

10.110.6.1/24

 

Vlan-int109

10.110.9.2/24

Switch H

Vlan-int110

10.110.10.1/24

Source 1

-

192.168.2.10/24

 

Vlan-int106

10.110.6.2/24

Source 2

-

192.168.3.10/24

Switch I

Vlan-int600

192.168.6.1/24

Source 3

-

192.168.5.10/24

 

Vlan-int110

10.110.10.2/24

 

 

 

 

1.4.3  配置思路

实现上面的组网需求,可通过配置组播数据过滤器实现,也可以通过管理域机制实现。前者实现起来比较复杂,需要用户准确的定义过滤规则,及规划各部门内部使用的组播地址。而后者实现起来比较简单,具体配置如下:

(1)        整个公司PIM域采用SM管理域方式,划分整个公司作为Global域、研发部作为管理域1、市场部作为管理域2。

(2)        划分各管理域的私有组地址范围。因不同管理域的组播组地址范围可以重叠,这里都以239.0.0.0/8为例。Global域为239.0.0.0/8以外的所有组播组服务。

(3)        将Switch B、Switch C和Switch D配置为各管理域的ZBR。

(4)        配置C-BSR和C-RP:Switch B的Vlan-interface101接口为管理域1的C-BSR和C-RP,服务于239.0.0.0/8;Switch D的Vlan-interface104接口为管理域2的C-BSR和C-RP,服务于239.0.0.0/8;Switch F的Vlan-interface109为Global域的C-BSR和C-RP,服务于239.0.0.0/8以外的所有组播组。

(5)        Switch A、Switch E和Switch I分别与各自所连接的接收者之间运行IGMPv2。

1.4.4  配置过程和解释

(1)        配置IP地址和单播路由协议

请按照图1-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] pim

[SwitchA-pim] c-bsr admin-scope

[SwitchA-pim] quit

[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 G、Switch H和Switch I的配置与Switch A相似,配置过程略。

# 在三层交换机的连接有接收者的接口上使能IGMP。这里以配置Switch A的Vlan-interface100接口为例。

[SwitchA] interface vlan-interface 100

[SwitchA-Vlan-interface100] igmp enable

[SwitchA-Vlan-interface101] quit

Switch E和Switch I的配置与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-interface103和Vlan-interface106配置为管理域2的边界。

<SwitchC> system-view

[SwitchC] interface vlan-interface 103

[SwitchC-Vlan-interface103] multicast boundary 239.0.0.0 8

[SwitchC-Vlan-interface103] quit

[SwitchC] interface vlan-interface 106

[SwitchC-Vlan-interface106] multicast boundary 239.0.0.0 8

[SwitchC-Vlan-interface106] quit

# 在Switch D上将接口Vlan-interface107配置为管理域2的边界。

<SwitchD> system-view

[SwitchD] interface vlan-interface 107

[SwitchD-Vlan-interface107] multicast boundary 239.0.0.0 8

[SwitchD-Vlan-interface107] 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 group 239.0.0.0 8

[SwitchB-pim] c-bsr vlan-interface 101

[SwitchB-pim] c-rp vlan-interface 101 group-policy 2001

[SwitchB-pim] quit

# 在Switch D上配置RP通告的服务范围,并将接口Vlan-interface104配置为管理域2的C-BSR和C-RP。

[SwitchD] acl number 2001

[SwitchD-acl-basic-2001] rule permit source 239.0.0.0 0.255.255.255

[SwitchD-acl-basic-2001] quit

[SwitchD] pim

[SwitchD-pim] c-bsr group 239.0.0.0 8

[SwitchD-pim] c-bsr vlan-interface 104

[SwitchD-pim] c-rp vlan-interface 104 group-policy 2001

[SwitchD-pim] quit

# 在Switch F上将接口Vlan-interface109配置为Global域的C-BSR和C-RP。

<SwitchF> system-view

[SwitchF] pim

[SwitchF-pim] c-bsr global

[SwitchF-pim] c-bsr vlan-interface 109

[SwitchF-pim] c-rp vlan-interface 109

[SwitchF-pim] quit

(5)        检验配置效果

l              通过使用display pim bsr-info命令可以查看交换机上BSR选举的信息,以及本地配置并生效的C-RP信息。例如:

# 查看Switch B上的BSR信息,以及本地配置并生效的C-RP信息。

[SwitchB] display pim bsr-info

 VPN-Instance: public net

 Elected BSR Address: 10.110.9.1

     Priority: 64

     Hash mask length: 30

     State: Accept Preferred

     Scope: Global

     Uptime: 00:01:45

     Expires: 00:01:25

 Elected BSR Address: 10.110.1.2

     Priority: 64

     Hash mask length: 30

     State: Elected

     Scope: 239.0.0.0/8

     Uptime: 00:04:54

     Next BSR message scheduled at: 00:00:06

 Candidate BSR Address: 10.110.1.2

     Priority: 64

     Hash mask length: 30

     State: Elected

     Scope: 239.0.0.0/8

 Candidate RP: 10.110.1.2(Vlan-interface101)

     Priority: 192

     HoldTime: 150

     Advertisement Interval: 60

     Next advertisement scheduled at: 00:00:15

l              通过使用display pim rp-info命令可以查看交换机上获取的RP信息。例如:

# 查看Switch B上的RP信息。

[SwitchB] display pim rp-info

 VPN-Instance: public net

 PIM-SM BSR RP information:

 Group/MaskLen: 224.0.0.0/4

     RP: 10.110.9.1

     Priority: 192

     HoldTime: 150

     Uptime: 00:03:39

     Expires: 00:01:51

 Group/MaskLen: 239.0.0.0/8

     RP: 10.110.1.2 (local)

     Priority: 192

     HoldTime: 150

     Uptime: 00:07:44

     Expires: 00:01:51

由此可见,研发部门的接收者若要点播内部的组播视频(管理域1,239.0.0.0/8范围内的组播组),将由其部门内部的BSR(Switch B的Vlan-interface101)和RP(Switch B的Vlan-interface101)为其提供服务,若要点播公司公共的组播视频(Global域, 239.0.0.0/8范围以外的组播组),将由公司公共的BSR(Switch F的Vlan-interface109)和RP(Switch F的Vlan-interface109)为其提供服务。

1.4.5  完整配置

(1)        Switch A配置信息

#

multicast routing-enable

#

interface Vlan-interface100

 ip address 192.168.1.1 255.255.255.0

 igmp enable

 pim sm

#

interface Vlan-interface101

 ip address 10.110.1.1 255.255.255.0

 pim sm

#

pim

 c-bsr admin-scope

#

Switch E和Switch I的配置信息与Switch A相似

(2)        Switch B配置信息

#

multicast routing-enable

#

acl number 2001

 rule 0 permit source 239.0.0.0 0.255.255.255

interface Vlan-interface101

 ip address 10.110.1.2 255.255.255.0

 pim sm

#

interface Vlan-interface102

 ip address 10.110.3.1 255.255.255.0

 multicast boundary 239.0.0.0 8

 pim sm

#

interface Vlan-interface103

 ip address 10.110.2.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

#

pim

 c-bsr admin-scope

 c-bsr group 239.0.0.0 255.0.0.0

 c-bsr vlan-interface 101

 c-rp vlan-interface 101 group-policy 2001

#

(3)        Switch C配置信息

#

multicast routing-enable

#

interface Vlan-interface103

 ip address 10.110.2.2 255.255.255.0

 multicast boundary 239.0.0.0 8

 pim sm

#

interface Vlan-interface104

 ip address 10.110.4.1 255.255.255.0

 pim sm

#

interface Vlan-interface105

 ip address 10.110.5.1 255.255.255.0

 pim sm

#

interface Vlan-interface106

 ip address 10.110.6.1 255.255.255.0

 multicast boundary 239.0.0.0 8

 pim sm

interface Vlan-interface300

 ip address 192.168.3.1 255.255.255.0

 pim sm

#

pim

 c-bsr admin-scope

#

(4)        Switch D配置信息

#

multicast routing-enable

#

acl number 2001

 rule 0 permit source 239.0.0.0 0.255.255.255

interface Vlan-interface104

 ip address 10.110.4.2 255.255.255.0

 pim sm

#

interface Vlan-interface107

 ip address 10.110.8.1 255.255.255.0

 multicast boundary 239.0.0.0 8

 pim sm

#

interface Vlan-interface108

 ip address 10.110.7.2 255.255.255.0

 pim sm

#

pim

 c-bsr admin-scope

 c-bsr group 239.0.0.0 255.0.0.0

 c-bsr vlan-interface 104

 c-rp vlan-interface 104 group-policy 2001

#

(5)        Switch F配置信息

#

multicast routing-enable

interface Vlan-interface102

 ip address 10.110.3.2 255.255.255.0

 pim sm

#

interface Vlan-interface107

 ip address 10.110.8.2 255.255.255.0

 pim sm

#

interface Vlan-interface109

 ip address 10.110.9.1 255.255.255.0

 pim sm

#

pim

 c-bsr admin-scope

 c-bsr global

 c-bsr vlan-interface 109

 c-rp vlan-interface 109

#

(6)        Switch G配置信息

#

multicast routing-enable

interface Vlan-interface109

 ip address 10.110.9.2 255.255.255.0

 pim sm

#

interface Vlan-interface500

 ip address 192.168.5.1 255.255.255.0

 pim sm

#

pim

 c-bsr admin-scope

#

Switch H的配置信息与Switch G相似

1.4.6  配置注意事项

l              通过multicast boundary命令指定管理域所服务的组播组范围时,其指定的有效的组范围只能在239.0.0.0/8之内。

l              各个管理域的C-BSR和C-RP服务的组范围只能在239.0.0.0/8之内。

1.5  PIM-SSM基本配置指导

SSM(Source-Specific Multicast,指定信源组播)模型能够借助PIM-SM的部分技术来实现。由于接收者已经通过其它渠道(如广告咨询等)知道了组播源的具体位置,因此在SSM模型中无需RP,无需构建RPT,无需组播源注册过程,也无需通过MSDP(Multicast Source Discovery Protocol,组播源发现协议)来发现其它PIM域内的组播源,仅需要IGMPv3和PIM-SM部分子集的支持。

1.5.1  适用产品、版本

表1-4 配置适用的产品与软件版本关系

产品

软件版本

S7500E系列以太网交换机

Release 6100系列,Release 6300系列,Release 6600系列,Release 6610系列

S7600系列以太网交换机

Release 6600系列,Release 6610系列

S5800&S5820X系列以太网交换机

Release 1110,Release 1211

CE3000-32F以太网交换机

Release 1211

S5500-EI系列以太网交换机

Release 2202,Release 2208

S5500-EI-D系列以太网交换机

Release 2208

S3610&S5510系列以太网交换机

Release 5301,Release 5303,Release 5306,Release 5309

S3500-EA系列以太网交换机

Release 5303,Release 5309

 

1.5.2  组网需求

图1-4所示网络,各三层交换机之间采用OSPF协议进行互连,单播路由正常。研发部网络N1和市场部网络N2中都存在视频信息的点播者,且Switch A与网络N1之间运行IGMPv3,Switch B和Switch C与网络N2之间也运行IGMPv3。

l              在该网络中,接收者主机所能点播的组播组范围为232.1.1.0/24,

l              研发部的Host A只希望接收来自Source 1的组播数据,

l              市场部的Host C只希望接收来自Source 2的组播数据。

要求通过PIM-SSM协议实现上述需求。

图1-4 PIM-SSM典型配置组网图

设备

接口

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.5.3  配置思路

在PIM-DM和PIM-SM中,接收者在加入特定组播组时,是无法指定组播源的,即接收者可接收任意组播源发来的该特定组播组的组播信息。而在PIM-SSM网络中,在IGMPv3的支持下,使接收者在加入某组播组G的同时,能够明确要求接收来自某特定组播源S的组播信息。

为实现本组网需求,需进行如下配置:

(1)        SSM模型需要IGMPv3和PIM-SM部分子集的支持

l              在三层交换机Switch A、Switch B、Switch C、Switch D和Switch E上使能组播路由功能,并在各VLAN接口上使能PIM-SM功能,以发现PIM邻居,维护各设备之间的PIM邻居关系。

l              对于边界设备Switch A、Switch B、Switch C,在连接网络N1的接口Vlan-interface100和和连接N2的接口Vlan-interface 200上使能IGMPv3功能,以建立和维护各组播组成员关系。且要求接收者主机也要运行IGMPv3。

(2)        配置SSM组播组范围为232.1.1.0/24。是采用PIM-SSM模型还是PIM-SM模型,这取决于接收者订阅通道(S,G)中的组播组是否在SSM组播组范围之内,所有使能了PIM-SM的接口将会认为属于该范围内的组播组采用了PIM-SSM模型。所以需要在所有使能了PIM-SM功能的三层交换机上配置SSM组播组范围。

1.5.4  配置过程和解释

(1)        配置IP地址和单播路由协议

请按照图1-4配置各接口的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的接口上使能IGMPv3功能

# 在Switch A的接口Vlan-interface100上使能IGMPv3(缺省情况下,IGMP的版本为IGMPv2)。

 [SwitchA] interface vlan-interface 100

[SwitchA-Vlan-interface100] igmp enable

[SwitchA-Vlan-interface100] igmp version 3

[SwitchA-Vlan-interface100] quit

Switch B和Switch C的配置与Switch A相似,配置过程略。

(4)        配置SSM组播组的地址范围

# 在Switch A上配置SSM组播组地址范围为232.1.1.0/24。

[SwitchA] acl number 2000

[SwitchA-acl-basic-2000] rule permit source 232.1.1.0 0.0.0.255

[SwitchA-acl-basic-2000] quit

[SwitchA] pim

[SwitchA-pim] ssm-policy 2000

[SwitchA-pim] quit

Switch B、Switch C、Switch D和Switch E的配置与Switch A相似,配置过程略。

(5)        检验配置效果

配置完成后,先通过Host A检验一下配置效果。Host A点播组播源S1(10.110.5.100/24)发往组播组G(232.1.1.1)的组播信息。通过使用display pim routing-table命令可以查看交换机的PIM路由表信息。例如:

# 查看Switch A上的PIM路由表信息。

[SwitchA] display pim routing-table

Total 1 (S, G) entry

 

 (10.110.5.100, 232.1.1.1)

     Protocol: pim-ssm, Flag:

     UpTime: 00:13:25

     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 Vlan-interface100

                  Protocol: igmp, UpTime: 00:13:25, Expires: -

# 查看Switch D上的PIM路由表信息。

[SwitchD] display pim routing-table

Total entry; 1 (S, G) entry

 

 (10.110.5.100, 232.1.1.1)

     Protocol: pim-ssm, Flag:LOC

     UpTime: 00:12:05

     Upstream interface: Vlan-interface300

         Upstream neighbor: NULL

         RPF prime neighbor: NULL

     Downstream interface(s) information:

       Total number of downstreams: 1

           1: Vlan-interface101

                  Protocol: pim-ssm, UpTime: 00:12:05, Expires: 00:03:25

通过显示信息可知:Host A需要接收指定组播源S110.110.5.100/24)发往组播组G232.1.1.1)的信息,Switch A会向组播源方向构造SPTSPT路径中的交换机(Switch ASwitch D)上生成(SG)表项,而SPT路径之外的交换机(Switch BSwitch CSwitch E)上没有组播路由表项。

1.5.5  完整配置

(1)        Switch A配置信息

#

multicast routing-enable

#

acl number 2000

 rule 0 permit source 232.1.1.0 0.0.0.255

#

interface Vlan-interface100

 ip address 10.110.1.1 255.255.255.0

 igmp enable

 igmp version 3

 pim sm

#

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

#

pim

 ssm-policy 2000

#

(2)        Switch B配置信息

#

multicast routing-enable

#

acl number 2000

 rule 0 permit source 232.1.1.0 0.0.0.255

#

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

 igmp enable

 igmp version 3

 pim sm

#

pim

 ssm-policy 2000

#

(3)        Switch C配置信息

#

multicast routing-enable

#

acl number 2000

 rule 0 permit source 232.1.1.0 0.0.0.255

#

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

 igmp enable

 igmp version 3

 pim sm

#

pim

 ssm-policy 2000

#

(4)        Switch D配置信息

#

multicast routing-enable

#

acl number 2000

 rule 0 permit source 232.1.1.0 0.0.0.255

#

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

#

pim

 ssm-policy 2000

#

(5)        Switch E配置信息

#

multicast routing-enable

#

acl number 2000

 rule 0 permit source 232.1.1.0 0.0.0.255

#

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

#

pim

 ssm-policy 2000

#

1.5.6  配置注意事项

l              PIM-SSM模型需要IGMPv3的支持,因此应确保连接有接收者的PIM路由器上使能了IGMPv3。

l              应确保域内所有路由器上配置的SSM组播组地址范围都一致,否则组播信息将无法通过SSM模型进行传输。

l              如果某组播组属于SSM组播组范围,但该组成员使用IGMPv1或IGMPv2发送加入报文,则设备不会触发(*,G)加入报文。

l              若要实现主机既能加入SSM地址范围内的组播组,又能加入SSM地址范围外的组播组,可在PIM-SSM网络中配置RP及BSR,实现PIM-SM即可。

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们