During route selection, an optimal intra-domain unicast route, an optimal inter-domain unicast route, and an optimal multicast static route are selected. One of them is finally selected as the forwarding path for the multicast data.
If the longest match principle is configured for route selection, a route with the longest matched mask is chosen by the multicast router.
For example, there is a multicast source with the IP address of 10.1.1.1, and multicast data needs to be sent to a host with the IP address of 192.168.1.1. There are two reachable routes to the source in the static routing table and intra-domain unicast routing table, and the destination network segments are 10.1.0.0/16 and 10.1.1.0/24. Based on the longest match principle for route selection, the route to the network segment of 10.1.1.0/24 is chosen as the forwarding path for the multicast data.