If no multicast data is sent to a multicast group, matching (S, G) or (*, G) entries need to be deleted. Therefore, the device needs to periodically detect presence of multicast flows sent to the multicast group to determine whether to delete the matching entry. You can use the multicast layer-2 source-lifetime lifetime command to set the aging time of multicast traffic triggered entries in a VLAN. If the device does not receive multicast data sent to a group within the aging time, the device deletes the corresponding (S, G) or (*, G) entry. The aging time enables the device to update multicast entries and release entry resources in a timely manner.
By default, the aging time of a multicast traffic triggered entry in a VLAN is 210 seconds. You can set a proper aging time for (S, G) or (*, G) entries according to the number of multicast entries used on your network. If a large number of multicast entries are used on your network, a too short aging time will make the multicast forwarding table incomplete. However, if the aging time is too long, invalid entries will be retained for a long time, wasting system resources.
The following example sets the aging time of multicast traffic triggered entries to 1000 seconds in VLAN 100.
<HUAWEI> system-view
[~HUAWEI] igmp snooping enable
[*HUAWEI] vlan 100
[*HUAWEI-vlan100] igmp snooping enable
[*HUAWEI-vlan100] multicast layer-2 source-lifetime 1000
[*HUAWEI-vlan100] commit