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

07-IP组播配置举例

目录

00-H3C S12500 组播静态路由典型配置举例

本章节下载 00-H3C S12500 组播静态路由典型配置举例  (154.1 KB)

00-H3C S12500 组播静态路由典型配置举例

H3C S12500 组播静态路由配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2013 杭州华三通信技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,

并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。

H3C_彩色.emf

 



1  简介

组播静态路由是RPF(Reverse Path Forwarding,逆向路径转发)检查的重要依据之一。本文档介绍了利用组播静态路由来改变RPF路由的配置举例。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解组播静态路由特性。

3  配置举例

3.1  组网需求

图1所示,三层交换机Switch A、Switch B和Switch C之间采用OSPF协议进行互连,单播路由正常。网络中运行PIM-SM协议,所有交换机都支持组播功能。通常情况下,Receiver能通过Switch A—Switch B这条与单播路径相同的路径接收来自Source的组播信息。

要求通过在Switch B上配置组播静态路由实现:Receiver通过Switch A—Switch C—Switch B这条与单播路径不同的路径接收来自Source的组播信息。

图1 组播静态路由配置组网图

设备

接口

IP地址

设备

接口

IP地址

Switch A

Vlan-int100(GE3/0/1)

10.10.1.1/24

Switch B

Vlan-int101(GE3/0/1)

10.101.1.1/24

 

Vlan-int12(GE3/0/2)

10.12.1.1/24

 

Vlan-int12(GE3/0/2)

10.12.1.2/24

 

Vlan-int13(GE3/0/3)

10.13.1.1/24

 

Vlan-int23(GE3/0/3)

10.23.1.2/24

 

Loopback0

1.1.1.1/32

Switch C

Vlan-int13(GE3/0/3)

10.13.1.3/24

 

 

 

 

Vlan-int23(GE3/0/2)

10.23.1.3/24

 

3.2  使用版本

本举例是在S12500-CMW520-R1825P01版本上进行配置和验证的。

3.3  配置注意事项

·     配置组播静态路由时,如果指定了单播路由协议,则匹配的路由必须在指定的单播路由协议中存在时,该组播静态路由才会生效。

·     配置组播静态路由时,不能用指定接口的方式来指定RPF邻居,而只能用指定地址的方式。

·     配置组播静态路由时,应保证期望组播流转发的路径中所有接口上均使能了PIM协议。

3.4  配置步骤

3.4.1  Switch A的配置

(1)     使能组播路由功能

<SwitchA> system-view

System View: return to User View with Ctrl+Z.

[SwitchA] multicast routing-enable

(2)     配置各接口及接口地址,并使能PIM-SM

# 配置作为BSR和RP的Loopback接口,使能PIM-SM。

[SwitchA] interface LoopBack 0

[SwitchA-LoopBack0] ip address 1.1.1.1 32

[SwitchA-LoopBack0] pim sm

[SwitchA-LoopBack0] quit

# 配置连接组播源的接口及接口地址,使能PIM-SM。

[SwitchA] vlan 100

[SwitchA-vlan100] port GigabitEthernet 3/0/1

[SwitchA-vlan100] quit

[SwitchA] interface Vlan-interface 100

[SwitchA-Vlan-interface100] ip address 10.10.1.1 24

[SwitchA-Vlan-interface100] pim sm

[SwitchA-Vlan-interface100] undo shutdown

[SwitchA-Vlan-interface100] quit

[SwitchA] interface GigabitEthernet 3/0/1

[SwitchA-GigabitEthernet3/0/1] undo shutdown

[SwitchA-GigabitEthernet3/0/1] quit

# 配置连接SwitchB的接口及接口地址,使能PIM-SM

[SwitchA] vlan 12

[SwitchA-vlan12] port GigabitEthernet 3/0/2

[SwitchA-vlan12] quit

[SwitchA] interface Vlan-interface 12

[SwitchA-Vlan-interface12] ip address 10.12.1.1 24

[SwitchA-Vlan-interface12] pim sm

[SwitchA-Vlan-interface100] undo shutdown

[SwitchA-Vlan-interface12] quit

[SwitchA] interface GigabitEthernet 3/0/2

[SwitchA-GigabitEthernet3/0/2] undo shutdown

[SwitchA-GigabitEthernet3/0/2] quit

# 配置连接SwitchC的接口及接口地址,使能PIM-SM

[SwitchA] vlan 13

[SwitchA-vlan13] port GigabitEthernet 3/0/3

[SwitchA-vlan13] quit

[SwitchA] interface Vlan-interface 13

[SwitchA-Vlan-interface13] ip address 10.13.1.1 24

[SwitchA-Vlan-interface13] pim sm

[SwitchA-Vlan-interface13] undo shutdown

[SwitchA-Vlan-interface13] quit

[SwitchA] interface GigabitEthernet 3/0/3

[SwitchA-GigabitEthernet3/0/3] undo shutdown

[SwitchA-GigabitEthernet3/0/3] quit

(3)     配置网络中的C-BSR和C-RP,以负责组播信息的转发

[SwitchA]pim

[SwitchA-pim]c-bsr LoopBack 0

[SwitchA-pim]c-rp LoopBack 0

(4)     配置OSPF单播路由,使SwitchA和组播源、接收者之间路由可达

[SwitchA] ospf 1

[SwitchA-ospf-1] import-route direct

[SwitchA-ospf-1] area 0.0.0.0

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

[SwitchA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

3.4.2  Switch B的配置

(1)     使能组播路由功能

<SwitchB> system-view

System View: return to User View with Ctrl+Z.

[SwitchB] multicast routing-enable

(2)     配置各接口及接口地址,并使能PIM-SM

# 配置连接SwitchA的接口及接口地址,使能PIM-SM

[SwitchB] vlan 12

[SwitchB-vlan12] port GigabitEthernet 3/0/2

[SwitchB-vlan12] quit

[SwitchB] interface Vlan-interface 12

[SwitchB-Vlan-interface12] ip address 10.12.1.2 24

[SwitchB-Vlan-interface12] pim sm

[SwitchB-Vlan-interface12] undo shutdown

[SwitchB-Vlan-interface12] quit

[SwitchB] interface GigabitEthernet 3/0/2

[SwitchB-GigabitEthernet3/0/2] undo shutdown

[SwitchB-GigabitEthernet3/0/2] quit

# 配置连接SwitchC的接口及接口地址,使能PIM-SM

[SwitchB] vlan 23

[SwitchB-vlan23] port GigabitEthernet 3/0/3

[SwitchB-vlan23] quit

[SwitchB] interface Vlan-interface 23

[SwitchB-Vlan-interface23] ip address 10.23.1.2 24

[SwitchB-Vlan-interface23] pim sm

[SwitchB-Vlan-interface23] undo shutdown

[SwitchB-Vlan-interface23] quit

[SwitchB] interface GigabitEthernet 3/0/3

[SwitchB-GigabitEthernet3/0/3] undo shutdown

[SwitchB-GigabitEthernet3/0/3] quit

# 配置连接HostA的接口及接口地址,使能PIM-SMIGMP(默认为IGMPv2版本)

[SwitchB] vlan 101

[SwitchB-vlan101] port GigabitEthernet 3/0/1

[SwitchB-vlan101] quit

[SwitchB] interface Vlan-interface 101

[SwitchB-Vlan-interface101] ip address 10.101.1.1 24

[SwitchB-Vlan-interface101] pim sm

[SwitchB-Vlan-interface101] igmp enable

[SwitchB-Vlan-interface101] undo shutdown

[SwitchB-Vlan-interface101] quit

[SwitchB] interface GigabitEthernet 3/0/1

[SwitchB-GigabitEthernet3/0/1] undo shutdown

[SwitchB-GigabitEthernet3/0/1] quit

(3)     配置组播静态路由

# 配置一条组播静态路由使到组播源的RPF邻居为SwitchC

[SwitchB] ip rpf-route-static 10.10.1.0 24 10.23.1.3

(4)     配置OSPF单播路由,使SwitchB和组播源、接收者之间路由可达

[SwitchB] ospf 1

[SwitchB-ospf-1] import-route direct

[SwitchB-ospf-1] area 0.0.0.0

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

3.4.3  Switch C的配置

(1)     使能组播路由功能

<SwitchC> system-view

System View: return to User View with Ctrl+Z.

[SwitchC] multicast routing-enable

(2)     配置各接口及接口地址,并使能PIM-SM

# 配置连接SwitchA的接口及接口地址,使能PIM-SM

[SwitchC] vlan 13

[SwitchC-vlan13] port GigabitEthernet 3/0/3

[SwitchC-vlan13] quit

[SwitchC] interface Vlan-interface 13

[SwitchC-Vlan-interface13] ip address 10.13.1.3 24

[SwitchC-Vlan-interface13] pim sm

[SwitchC-Vlan-interface13] undo shutdown

[SwitchC-Vlan-interface13] quit

[SwitchC] interface GigabitEthernet 3/0/3

[SwitchC-GigabitEthernet3/0/3] undo shutdown

[SwitchC-GigabitEthernet3/0/3] quit

# 配置连接SwitchB的接口及接口地址,使能PIM-SM

[SwitchC] vlan 23

[SwitchC-vlan23] port GigabitEthernet 3/0/2

[SwitchC-vlan23] quit

[SwitchC] interface Vlan-interface 23

[SwitchC-Vlan-interface23] ip address 10.23.1.3 24

[SwitchC-Vlan-interface23] pim sm

[SwitchC-Vlan-interface23] undo shutdown

[SwitchC-Vlan-interface23] quit

[SwitchC] interface GigabitEthernet 3/0/2

[SwitchC-GigabitEthernet3/0/2] undo shutdown

[SwitchC-GigabitEthernet3/0/2] quit

(3)     配置OSPF单播路由,使SwitchC和组播源、接收者之间路由可达

[SwitchC] ospf 1

[SwitchC-ospf-1] import-route direct

[SwitchC-ospf-1] area 0.0.0.0

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

3.5  验证配置

(1)     按照如上配置后,查看配置信息发现SwitchA、SwitchB、SwitchC两两之间建立了PIM邻居关系,SwitchB上配置的组播静态路由已生效。

# 查看SwitchA上的PIM邻居信息。

[SwtichA] display pim neighbor

 VPN-Instance: public net

 Total Number of Neighbors = 2

 

 Neighbor        Interface           Uptime   Expires  Dr-Priority  Mode

 10.12.1.2       Vlan12              00:00:05 00:01:20 1

 10.13.1.3       Vlan13              00:00:25 00:01:21 1

# 查看SwitchB上的PIM邻居信息。

[SwtichB] display pim neighbor

 VPN-Instance: public net

 Total Number of Neighbors = 2

 

 Neighbor        Interface           Uptime   Expires  Dr-Priority  Mode

 10.12.1.1       Vlan12              00:00:05 00:01:40 1

 10.23.1.3       Vlan23              00:00:20 00:01:41 1

# 查看SwitchC上的PIM邻居信息。

[SwtichC] display pim neighbor

 VPN-Instance: public net

 Total Number of Neighbors = 2

 

 Neighbor        Interface           Uptime   Expires  Dr-Priority  Mode

 10.13.1.1       Vlan13              00:00:25 00:01:30 1

 10.23.1.2       Vlan23              00:00:20 00:01:31 1

# 查看SwitchB上组播静态路由的信息。

[SwtichB] display multicast routing-table static 10.10.1.0 24

Multicast Routing Table of VPN-Instance: public net

Routes : 1

 

 Mroute 10.10.1.0/24

          Interface = Vlan-interface23   RPF Neighbor = 10.23.1.3

          Matched routing protocol = <none>, Route-policy = <none>

          Preference = 1, Order = 1

 Running Configuration = ip rpf-route-static 10.10.1.0 24 10.23.1.3 order 1

(2)     检验组播源Source向Host A发送组播信息的报文路径。

# Host A指定加入组播组G(225.1.1.1)后,在SwitchB上查看Source(10.10.1.2/24)的RPF信息。

[SwitchB] display multicast rpf-info 10.10.1.2

 RPF information about source 10.10.1.2:

     RPF interface: Vlan-interface23, RPF neighbor: 10.23.1.3

     Referenced route/mask: 10.10.1.0/24

     Referenced route type: multicast static

     Route selection rule: preference-preferred

     Load splitting rule: disable

可以看出,SwitchB上的RPF路由来源与组播静态路由,RPF邻居变为Switch C。

3.6  配置文件

·     Switch A

#

vlan 12 to 13

#

vlan 100

#

multicast routing-enable

#

interface Vlan-interface12

 ip address 10.12.1.1 255.255.255.0

 pim sm

#

interface Vlan-interface13

 ip address 10.13.1.1 255.255.255.0

 pim sm

#

interface Vlan-interface100

 ip address 10.10.1.1 255.255.255.0

 pim sm

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

 pim sm

#

interface GigabitEthernet3/0/1

 port link-mode bridge

 port access vlan 100

#

interface GigabitEthernet3/0/2

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet3/0/3

 port link-mode bridge

 port access vlan 13

#

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

 c-bsr LoopBack0

 c-rp LoopBack0

#

·     Switch B

#

vlan 12

#

vlan 23

#

vlan 101

#

multicast routing-enable

#

interface Vlan-interface12

 ip address 10.12.1.2 255.255.255.0

 pim sm

#

interface Vlan-interface23

 ip address 10.23.1.2 255.255.255.0

 pim sm

#

interface Vlan-interface101

 ip address 10.101.1.1 255.255.255.0

 igmp enable

 pim sm

#

interface GigabitEthernet3/0/1

 port link-mode bridge

 port access vlan 101

#

interface GigabitEthernet3/0/2

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet3/0/3

 port link-mode bridge

 port access vlan 23

#

ospf 1

 import-route direct

area 0.0.0.0

 network  10.0.0.0 0.255.255.255

#

ip rpf-route-static 10.10.1.0 24 10.23.1.3

#

·     Switch C

#

vlan 13

#

vlan 23

#

multicast routing-enable

#

interface Vlan-interface13

 ip address 10.13.1.3 255.255.255.0

 pim sm

#

interface Vlan-interface23

 ip address 10.23.1.3 255.255.255.0

 pim sm

#

interface GigabitEthernet3/0/2

 port link-mode bridge

 port access vlan 23

#

interface GigabitEthernet3/0/3

 port link-mode bridge

 port access vlan 13

#

ospf 1

 import-route direct

area 0.0.0.0

 network  10.0.0.0 0.255.255.255

#

4  相关资料

·     《H3C S12500系列路由交换机  IP组播配置指导》中的“组播路由与转发”

·     《H3C S12500系列路由交换机  IP组播命令参考》中的“组播路由与转发”

 

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

新华三官网
联系我们