igmp-snooping drop-unknown
#
vlan 10
#
vlan 20
#
multicast-vlan 5
subvlan 10 20
#
interface Ethernet1/1
port access vlan 5
#
interface Ethernet1/2
port access vlan 10
#
interface Ethernet1/3
port access vlan 10
#
interface Ethernet1/4
port access vlan 20
#
return
1. 配置步骤
# 全局使能IGMP Snooping。
<SwitchB> system-view
[SwitchB] igmp-snooping
[SwitchB-igmp-snooping] quit
# 创建VLAN 20,把端口Ethernet1/1到Ethernet1/3添加到该VLAN中;在该VLAN内使能IGMP Snooping,并使能丢弃未知组播数据报文功能。
[SwitchB] vlan 20
[SwitchB-vlan20] port ethernet 1/1 to ethernet 1/3
[SwitchB-vlan20] igmp-snooping enable
[SwitchB-vlan20] igmp-snooping drop-unknown
[SwitchB-vlan20] return
2. 配置文件
<SwitchB> display current-configuration
#
sysname SwitchB
#
igmp-snooping
#
vlan 20
igmp-snooping enable
igmp-snooping drop-unknown
#
interface Ethernet1/1
port access vlan 20
#
interface Ethernet1/2
port access vlan 20
#
interface Ethernet1/3
port access vlan 20
#
return
1. 配置步骤
# 全局使能IGMP Snooping。
<SwitchC> system-view
[SwitchC] igmp-snooping
[SwitchC-igmp-snooping] quit
# 创建VLAN 30,把端口Ethernet1/1到Ethernet1/3添加到该VLAN中;在该VLAN内使能IGMP Snooping,并使能丢弃未知组播数据报文功能。
[SwitchC] vlan 30
[SwitchC-vlan30] port ethernet 1/1 to ethernet 1/3
[SwitchC-vlan30] igmp-snooping enable
[SwitchC-vlan30] igmp-snooping drop-unknown
[SwitchC-vlan30] return
2. 配置文件
<SwitchC> display current-configuration
#
sysname SwitchC
#
igmp-snooping
#
vlan 30
igmp-snooping enable
igmp-snooping drop-unknown
#
interface Ethernet1/1
port access vlan 30
#
interface Ethernet1/2
port access vlan 30
#
interface Ethernet1/3
port access vlan 30
#
return
当如上配置完成后,Host A和Host C能够收到视频节目1,Host E能够收到视频节目2。此外,通过相应的display命令还可查看设备上的各种配置及运行效果:
(1) 通过使用display multicast-vlan命令可以查看交换机上组播VLAN的信息。例如:
# 查看Switch A上所有组播VLAN的信息。
<SwitchA> display multicast-vlan
Total 1 multicast-vlan(s)
Multicast vlan 5
subvlan list:
vlan 10 20
port list:
no port
由上可知,VLAN 5为组播VLAN,VLAN 10和VLAN 20为其子VLAN。
(2) 通过使用display igmp-snooping group命令可以查看各交换机上IGMP Snooping组播组的信息。例如:
# 查看Switch A上IGMP Snooping组播组的信息。
<SwitchA> display igmp-snooping group
Total 3 IP Group(s).
Total 3 IP Source(s).
Total 3 MAC Group(s).
|