In Figure 1, the router connects to the user network through the Layer 2 switch on an IPv6 network. HostA, HostB, and HostC are the receivers. The user-side VLANIF interface of Router has static groups FF16::1 to FF16::5 configured and does not run MLD. HostA and HostB require to steadily receive data from FF16::1 to FF16::3 while HostC wants to steadily receive data from FF16::4 to FF16::5.
To meet the requirement, MLD snooping static router and member ports need to be configured on the Switch.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan 10 [Switch-vlan10] quit [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type hybrid [Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 10 [Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 10 [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] port link-type hybrid [Switch-GigabitEthernet0/0/2] port hybrid pvid vlan 10 [Switch-GigabitEthernet0/0/2] port hybrid untagged vlan 10 [Switch-GigabitEthernet0/0/2] quit [Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] port link-type hybrid [Switch-GigabitEthernet0/0/3] port hybrid pvid vlan 10 [Switch-GigabitEthernet0/0/3] port hybrid untagged vlan 10 [Switch-GigabitEthernet0/0/3] quit
# Enable MLD snooping globally.
[Switch] mld-snooping enable
# Enable MLD snooping in VLAN 10.
[Switch] vlan 10 [Switch-vlan10] mld-snooping enable [Switch-vlan10] quit
[Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] mld-snooping static-router-port vlan 10 [Switch-GigabitEthernet0/0/3] quit
[Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] mld-snooping static-group ff16::1 vlan 10 [Switch-GigabitEthernet0/0/1] mld-snooping static-group ff16::2 vlan 10 [Switch-GigabitEthernet0/0/1] mld-snooping static-group ff16::3 vlan 10 [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] mld-snooping static-group ff16::4 vlan 10 [Switch-GigabitEthernet0/0/2] mld-snooping static-group ff16::5 vlan 10 [Switch-GigabitEthernet0/0/2] quit
# Check the router port on the Switch.
[Switch] display mld-snooping router-port Total Number of Router Port on VLAN 10 is 1 Port Name UpTime Expires Flags GE0/0/3 00:00:06 -- STATIC
The command output shows that GE0/0/3 has become a static router port.
# Check the member port on the Switch.
[Switch] display mld-snooping port-info vlan 10 -------------------------------------------------------------------------------- (Source, Group) Port Flag Flag: S:Static D:Dynamic -------------------------------------------------------------------------------- VLAN 10, 5 Entry(s) (*, ff16:0:0:0:0:0:0:1) GE0/0/1 S-- 1 port(s) (*, ff16:0:0:0:0:0:0:2) GE0/0/1 S-- 1 port(s) (*, ff16:0:0:0:0:0:0:3) GE0/0/1 S-- 1 port(s) (*, ff16:0:0:0:0:0:0:4) GE0/0/2 S-- 1 port(s) (*, ff16:0:0:0:0:0:0:5) GE0/0/2 S-- 1 port(s) --------------------------------------------------------------------------------
The command output shows that GE0/0/1 on the Switch joins multicast groups FF16::1 to FF16::3 and GE0/0/2 on the Switch has joined multicast groups FF16::4 to FF16::5.
# Check the Layer 2 forwarding table on the Switch.
[Switch] display mld-snooping forwarding-table vlan 10 VLAN ID : 10, Forwarding Mode : IP -------------------------------------------------------------------------------- (Source, Group) Interface Out-Vlan -------------------------------------------------------------------------------- Router-port GigabitEthernet0/0/3 10 (*, ff16:0:0:0:0:0:0:1) GigabitEthernet0/0/1 10 GigabitEthernet0/0/3 10 (*, ff16:0:0:0:0:0:0:2) GigabitEthernet0/0/1 10 GigabitEthernet0/0/3 10 (*, ff16:0:0:0:0:0:0:3) GigabitEthernet0/0/1 10 GigabitEthernet0/0/3 10 (*, ff16:0:0:0:0:0:0:4) GigabitEthernet0/0/2 10 GigabitEthernet0/0/3 10 (*, ff16:0:0:0:0:0:0:5) GigabitEthernet0/0/2 10 GigabitEthernet0/0/3 10 -------------------------------------------------------------------------------- Total Group(s) : 5
The command output shows that multicast groups FF16::1 to FF16::5 have generated the forwarding table on the Switch.
Switch configuration file
# sysname Switch # vlan batch 10 # mld-snooping enable # vlan 10 mld-snooping enable # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 mld-snooping static-group ff16:0:0:0:0:0:0:1 vlan 10 mld-snooping static-group ff16:0:0:0:0:0:0:2 vlan 10 mld-snooping static-group ff16:0:0:0:0:0:0:3 vlan 10 # interface GigabitEthernet0/0/2 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 mld-snooping static-group ff16:0:0:0:0:0:0:4 vlan 10 mld-snooping static-group ff16:0:0:0:0:0:0:5 vlan 10 # interface GigabitEthernet0/0/3 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 mld-snooping static-router-port vlan 10 # return