Configuring MLD
Overview
Function Introduction
To participate in IPv6 multicasting, multicast hosts, routers, and multilayer switches must have the MLD operating. This protocol defines the query and host roles:
A query is a network device that sends query messages to discover which network devices are members of a given multicast group.
A host is a receiver that sends report messages (in response to query messages) to inform a querier of a host membership.
A set of queries and hosts that receive IPv6 multicast data streams from the same source is called an IPv6 multicast group. Queries and hosts use MLD messages to join and leave IPv6 multicast groups. Any host, regardless of whether it is a member of a group, can send to a group. However, only the members of a group receive the message. Membership in a multicast group is dynamic; hosts can join and leave at any time. There is no restriction on the location or number of members in a multicast group.
A host can be a member of more than one multicast group at a time. How active a multicast group is and what members it has can vary from group to group and from time to time. A multicast group can be active for a long time, or it can be very short-lived. Membership in a group can constantly change. A group that has members can have no activity.
MLD packets are sent using these IPv6 multicast group addresses:
MLD general queries are destined to the address ff02::1 (all systems on a subnet).
MLD group-specific queries are destined to the group IPv6 address for which the switch is querying.
MLD group membership reports are destined to the group IPv6 address for which the switch is reporting.
MLD Version 1 (MLDv1) leave messages are destined to the address ff02::2 (all-multicast-routers on a subnet). In some old host IPv6 stacks, leave messages might be destined to the group IPv6 address rather than to the all-routers address.
Principle Description
The MLD module is based on the following RFC
RFC 2710
RFC 3810
Configuration
There is no explicit command to enable MLD, which is always combined with PIMv6-SM. When PIMv6-SM is enabled on an interface, MLD will be enabled automatically on this interface, vice versa. But notice, before MLD can work, IPv6 Multicast-routing must be enabled globally firstly. We support build MLD group record by learning MLD packets or configuring static MLD group by administer.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable ipv6 and ipv6 multicast-routing globally
Switch(config)# ipv6 enable
Switch(config)# ipv6 multicast-routing
step 3 Enter the interface configure mode, set the ipv6 address and enable pim sparse mode
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ipv6 address 2001:1::1/64
Switch(config-if)# ipv6 pim sparse-mode
step 4 Configuring MLD Interface Parameters
Switch(config-if)# ipv6 mld version 2
Switch(config-if)# ipv6 mld query-interval 120
Switch(config-if)# ipv6 mld query-max-response-time 12
Switch(config-if)# ipv6 mld robustness-variable 3
Switch(config-if)# ipv6 mld last-member-query-count 3
Switch(config-if)# ipv6 mld last-member-query-interval 2000
step 5 Limit Max MLD Group Number
Set the maxinum of ipv6 mld on the interface:
Switch(config-if)# ipv6 mld limit 1000
Switch(config-if)# exit
Set the maxinum of ipv6 mld globally:
Switch(config)# ipv6 mld limit 2000
step 6 Create static mld group
Switch(config)# interface eth-0-1
Switch(config-if)# ipv6 mld static-group ff0e::1234
Switch(config-if)# exit
step 7 Set IPv6 MLD proxy (optional)
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ipv6 pim sparse-mode
Switch(config-if)# ipv6 mld proxy-service
Switch(config-if)# exit
Switch(config)# interface eth-0-2
Switch(config-if)# no switchport
Switch(config-if)# ipv6 pim sparse-mode
Switch(config-if)# ipv6 mld mroute-proxy eth-0-1
Switch(config-if)# exit
step 8 Exit the configure mode
Switch(config)# end
step 9 Validation
Displaying MLD Interface:
Switch# show ipv6 mld interface
Interface eth-0-2 (Index 2)
MLD Inactive, Version 1 (default)
MLD mroute-proxy interface is eth-0-1
MLD global limit is 2000
MLD global limit states count is currently 0
MLD interface limit is 4096
MLD interface has 0 group-record states
MLD activity: 0 joins, 0 leaves
MLD query interval is 125 seconds
MLD querier timeout is 255 seconds
MLD max query response time is 10 seconds
Last member query response interval is 1000 milliseconds
Group Membership interval is 260 seconds
Last memeber query count is 2
Robustness Variable is 2
Interface eth-0-1 (Index 1)
MLD Inactive, Configured for Version 2 proxy-service
MLD host version 2
MLD global limit is 2000
MLD global limit states count is currently 0
MLD interface limit is 1000
MLD interface has 0 group-record states
MLD activity: 0 joins, 0 leaves
MLD query interval is 120 seconds
MLD querier timeout is 366 seconds
MLD max query response time is 12 seconds
Last member query response interval is 2000 milliseconds
Group Membership interval is 372 seconds
Last memeber query count is 3
Robustness Variable is 3
Displaying MLD group:
Switch# show ipv6 mld groups
MLD Connected Group Membership
Group Address Interface Expires
ff0e::1234 eth-0-1 stopped
Application cases {application-cases-94}
N/A