5.1.1
IGMP-Snooping典型配置举例
注意事项
在配置过程中,请注意以下几点:
l 在VLAN内使能IGMP Snooping之前,必须先在系统视图下全局使能IGMP Snooping,
否则将无法在VLAN内使能IGMP Snooping;
l 在VLAN内使能IGMP Snooping之后,不允许在该VLAN所对应的VLAN接口上再使能IGMP和PIM,
反之亦然。
l IGMP Snooping启用后,未知组播报文仍然会在VLAN内广播,如果需要禁止未知组播报文
在VLAN内广播,可以在VLAN视图下配置不广播模式。配置举例
SR8800-A作为二层设备,使能IGMP Snooping,监听来自用户的IGMP报文,维护组播组与端口之间的对应关系。SR8800-B是组播路由器。Multicast Source是组播源,Host & Terminal是组播数据接收者。如果位于图中上方的用户是组224.1.1.1的成员,下方的用户是224.2.2.2的成员,那么224.1.1.1的组播数据只会在端口GE6/1/2上转发,不会出现在端口GE6/1/3。如组网图所示:
l
SR8800-B上配置PIM
DM和IGMP
l SR8800-A上配置VLAN及其端口,并在其下使能IGMP-Snooping
1、配置步骤
#全局启动组播路由
[sysname]
multicast routing-enable
#配置连接组播源的接口地址,并且启用PIM-DM协议
[sysname]
interface gigabitethernet3/1/6
[sysname-GigabitEthernet3/1/6]
ip address 102.0.0.1 24
[sysname-GigabitEthernet3/1/6]
pim dm
#配置连接SR8800-B的接口地址,并且启用PIM-DM和IGMP协议
[sysname]
interface gigabitethernet3/1/5
[sysname-GigabitEthernet3/1/5]
ip address 100.0.0.1 24
[sysname-GigabitEthernet3/1/5]
pim dm
[sysname-GigabitEthernet3/1/5]
igmp enable
2、配置文件
#
multicast
routing-enable
#
interface
GigabitEthernet3/1/5
port link-mode
route
ip address 100.0.0.1
255.255.255.0
igmp
enable
pim dm
#
interface
GigabitEthernet3/1/6
port link-mode
route
ip address 102.0.0.1
255.255.255.0
pim dm
#
1、配置步骤
#全局使能igmp-snooping
[sysname]
igmp-snooping
[sysname]
quit
#创建vlan,配置端口,并使能igmp-snooping
[sysname]
vlan 100
[sysname-vlan100]
port gigabitethernet6/1/1 to gigabitethernet6/1/3
[sysname-vlan100]
igmp-snooping enable
2、配置文件
#
igmp-snooping
#
vlan
100
igmp-snooping
enable
#
interface
GigabitEthernet6/1/1
port link-mode
bridge
port access vlan
100
#
interface
GigabitEthernet6/1/2
port link-mode
bridge
port access vlan
100
#
interface
GigabitEthernet6/1/3
port link-mode
bridge
port access vlan
100
#
可通过以下方式验证上述配置:
组播源发送目的地址为224.1.1.1的组播流,上方成员加入组224.1.1.1,下方成员加入组224.2.2.2,上方成员可以收到组播流,而下方成员不能,在SR8800-A上查看igmp-snooping表项,结果如下:
[sysname]
display igmp-snooping group
Total 2 IP
Group(s).
Total 2 IP
Source(s).
Total 2 MAC
Group(s).
Port flags: D-Dynamic port, S-Static
port, A-Aggregation port, C-Copy port
Subvlan flags: R-Real VLAN, C-Copy
VLAN
Vlan(id):100.
Total 2 IP
Group(s).
Total 2 IP
Source(s).
Total 2 MAC
Group(s).
Router port(s):total 1
port.
GE6/1/1
(D)
IP group(s):the following ip
group(s) match to one mac group.
IP group
address:224.1.1.1
(0.0.0.0, 224.1.1.1):
Attribute: Host
Port
Host port(s):total 1 port.
GE6/1/2
(D)
MAC
group(s):
MAC group
address:0100-5e01-0101
Host port(s):total 1 port.
GE6/1/2
IP group(s):the following ip
group(s) match to one mac group.
IP group
address:224.2.2.2
(0.0.0.0, 224.2.2.2):
Attribute: Host
Port
Host port(s):total 1 port.
GE6/1/3
(D)
MAC
group(s):
MAC group
address:0100-5e02-0202
Host port(s):total 1 port.
GE6/1/3