The ip route-static ldp-sync command configures unicast static routes for synchronization with LDP.
The undo ip route-static ldp-sync command deletes unicast static routes for synchronization with LDP.
By default, unicast static routes for synchronization with LDP are not configured.
ip route-static ip-address { mask | mask-length } interface-type interface-number [ nexthop-address ] [ preference preference | tag tag ] * ldp-sync [ description text ]
undo ip route-static ip-address { mask | mask-length } interface-type interface-number [ nexthop-address ] [ preference preference | tag tag ] * ldp-sync
ip route-static vpn-instance vpn-source-name ip-address { mask | mask-length } { nexthop-address [ public ] | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-destination-name nexthop-address } [ preference preference | tag tag ] * ldp-sync [ description text ]
undo ip route-static vpn-instance vpn-source-name ip-address { mask | mask-length } [ nexthop-address | interface-type interface-number [ nexthop-address ] ] [ preference preference | tag tag ] * ldp-sync
Parameter | Description | Value |
---|---|---|
vpn-instance vpn-source-name | Specifies the name of the source VPN instance. Each VPN instance has its own routing table. The configured static routes are added to the routing table of the specified VPN instance. | The value must be an existing VPN instance name. |
vpn-instance vpn-destination-name | Specifies the name of the destination VPN instance. | The value must be an existing VPN instance name. |
ip-address | Specifies a destination IP address. | The value is in dotted decimal notation. |
mask | Specifies the subnet mask. | The value is in dotted decimal notation. |
mask-length | Specifies the mask length. As 1s in a 32-bit mask must be consecutive, the mask in dotted decimal notation can be replaced by the mask length. | The value is an integer that ranges from 0 to 32. |
interface-type interface-number | Specifies the type and number of the interface that forwards packets. | - |
nexthop-address | Specifies the next-hop address. | The value is in dotted decimal notation. |
public | Specifies the next-hop address as a public network address but not an address in the source VPN instance. | - |
preference preference | Specifies the preference of a static route. A smaller value indicates a higher preference. | The value is an integer that ranges from 1 to 255. The default value is 60. |
tag tag | Specifies the tag value of a static route. By configuring different tag values, you can classify static routes to implement different routing policies. For example, other routing protocols can import static routes with specified tag values through routing policies. | The value is an integer that ranges from 1 to 4294967295. The default value is 0. |
description text | Configures the description of a static route. | The value is a string of 1 to 80 characters that can contain spaces. |
On an MPLS network with primary and backup links, LSRs establish LSPs based on static routes. When the LDP session of the primary link becomes faulty (the fault is not caused by a link failure) or the primary link recovers, configuring synchronization between LDP and static routes minimizes traffic loss during traffic switchover and switchback.
After synchronization between LDP and static routes is enabled, the recovered static route becomes temporarily inactive. It waits for the establishment of an LDP session before the Hold-down timer expires, which synchronizes LDP and the static route.