By default, the system does not allow a nonexistent route-policy to be specified in a command. To enable the system to allow a nonexistent route-policy to be specified in a command, run the route-policy nonexistent-config-check disable command.
Configuration Task |
Command |
Reference |
---|---|---|
Configure a device to generate a default route or advertise a default route in the routing table to neighbors only when the matching conditions of a route-policy are met. |
default-route originate [ cost cost | { match default | route-policy route-policy-name } [ avoid-learning ] ]* |
|
Configure RIP to import the BGP routes that match a route-policy. |
import-route bgp [ permit-ibgp ] [ cost { cost | transparent } | route-policy route-policy-name ] * | |
Configure RIP to import routes that match a route-policy from another routing protocol. |
import-route { { static | direct | unr } | { rip | ospf | isis } [ process-id ] } [ cost cost | route-policy route-policy-name ] * | |
Set a priority for routes that match a route-policy. |
preference { preference | route-policy route-policy-name } * |
Configuration Task |
Command |
Reference |
---|---|---|
Configure RIPng to import routes that match a route-policy from another routing protocol. |
import-route { { ripng | isis | ospfv3 } [ process-id ] | bgp [ permit-ibgp ] | unr | direct | static } [ [ cost cost | inherit-cost ] | route-policy route-policy-name ] * |
|
Set a priority for RIPng routes that match a route-policy. |
preference { preference | route-policy route-policy-name } * |
Configuration Task |
Command |
Reference |
---|---|---|
Configure IS-IS to generate and advertise default routes to the IS-IS domain only when external routes that match a route-policy exist in the routing table of a Level-1-2 router. |
default-route-advertise [ always | match default | route-policy route-policy-name ] [ cost cost | tag tag | [ level-1 | level-1-2 | level-2 ] ] * [ avoid-learning ] |
|
Configure IS-IS to advertise the routes that are imported from another routing protocol and match a route-policy. |
filter-policy route-policy route-policy-name export [ protocol [ process-id ] ] |
Configuring IS-IS to Advertise Specified External Routes to an IS-IS Routing Domain |
Configure IS-IS to accept the routes that match a route-policy. |
filter-policy route-policy route-policy-name import |
|
Configure IS-IS to import routes that match a route-policy from another routing protocol. |
import-route { { rip | isis | ospf } [ process-id ] | static | direct | unr | bgp [ permit-ibgp ] } [ cost-type { external | internal } | cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * import-route { { rip | isis | ospf } [ process-id ] | direct | unr | bgp } inherit-cost [ tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * |
|
Leak Level-1 routes that match a route-policy to a Level-2 area. |
import-route isis level-1 into level-2 filter-policy route-policy route-policy-name |
|
Leak Level-2 routes that match a route-policy to a Level-1 area. |
import-route isis level-2 into level-1 filter-policy route-policy route-policy-name |
|
Configure a priority for the IS-IS routes that match a route-policy. |
preference { preference | route-policy route-policy-name } * |
Run the frr-policy route route-policy route-policy-name command to configure IS-IS to add the backup routes that match a route-policy to the IP routing table.
For details on how to configure IS-IS Auto FRR (IPv4), see Configuring IPv4 IS-IS Auto FRR.
Configuration Task |
Command |
Reference |
---|---|---|
Configure IS-IS to generate and advertise default IPv6 routes to the IS-IS domain only when external routes that match a route-policy exist in the routing table of a Level-1-2 router. |
ipv6 default-route-advertise route-policy route-policy-name [ cost cost | tag tag | [ level-1 | level-1-2 | level-2 ] ] * [ avoid-learning ] |
|
Configure IS-IS to advertise the IPv6 routes that are imported from another routing protocol and match a route-policy. |
ipv6 filter-policy route-policy route-policy-name export [ protocol [ process-id ] ] |
Configuring IS-IS to Advertise Specified External Routes to an IS-IS Routing Domain |
Configure IS-IS to accept the IPv6 routes that match a route-policy. |
ipv6 filter-policy route-policy route-policy-name import |
|
Configure IS-IS to import IPv6 routes that match a route-policy from another routing protocol. |
ipv6 import-route { static | direct | unr | { ospfv3 | ripng | isis } [ process-id ] | bgp [ permit-ibgp ] } [ cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * ipv6 import-route { direct | unr | { ospfv3 | ripng | isis } [ process-id ] | bgp [ permit-ibgp ] } inherit-cost [ tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * |
|
Leak Level-1 IPv6 routes that match a route-policy to a Level-2 area. |
ipv6 import-route isis level-1 into level-2 [ filter-policy route-policy route-policy-name | tag tag ] * |
|
Leak Level-2 IPv6 routes that match a route-policy to a Level-1 area. |
ipv6 import-route isis level-2 into level-1 [ filter-policy route-policy route-policy-name | tag tag ] * |
|
Configure a priority for the IPv6 IS-IS routes that match a route-policy. |
ipv6 preference { route-policy route-policy-name | preference } * |
To apply a route-policy in the OSPF view, perform the following operations:
Configuration Task |
Command |
Reference |
---|---|---|
Configure OSPF to advertise the default routes in the routing table that are not generated by OSPF to a common area based on the parameters of a route-policy. |
default-route-advertise [ [ always | permit-calculate-other ] | cost cost | type type | route-policy route-policy-name [ match-any ] ] * |
Configuring OSPF to Advertise Default Routes to an OSPF Area |
Configure OSPF to advertise the routes that are imported from another routing protocol and match a route-policy. |
filter-policy route-policy route-policy-name export [ protocol [ process-id ] ] |
|
Configure OSPF to accept the routes that match a route-policy. |
filter-policy route-policy route-policy-name [ secondary ] import |
|
Configure OSPF to import the routes that match a route-policy. |
import-route { limit limit-number | { bgp [ permit-ibgp ] | direct | unr | rip [ process-id-rip ] | static | isis [ process-id-isis ] | ospf [ process-id-ospf ] } [ cost cost | type type | tag tag | route-policy route-policy-name ] * } |
|
Configure a priority for OSPF routes that match a route-policy. |
preference [ ase ] { preference | route-policy route-policy-name } * |
To apply a route-policy in the OSPF area view, perform the following operations:
Run the system-view command to enter the system view.
Run the ospf [ process-id ] command to enable an OSPF process and enter the OSPF process view.
Run the area area-id command to enter the OSPF area view.
Perform either of the following operations to apply a route-policy in the OSPF area view:
Run the filter route-policy route-policy-name export command to apply a route-policy to outgoing Type 3 LSAs (summary LSAs) in the area.
Run the filter route-policy route-policy-name import command to apply a route-policy to incoming Type 3 LSAs in the area.
To apply a route-policy in the OSPF FRR view, perform the following operations:
Run the system-view command to enter the system view.
Run the ospf [ process-id ] command to enable an OSPF process and enter the OSPF process view.
Run the frr command to enter the OSPF FRR view.
Run the loop-free-alternate command to enable OSPF IP FRR to generate a loop-free backup link.
Run the frr-policy route route-policy route-policy-name command to configure OSPF to add the backup routes that match a route-policy to the IP routing table.
For details on how to configure OSPF IP FRR, see Enabling OSPF IP FRR.
To apply a route-policy in the OSPFv3 view, perform the following operations:
Run the system-view command to enter the system view.
Run the ospfv3 [ process-id ] command to enable an OSPFv3 process and enter the OSPFv3 process view.
To apply a route-policy to OSPFv3 routes in the OSPFv3 view, see Table 7.
Configuration Task |
Command |
Reference |
---|---|---|
Configure OSPFv3 to advertise the default routes in the routing table that are not generated by OSPFv3 to an OSPFv3 area based on the parameters of a route-policy. |
default-route-advertise [ always | cost cost | type type | tag tag | route-policy route-policy-name ] * |
|
Configure OSPFv3 to import the routes that match a route-policy. |
import-route { bgp [ permit-ibgp ] | unr | direct | ripng help-process-id | static | isis help-process-id | ospfv3 help-process-id } [ { cost cost | inherit-cost } | type type | tag tag | route-policy route-policy-name ]* |
|
Configure a priority for OSPFv3 routes that match a route-policy. |
preference [ ase ] { preference | route-policy route-policy-name } * |
- |
To apply a route-policy in the OSPFv3 area view, perform the following operations:
Run the system-view command to enter the system view.
Run the ospfv3 [ process-id ] command to enable an OSPFv3 process and enter the OSPFv3 process view.
Run the area area-id command to enter the OSPFv3 area view.
Perform either of the following operations to apply a route-policy in the OSPFv3 area view:
Run the filter route-policy route-policy-name export command to apply a route-policy to outgoing Type 3 LSAs (Inter-Area-Prefix-LSAs) in the area.
Run the filter route-policy route-policy-name import command to apply a route-policy to incoming Type 3 LSAs in the area.
For details on how to apply a route-policy to Type 3 LSAs in an OSPFv3 area, see (Optional) Configuring OSPFv3 to Filter LSAs in an Area.
Run the system-view command to enter the system view.
Run the ip rpf-route-static [ vpn-instance vpn-instance-name ] source-address { mask | mask-length } [ isis process-id | ospf process-id | rip process-id | bgp | static ] [ route-policy route-policy-name ] { interface-type interface-number | gateway-address } [ preference preference ] [ order order-number ] command to configure multicast static routes and use route-policy route-policy-name to configure matching rules of multicast static routes.
For details on how to configure multicast static routes, see Configuring a Multicast Static Route.
To apply a route-policy in the BGP view, perform the following operations:
Run the ingress-lsp trigger route-policy route-policy-name command to enable the function of establishing ingress LSPs for labeled BGP routes based on a route-policy.
On a MAN where the hybrid access mode is used, a large number of BGP labeled routes are used to establish end-to-end LSPs. Some intermediate nodes do not need to carry VPN services, but excessive ingress LSPs are created, wasting network resources. In this situation, run this command to establish ingress LSPs based on a route-policy to reduce network resource consumption.
To apply a route-policy in the VPN instance view, perform the following operations:
To associate the current VPN instance address family with one export route-policy, run the export route-policy route-policy-name command. Only one route-policy can be associated, and the last associated route-policy takes effect.
The export command can control route transmission between different VPN instances on a PE, while the peer route-policy export command can control only the VPNv4 or VPNv6 routes that a PE sends to other PE peers.
To associate the current VPN instance address family with one import route-policy, run the import route-policy route-policy-name command. Only one route-policy can be associated, and the last associated route-policy takes effect.
The import route-policy command can control route receiving between different VPN instances on a PE, while the peer route-policy import command can control only the VPNv4 or VPNv6 routes that a PE sends to other PE peers.