In a large-scale network, multiple IGP areas usually need to be configured for flexible network deployment and fast route convergence. When advertising routes between IGP areas, to prevent a large number of routes from consuming too many resources, an area border router (ABR) needs to aggregate the routes in the area and then advertise the aggregated route to the neighbor IGP areas. The LDP extension for inter-area LSP function supports the longest match rule for looking up routes so that LDP can use aggregated routes to establish inter-area LDP LSPs.
As shown in Figure 1, there are two IGP areas: Area 10 and Area 20.
Therefore, in the situation shown in Figure 1, configure LDP to search for routes based on the longest match rule for establishing LSPs. There is already an aggregated route to 192.168.3.0/24 in the routing table of LSRA. When LSRA receives a Label Mapping message (such as the carried FEC is 192.168.3.1/32) from Area 10, LSRA searches for a route according to the longest match rule defined in relevant standards. Then, LSRA finds information about the aggregated route to 192.168.3.0/24, and uses the outbound interface and next hop of this route as those of the route to 192.168.3.1/32. LDP can establish inter-area LDP LSPs.
In a remote DoD LDP session, LDP uses the longest match rule to establish an LSP destined for the peer's LSR ID.
In Figure 2, no exact routes between LSRA and LSRC are configured. The default LSRA-to-LSRB route to 0.0.0.0 is used between LSRA and LSRC. A remote LDP session in DoD mode is established between LSRA and LSRC. Before an LSP is established between the two LSRs, LSRA uses the longest match rule to query the next-hop IP address and sends a Label Request packet to the downstream LSR. Upon receipt of the Label Request packet, the transit LSRB checks whether an exact route to LSRC exists. If no exact route is configured and the longest match function is enabled, LSRB uses the longest match function to find a route and establish an LSP over the route.
A remote LDP session in DoD mode is established on LSRA and LSRA does not find an exact route to the LDP peer ID (IP address). In this situation, after the IP address of a remote peer is specified on LSRA, LSRA uses the longest match function to automatically send a Label Request packet to request a DoD label to the remote peer that is assigned an IP address.