IPv6 group policy and simulated joining configuration example
Network requirements
As shown in Figure 23, Router A connects to the IPv6 multicast source through GigabitEthernet 1/0/2 and to Switch A through GigabitEthernet 1/0/1. Router A is the MLD querier on the subnet.
MLDv1 runs on Router A, MLDv1 snooping runs on Switch A, and Router A acts as the MLD querier on the subnet.
The receivers, Host A and Host B, attached to Switch A can receive IPv6 multicast traffic addressed to IPv6 multicast group FF1E::101 only.
IPv6 multicast data for group FF1E::101 can be forwarded through GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 of Switch A even if Host A and Host B accidentally, temporarily stop receiving IPv6 multicast data.
Figure 23: Network diagram for IPv6 group policy simulated joining configuration
Configuration procedure
Enable IPv6 forwarding and configure IPv6 addresses
Enable IPv6 forwarding and configure an IPv6 address and prefix length for each interface according to Figure 23. The detailed configuration steps are omitted.
Configure Router A
# Enable IPv6 multicast routing, enable IPv6 PIM-DM on each interface, and enable MLDv1 on GigabitEthernet 1/0/1.
<RouterA> system-view [RouterA] multicast ipv6 routing-enable [RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] mld enable [RouterA-GigabitEthernet1/0/1] pim ipv6 dm [RouterA-GigabitEthernet1/0/1] quit [RouterA] interface gigabitethernet 1/0/2 [RouterA-GigabitEthernet1/0/2] pim ipv6 dm [RouterA-GigabitEthernet1/0/2] quit
Configure Switch A
# Enable MLD snooping globally.
<SwitchA> system-view [SwitchA] mld-snooping [SwitchA-mld-snooping] quit
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4 to this VLAN, and enable MLD snooping and the function of dropping IPv6 unknown multicast traffic in the VLAN.
[SwitchA] vlan 100 [SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/4 [SwitchA-vlan100] mld-snooping enable [SwitchA-vlan100] mld-snooping drop-unknown [SwitchA-vlan100] quit
# Configure an IPv6 multicast group filter so that the hosts in VLAN 100 can join only the IPv6 multicast group FF1E::101.
[SwitchA] acl ipv6 number 2001 [SwitchA-acl6-basic-2001] rule permit source ff1e::101 128 [SwitchA-acl6-basic-2001] quit [SwitchA] mld-snooping [SwitchA–mld-snooping] group-policy 2001 vlan 100 [SwitchA–mld-snooping] quit
# Configure GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 as simulated hosts for IPv6 multicast group FF1E::101.
[SwitchA] interface gigabitethernet 1/0/3 [SwitchA-GigabitEthernet1/0/3] mld-snooping host-join ff1e::101 vlan 100 [SwitchA-GigabitEthernet1/0/3] quit [SwitchA] interface gigabitethernet 1/0/4 [SwitchA-GigabitEthernet1/0/4] mld-snooping host-join ff1e::101 vlan 100 [SwitchA-GigabitEthernet1/0/4] quit
Verify the configuration
# Display the detailed MLD snooping group information in VLAN 100 on Switch A.
[SwitchA] display mld-snooping group vlan 100 verbose Total 1 IP Group(s). Total 1 IP Source(s). Total 1 MAC Group(s). Port flags: D-Dynamic port, S-Static port, C-Copy port Subvlan flags: R-Real VLAN, C-Copy VLAN Vlan(id):100. Total 1 IP Group(s). Total 1 IP Source(s). Total 1 MAC Group(s). Router port(s):total 1 port(s). GE1/0/1 (D) ( 00:01:30 ) IP group(s):the following ip group(s) match to one mac group. IP group address:FF1E::101 (::, FF1E::101): Attribute: Host Port Host port(s):total 2 port(s). GE1/0/3 (D) ( 00:03:23 ) GE1/0/4 (D) ( 00:04:10 ) MAC group(s): MAC group address:3333-0000-0101 Host port(s):total 2 port(s). GE1/0/3 GE1/0/4
The output shows that GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 of Switch A have joined IPv6 multicast group FF1E::101.