Example for Configuring Layer 2 Multicast Through Static Interfaces
Networking Requirements
As shown in Figure 9-7, RouterA connects to user hosts through a Layer 2 device RouterB. The user-side VLANIF interface of RouterA has static groups 225.1.1.1 to 225.1.1.5 configured and does not run IGMP. There are four receivers on the network: HostA, HostB, HostC, and HostD. HostA and HostB expect to receive data of multicast groups 225.1.1.1 to 225.1.1.3 for long time. HostC and HostD expect to receive data of multicast groups 225.1.1.4 to 225.1.1.5.
Configuration Roadmap
To meet the preceding requirements, configure a static router port and static member ports of IGMP snooping on the Layer 2 RouterB. The configuration roadmap is as follows:
- On RouterB, create a VLAN and add interfaces to the VLAN.
- Enable IGMP snooping globally and in the VLAN.
- Configure a static router port.
- Configure static member ports.
Procedure
- Create a VLAN and add interfaces to the VLAN.
<Huawei> system-view [Huawei] sysname RouterB [RouterB] vlan 10 [RouterB-vlan10] quit [RouterB] interface ethernet 2/0/1 [RouterB-Ethernet2/0/1] port hybrid pvid vlan 10 [RouterB-Ethernet2/0/1] port hybrid untagged vlan 10 [RouterB-Ethernet2/0/1] quit [RouterB] interface ethernet 2/0/2 [RouterB-Ethernet2/0/2] port hybrid pvid vlan 10 [RouterB-Ethernet2/0/2] port hybrid untagged vlan 10 [RouterB-Ethernet2/0/2] quit [RouterB] interface ethernet 2/0/3 [RouterB-Ethernet2/0/3] port hybrid pvid vlan 10 [RouterB-Ethernet2/0/3] port hybrid untagged vlan 10 [RouterB-Ethernet2/0/3] quit
- Enable IGMP snooping.
# Enable IGMP snooping globally.
[RouterB] igmp-snooping enable
# Enable IGMP snooping in VLAN 10.
[RouterB] vlan 10 [RouterB-vlan10] igmp-snooping enable [RouterB-vlan10] quit
- Configure a static router port.
[RouterB] interface ethernet 2/0/3 [RouterB-Ethernet2/0/3] igmp-snooping static-router-port vlan 10 [RouterB-Ethernet2/0/3] quit
- Configure static member ports.
[RouterB] interface ethernet 2/0/1 [RouterB-Ethernet2/0/1] l2-multicast static-group group-address 225.1.1.1 to 225.1.1.3 vlan 10 [RouterB-Ethernet2/0/1] quit [RouterB] interface ethernet 2/0/2 [RouterB-Ethernet2/0/2] l2-multicast static-group group-address 225.1.1.4 to 225.1.1.5 vlan 10 [RouterB-Ethernet2/0/2] quit
- Verify the configuration.
# Check the router port information on RouterB.
<RouterB> display igmp-snooping router-port vlan 10 Port Name UpTime Expires Flags --------------------------------------------------------------------- VLAN 10, 1 router-port(s) Ethernet2/0/3 00:20:09 -- STATIC
The command output shows that Eth2/0/3 has been configured as static router port.
# Check the member port information on RouterB.
<RouterB> display igmp-snooping port-info vlan 10 ----------------------------------------------------------------------- (Source, Group) Port Flag ----------------------------------------------------------------------- VLAN 10, 5 Entry(s) (*, 225.1.1.1) Ethernet2/0/1 S-- 1 port(s) (*, 225.1.1.2) Ethernet2/0/1 S-- 1 port(s) (*, 225.1.1.3) Ethernet2/0/1 S-- 1 port(s) (*, 225.1.1.4) Ethernet2/0/2 S-- 1 port(s) (*, 225.1.1.5) Ethernet2/0/2 S-- 1 port(s) -----------------------------------------------------------------------
The command output shows that multicast groups 225.1.1.1 to 225.1.1.3 have a static member port Eth2/0/1 on RouterB and multicast groups 225.1.1.4 to 225.1.1.5 have a static member port Eth2/0/2 on RouterB.
# Check the Layer 2 multicast forwarding table on RouterB.
<RouterB> display l2-multicast forwarding-table vlan 10 VLAN ID : 10, Forwarding Mode : IP --------------------------------------------------------------------------- (Source, Group) Interface Out-Vlan --------------------------------------------------------------------------- Router-port Ethernet2/0/3 10 (*, 225.1.1.1) Ethernet2/0/1 10 Ethernet2/0/3 10 (*, 225.1.1.2) Ethernet2/0/1 10 Ethernet2/0/3 10 (*, 225.1.1.3) Ethernet2/0/1 10 Ethernet2/0/3 10 (*, 225.1.1.4) Ethernet2/0/2 10 Ethernet2/0/3 10 (*, 225.1.1.5) Ethernet2/0/2 10 Ethernet2/0/3 10 Total Group(s) : 5 --------------------------------------------------------------------------
The command output shows that multicast groups 225.1.1.1 to 225.1.1.5 have a forwarding table on RouterB.
Configuration Files
RouterB configuration file
# sysname RouterB # vlan batch 10 # igmp-snooping enable # vlan 10 igmp-snooping enable # interface Ethernet2/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 l2-multicast static-group group-address 225.1.1.1 to 225.1.1.3 vlan 10 # interface Ethernet2/0/2 port hybrid pvid vlan 10 port hybrid untagged vlan 10 l2-multicast static-group group-address 225.1.1.4 to 225.1.1.5 vlan 10 # interface Ethernet2/0/3 port hybrid pvid vlan 10 port hybrid untagged vlan 10 igmp-snooping static-router-port vlan 10 # return