The multicast longest-match command selects the Reverse Path Forwarding (RPF) route based on the longest matching rule.
The undo multicast longest-match command restores the default configuration.
By default, the route with the highest preference is selected.
When multiple optimal unicast routes exist, the RPF route is selected according to the following rules:
By default, the route with the highest priority is selected.
If the multicast longest-match command is used, the route with the longest mask is selected as the RPF route.
If the multicast load-splitting command is used, multicast load splitting is performed among multiple optimal unicast routes.
You must run the multicast routing-enable command to enable the multicast function before using the command.
# Select routes according to the longest match in the public network instance.
<sysname> system-view
[sysname] multicast routing-enable
[sysname] multicast longest-match
<sysname> system-view
[sysname] multicast routing-enable
[sysname] ip vpn-instance mytest
[sysname-vpn-instance-mytest] ipv4-family
[sysname-vpn-instance-mytest-af-ipv4] multicast longest-match