组播VLAN配置案例需求分析
1.组播源为Workstation,Switch A转发组播源发出的组播数据流。配置组播VLAN,使VLAN 2和VLAN 3内的用户通过组播VLAN接收组播流。SwitchA上VLAN 20接口的IP地址为168.10.1.1,Ethernet 1/0/1属于VLAN 20,Ethernet 1/0/1和Work Station相连。VLAN 10为组播VLAN。端口Ethernet 1/0/10与Switch B相连。SwitchB上VLAN 2包含端口Ethernet 1/0/1,VLAN 3包括端口Ethernet 1/0/2,两个端口分别与PC1、PC2相连,端口Ethernet 1/0/10和Switch A相连;
2.此案例同时适用于以下产品:
Quidway 2000-EI、3000和H3C 3100-SI 、3500、5100-EI、3600、5600系列交换机。
组网图如下:
组播VLAN配置步骤
Switch A配置:
1.进入系统视图,使能组播路由功能
- <SwitchA> system-view
- [SwitchA] multicast routing-enable
2.创建vlan 20,并配置vlan接口地址,在该vlan接口下使能pim dm。
- [SwitchA] vlan 20
- [SwitchA-vlan20] interface Vlan-interface 20
- [SwitchA-Vlan-interface20] ip address 168.10.1.1 255.255.255.0
- [SwitchA-Vlan-interface20] pim dm
- [SwitchA-Vlan-interface20] quit
3.创建组播vlan 10
- [SwitchA] vlan 10
- [SwitchA-vlan10] quit
4.将Ethernet 1/0/10定义为Hybrid端口,并将该端口加入到VLAN 10中,端口发送VLAN 10的报文时带VLAN标签。
- [SwitchA] interface Ethernet 1/0/10
- [SwitchA-Ethernet 1/0/10] port link-type hybrid
- [SwitchA-Ethernet 1/0/10] port hybrid vlan 10 tagged
- [SwitchA-Ethernet 1/0/10] quit
5.在VLAN 10接口启动PIM DM协议,并同时启用IGMP。
- [SwitchA] interface Vlan-interface 10
- [SwitchA-Vlan-interface10] pim dm
- [SwitchA-Vlan-interface10] igmp enable
SwitchB配置:
1.在系统视图下使能IGMP Snooping功能
- <SwitchB> system-view
- [SwitchB] igmp-snooping enable
2.配置VLAN 10为组播VLAN,并在VLAN视图下使能IGMP Snooping
- [SwitchB] vlan 10
- [SwitchB-vlan10] service-type multicast
- [SwitchB-vlan10] igmp-snooping enable
- [SwitchB-vlan10] quit
3.将Ethernet 1/0/10定义为Hybrid端口,并将该端口加入到VLAN 2、3、10中,端口发送VLAN 2、VLAN 3和VLAN 10的报文时带VLAN标签
- [SwitchB] interface Ethernet 1/0/10
- [SwitchB-Ethernet 1/0/10] port link-type hybrid
- [SwitchB-Ethernet 1/0/10] port hybrid vlan 2 3 10 tagged
- [SwitchB-Ethernet 1/0/10] quit
4.将Ethernet 1/0/1定义为Hybrid端口,并将该端口加入到VLAN 2、VLAN 10中,端口发送VLAN 2和VLAN 10的报文时不带VLAN标签,端口的缺省VLAN为VLAN 2
- [SwitchB] interface Ethernet 1/0/1
- [SwitchB-Ethernet 1/0/1] port link-type hybrid
- [SwitchB-Ethernet 1/0/1] port hybrid vlan 2 10 untagged
- [SwitchB-Ethernet 1/0/1] port hybrid pvid vlan 2
- [SwitchB-Ethernet 1/0/1] quit
5.Ethernet 1/0/2定义为Hybrid端口,并将该端口加入到VLAN 3、VLAN 10中,端口发送VLAN 3和VLAN 10的报文时不带VLAN标签,端口的缺省VLAN为VLAN 3
- [SwitchB] interface Ethernet 1/0/2
- [SwitchB-Ethernet 1/0/2] port link-type hybrid
- [SwitchB-Ethernet 1/0/2] port hybrid vlan 3 10 untagged
- [SwitchB-Ethernet 1/0/2] port hybrid pvid vlan 3
- [SwitchB-Ethernet 1/0/2] quit
组播VLAN的配置到此就结束了,相信只要大家多多实践,对于一些基本的或者复杂的配置,大家都会掌握的。
【编辑推荐】