25-IGMP典型配置举例
本章节下载: 25-IGMP典型配置举例 (205.14 KB)
目 录
本章介绍了使用IGMP相关功能实现对IP组播成员进行管理的典型配置举例。
· VLAN上运行了二层组播协议后,对应的VLAN接口上将不能运行三层组播协议IGMP。
· 若某VLAN内已使能了IGMP Snooping,则该VLAN对应的VLAN接口上不能再使能IGMP代理功能。
· 在进行IGMP的相关配置时,在已使能IGMP代理功能的接口上不允许再使能IGMP。
表1 配置适用的产品与软件版本关系
产品 |
软件版本 |
S10500系列以太网交换机 |
Release 1120系列,Release 1130系列,Release 1200系列 |
S5800&S5820X系列以太网交换机 |
Release 1808 |
S5830系列以太网交换机 |
Release 1115,Release 1118 |
S5500-EI系列以太网交换机 |
Release 2220 |
如图1所示,PIM-DM网络内连接用户网络N1和用户网络N2的边界三层交换机上均运行IGMPv2功能。
现要求通过在IGMP交换机上配置IGMP组播组过滤器功能,实现控制用户网络N2内的接收者只能加入组播组224.1.1.1,而对用户网络N1内的接收者所能加入的组播组没有限制。
图1 IGMP组播组过滤器配置组网图
· 因共享网段N2内有多台IGMP交换机,为实现本组网需求,需要在该共享网段内的所有IGMP交换机上都配置相同的IGMP组播组过滤器。
· 为实现IGMP组播组过滤器控制主机加入组播组的范围,需要为其创建基本ACL,并在该ACL规则中指定允许主机加入的组播组范围。
由于不同版本IGMP协议的报文结构与种类不同,因此需要为同一网段上的所有三层交换机配置相同版本的IGMP,否则IGMP将不能正常运行。
(1) 配置PIM-DM域内各交换机的IP地址、单播路由协议和组播路由协议
配置PIM-DM域内交换机上各接口的IP地址和子网掩码,具体配置过程略。
配置PIM-DM域内的各交换机之间采用OSPF协议进行互连,确保PIM-DM域内部在网络层互通,并在各交换机上配置PIM-DM协议,以建立组播路由转发表项,实现组播数据可以从组播源到达接收者,具体配置过程略。
(2) 配置Switch A
# 在Switch A上使能IP组播路由,在各接口上使能PIM-DM,并在主机侧接口Vlan-interface100上使能IGMP。
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp enable
[SwitchA-Vlan-interface100] pim dm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] pim dm
[SwitchA-Vlan-interface101] quit
(3) 配置Switch B
# 在Switch B上使能IP组播路由,在各接口上使能PIM-DM,并在主机侧接口Vlan-interface200上使能IGMP及配置组播组过滤器,以在Switch B上限制用户网络N2内的主机只能加入组播组224.1.1.1。
<SwitchB> system-view
[SwitchB] acl number 2001
[SwitchB-acl-basic-2001] rule permit source 224.1.1.1 0
[SwitchB-acl-basic-2001] quit
[SwitchB] multicast routing-enable
[SwitchB] interface vlan-interface 200
[SwitchB-Vlan-interface200] igmp enable
[SwitchB-Vlan-interface200] pim dm
[SwitchB-Vlan-interface200] igmp group-policy 2001
[SwitchB-Vlan-interface200] quit
[SwitchB] interface vlan-interface 201
[SwitchB-Vlan-interface201] pim dm
[SwitchB-Vlan-interface201] quit
(4) 配置Switch C
# 在Switch C上使能IP组播路由,在各接口上使能PIM-DM,并在主机侧接口Vlan-interface200上使能IGMP及配置组播组过滤器,以在Switch C上限制用户网络N2内的主机只能加入组播组224.1.1.1。
<SwitchC> system-view
[SwitchC] acl number 2001
[SwitchC-acl-basic-2001] rule permit source 224.1.1.1 0
[SwitchC-acl-basic-2001] quit
[SwitchC] multicast routing-enable
[SwitchC] interface vlan-interface 200
[SwitchC-Vlan-interface200] igmp enable
[SwitchC-Vlan-interface200] pim dm
[SwitchC-Vlan-interface200] igmp group-policy 2001
[SwitchC-Vlan-interface200] quit
[SwitchC] interface vlan-interface 202
[SwitchC-Vlan-interface202] pim dm
[SwitchC-Vlan-interface202] quit
(1) 查看共享网络N2内IGMP查询器选举信息
配置完成后,查看接入共享网络N2的三层交换机Switch B和Switch C上IGMP查询器选举信息:
# 查看Switch B上IGMP查询器选举信息。
[SwitchB] display igmp interface
Interface information of VPN-Instance: public net
Vlan-interface200(10.110.2.1):
IGMP is enabled
Current IGMP version is 2
Value of query interval for IGMP(in seconds): 60
Value of other querier present interval for IGMP(in seconds): 125
Value of maximum query response time for IGMP(in seconds): 10
Querier for IGMP: 10.110.2.1 (this router)
Total 1 IGMP Group reported
# 查看Switch C上IGMP查询器选举信息。
[SwitchC] display igmp interface
Interface information of VPN-Instance: public net
Vlan-interface200(10.110.2.2):
IGMP is enabled
Current IGMP version is 2
Value of query interval for IGMP(in seconds): 60
Value of other querier present interval for IGMP(in seconds): 125
Value of maximum query response time for IGMP(in seconds): 10
Querier for IGMP: 10.110.2.1
Total 1 IGMP Group reported
由上显示信息可知,通过查询器选举,共享网段中IP地址最小的Switch B成为本共享网段的IGMP查询器。
(2) 查看交换机上IGMP组播组信息
配置完成后,用户网络N2内的组播接收者Host C分别发送组播组地址为224.1.1.1和224.1.1.2的IGMP成员关系报告报文,通过display igmp group命令查看Switch B和Switch C上IGMP组播组信息,验证配置效果:
# 查看Switch B上IGMP组播组信息。
[SwitchB] display igmp group
Total 1 IGMP Group(s).
Interface group report information of VPN-Instance: public net
Vlan-interface200(10.110.2.1):
Total 1 IGMP Groups reported
Group Address Last Reporter Uptime Expires
224.1.1.1 10.110.2.10 04:36:03 00:01:23
# 查看Switch C上IGMP组播组信息。
[SwitchC] display igmp group
Total 1 IGMP Group(s).
Interface group report information of VPN-Instance: public net
Vlan-interface200(10.110.2.2):
Total 1 IGMP Groups reported
Group Address Last Reporter Uptime Expires
224.1.1.1 10.110.2.10 04:21:03 00:01:13
Host C发送了组播组地址为224.1.1.1和224.1.1.2的IGMP成员关系报告报文,而Switch B和Switch C上只有组播组224.1.1.1的IGMP组播组信息,由此可见在Switch B和Switch C上配置的IGMP组播组过滤器已生效,用户网络N2内的组播接收者只能加入组播组224.1.1.1。
(1) Switch A配置信息
#
multicast routing-enable
#
vlan 100 to 101
#
interface Vlan-interface100
igmp enable
pim dm
#
interface Vlan-interface101
pim dm
#
(2) Switch B配置信息
#
multicast routing-enable
#
acl number 2001
rule 0 permit source 224.1.1.1 0
#
vlan 200 to 201
#
interface Vlan-interface200
igmp enable
igmp group-policy 2001
pim dm
#
interface Vlan-interface201
pim dm
#
(3) Switch C配置信息
#
multicast routing-enable
#
acl number 2001
rule 0 permit source 224.1.1.1 0
#
vlan 200
#
vlan 202
#
interface Vlan-interface200
igmp enable
igmp group-policy 2001
pim dm
#
interface Vlan-interface202
pim dm
#
表2 配置适用的产品与软件版本关系
产品 |
软件版本 |
S10500系列以太网交换机 |
Release 1120系列,Release 1130系列,Release 1200系列 |
S5800&S5820X系列以太网交换机 |
Release 1808 |
S5830系列以太网交换机 |
Release 1115,Release 1118 |
S5500-EI系列以太网交换机 |
Release 2220 |
如图2所示,PIM-SSM网络所服务的SSM组播组范围为232.1.1.0/24,PIM-SSM网络内连接用户网络N1和N2的边界三层交换机上均运行IGMPv3功能,而用户网络N1和N2内的主机上只能运行IGMPv1或IGMPv2,且不能升级至IGMPv3。
现要求通过在IGMP交换机上配置IGMP SSM Mapping功能,使PIM-SSM网络能够为用户网络N1、N2内的接收者提供SSM组播服务,实现用户网络N1中的接收者只接收来自Source 1的组播报文,用户网络N2中的接收者只接收来自Source 2的组播报文。
图2 IGMP SSM Mapping功能配置组网图
l IGMP SSM Mapping功能不会对IGMPv3的报告报文进行处理。
l 使用IGMP SSM Mapping规则创建的组播组信息,需使用display igmp ssm-mapping group命令进行察看,display igmp group命令所能察看的IGMP组播组信息不包含IGMP SSM Mapping规则创建的组播组信息。
(1) 配置IP地址和单播路由协议
请按照1.4.2 图2配置各接口的IP地址和子网掩码,具体配置过程略。
配置PIM-SSM网络内的各交换机之间采用OSPF协议进行互连,确保PIM-SSM网络内部在网络层互通,并且各交换机之间能够借助单播路由协议实现动态路由更新,具体配置过程略。
(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
Switch B和Switch C的配置与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 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 A相同,配置过程略。
(5) 使能IGMP SSM Mapping功能,并配置IGMP SSM Mapping规则
# 在Switch A的主机侧接口Vlan-interface100上使能IGMP SSM Mapping功能,并在Switch A上配置IGMP SSM Mapping规则,满足N1网络内组播报文接收者只接收来自组播源Source 1的组播数据的要求。
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp ssm-mapping enable
[SwitchA-Vlan-interface100] quit
[SwitchA] igmp
[SwitchA-igmp] ssm-mapping 232.1.1.0 24 10.110.5.100
[SwitchA-igmp] quit
# 在Switch B的主机侧接口Vlan-interface200上使能IGMP SSM Mapping功能,并在Switch B上配置IGMP SSM Mapping规则,满足N2网络内组播报文接收者只接收来自组播源Source 2的组播数据的要求。
[SwitchB] interface vlan-interface 200
[SwitchB-Vlan-interface200] igmp ssm-mapping enable
[SwitchB-Vlan-interface200] quit
[SwitchB] igmp
[SwitchB-igmp] ssm-mapping 232.1.1.0 24 10.110.5.101
[SwitchB-igmp] quit
配置完成后,Host A和Host C都发送组播组地址为232.1.1.1的IGMPv2加入报文,在Switch A和Switch B上通过相关命令查看配置效果。
(1) Switch A上的显示信息
# 查看Switch A上组播组232.1.1.1的IGMP SSM Mapping规则。
[SwitchA] display igmp ssm-mapping 232.1.1.1
VPN-Instance: public net
Group: 232.1.1.1
Source list:
10.110.5.100
# 查看Switch A上依据IGMP SSM Mapping规则创建的组播组信息。
[SwitchA] display igmp ssm-mapping group
Total 1 IGMP SSM-mapping Group(s).
Interface group report information of VPN-Instance: public net
Vlan-interface100(10.110.1.1):
Total 1 IGMP SSM-mapping Group reported
Group Address Last Reporter Uptime Expires
232.1.1.1 10.110.1.2 00:02:04 off
# 查看Switch A上的PIM路由表信息。
[SwitchA] display pim routing-table
VPN-Instance: public net
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: -
(2) Switch B上的显示信息
# 查看Switch B上组播组232.1.1.1的IGMP SSM Mapping规则。
[SwitchB] display igmp ssm-mapping 232.1.1.1
VPN-Instance: public net
Group: 232.1.1.1
Source list:
10.110.5.101
# 查看Switch B上依据IGMP SSM Mapping规则创建的组播组信息。
[SwitchB] display igmp ssm-mapping group
Total 1 IGMP SSM-mapping Group(s).
Interface group report information of VPN-Instance: public net
Vlan-interface200(10.110.2.1):
Total 1 IGMP SSM-mapping Group reported
Group Address Last Reporter Uptime Expires
232.1.1.1 10.110.2.2 00:01:15 off
# 查看Switch B上的PIM路由表信息。
[SwitchB] display pim routing-table
VPN-Instance: public net
Total 1 (S, G) entry
(10.110.5.101, 232.1.1.1)
Protocol: pim-ssm, Flag:
UpTime: 00:12:16
Upstream interface: Vlan-interface102
Upstream neighbor: 192.168.2.2
RPF prime neighbor: 192.168.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan-interface200
Protocol: igmp, UpTime: 00:05:21, Expires: -
通过显示信息可知,在Switch A和Switch B上配置了IGMP SSM Mapping功能后,Switch A将接收者主机发来的IGMPv2成员关系报告报文中所包含的(0.0.0.0,232.1.1.1)信息映射为(10.110.5.100,232.1.1.1)信息,Switch B将接收者主机发来的IGMPv2成员关系报告报文中所包含的(0.0.0.0,232.1.1.1)信息映射为(10.110.5.101,232.1.1.1)信息,从而使接收者Host A只接收来自Source 1的组播报文,使接收者Host C只接收来自Source 2的组播报文。
(1) Switch A配置信息
#
multicast routing-enable
#
acl number 2000
rule 0 permit source 232.1.1.0 0.0.0.255
#
vlan 100 to 101
#
interface Vlan-interface100
ip address 10.110.1.1 255.255.255.0
igmp enable
igmp version 3
igmp ssm-mapping enable
pim sm
#
interface Vlan-interface101
ip address 192.168.1.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
#
igmp
ssm-mapping 232.1.1.0 24 10.110.5.100
#
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
#
vlan 102
#
vlan 200
#
interface Vlan-interface102
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
igmp ssm-mapping enable
pim sm
#
ospf 1
area 0.0.0.0
network 10.110.2.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
igmp
ssm-mapping 232.1.1.0 24 10.110.5.101
#
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
#
vlan 101 to 102
#
vlan 300
#
interface Vlan-interface101
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface Vlan-interface102
ip address 192.168.2.2 255.255.255.0
pim sm
#
interface Vlan-interface300
ip address 10.110.5.1 255.255.255.0
pim sm
#
ospf 1
area 0.0.0.0
network 10.110.5.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
pim
ssm-policy 2000
#
表3 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5800&S5820X系列以太网交换机 |
Release 1808 |
S5830系列以太网交换机 |
Release 1115,Release 1118 |
S5500-EI系列以太网交换机 |
Release 2220 |
如图3所示,用户网络N1和N2通过三层交换机Switch A与PIM-DM域内的IGMP查询器Switch B相连。
现要求通过在三层交换机Switch A上配置IGMP Proxying功能,使其在不运行PIM-DM的情况下实现用户网络N1、N2内的接收者可以接收到通过PIM-DM域转发过来的组播数据报文。
图3 IGMP Proxying功能配置组网图
为实现本组网需求,需要在IGMP代理设备的上行接口上运行IGMP Proxying功能,上游设备将视IGMP代理设备为主机,而在其下行接口上运行IGMP协议,下游设备视IGMP代理设备为IGMP路由器。
· 在设备上开启IGMP代理功能时,须先使能IP组播路由。
· 一台设备上只允许有一个接口使能IGMP代理功能。
· 由于IGMPv1的查询器要由PIM协议选举出的DR来充当,因此若IGMP代理设备的下行接口运行的是IGMPv1,那么该接口将无法成为DR,从而也就无法充当IGMP查询器。
(1) 配置IP地址
请按照1.5.2 图3配置各接口的IP地址和子网掩码,并确保各设备间单播互通,具体配置过程略。
(2) 配置Switch A
# 在Switch A上使能IP组播路由,并在朝向Switch B侧的接口Vlan-interface100上使能IGMP Proxying。
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp proxying enable
[SwitchA-Vlan-interface100] quit
# 在Switch A上朝向用户侧的接口Vlan-interface101和Vlan-interface102上使能IGMP。
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] igmp enable
[SwitchA-Vlan-interface101] quit
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] igmp enable
[SwitchA-Vlan-interface102] quit
(3) 配置Switch B
# 在Switch B上使能IP组播路由,并在各接口上使能PIM-DM。
<SwitchB> system-view
[SwitchB] multicast routing-enable
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] pim dm
[SwitchB-Vlan-interface100] quit
[SwitchB] interface vlan-interface 200
[SwitchB-Vlan-interface200] pim dm
[SwitchB-Vlan-interface200] quit
#在Switch B上朝向用户侧的接口Vlan-interface100上使能IGMP。
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] igmp enable
[SwitchB-Vlan-interface100] quit
配置完成后,用户网络N1内的组播接收者Host A发送组播组地址为224.1.1.1的IGMP成员关系报告报文,通过display igmp group命令查看Switch A和Switch B上IGMP组播组信息,检验配置效果:
# 查看Switch A的Vlan-interface101接口上IGMP组播组信息。
[SwitchA] display igmp group interface vlan-interface 101
Vlan-interface101(192.168.1.1):
Total 1 IGMP Group reported
Group Address Last Reporter Uptime Expires
224.1.1.1 192.168.1.10 00:10:14 00:01:10
通过显示信息可知,Switch A的Vlan-interface101接口接收到主机的IGMP成员关系报告报文后,建立并维护该组播组成员关系,对于下面的主机而言,Switch A的下行接口执行IGMP协议的路由器行为。
# 查看Switch B的Vlan-interface100接口上IGMP组播组信息。
[SwitchB] display igmp group interface Vlan-interface 100
Vlan-interface100(10.110.1.2):
Total 1 IGMP Group reported
Group Address Last Reporter Uptime Expires
224.1.1.1 10.110.1.1 00:11:14 00:01:58
通过显示信息可知,Switch B的Vlan-interface100接口接收到IGMP Proxying设备的IGMP成员关系报告报文后,建立并维护该组播组成员关系。由此可见,对于上游查询器Switch B而言,Switch A的上行接口执行IGMP协议的主机行为。
(1) Switch A配置信息
#
multicast routing-enable
#
vlan 100 to 102
#
interface Vlan-interface100
igmp enable
#
interface Vlan-interface101
igmp enable
#
interface Vlan-interface102
igmp proxying enable
#
(2) Switch B配置信息
#
multicast routing-enable
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
igmp enable
pim dm
#
interface Vlan-interface200
pim dm
#
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!