A route-policy takes effect only when it is applied to a routing protocol.
Objectives |
Command |
Reference |
---|---|---|
To configure IS-IS to generate and advertise default routes to the IS-IS domain only when external routes that match a route-policy (specified by the route-policy route-policy-name parameter) exist in the routing table of a Level-1-2 router |
default-route-advertise route-policy route-policy-name [ cost cost | tag tag | [ level-1 | level-1-2 | level-2 ] ] * [ avoid-learning ] |
|
To 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 ] ] |
- |
To configure IS-IS to accept the routes that match a route-policy |
filter-policy route-policy route-policy-name import |
|
To configure IS-IS to import the routes from another routing protocol that match a route-policy |
import-route { direct | static | unr | { ospf | rip | isis } [ process-id ] | 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 { { ospf | rip | isis } [ process-id ] | bgp [ permit-ibgp ] | direct | unr } inherit-cost [ { level-1 | level-2 | level-1-2 } | tag tag | route-policy route-policy-name ] * import-route { ospf | isis } [ process-id ] [ cost-type { external | internal } | cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] | no-sid ] * import-route { ospf | isis } [ process-id ] inherit-cost [ { level-1 | level-2 | level-1-2 } | tag tag | route-policy route-policy-name | no-sid ] * |
|
To configure Level-1 routes that match a route-policy to leak to a Level-2 area |
import-route isis level-1 into level-2 [ filter-policy route-policy route-policy-name | direct allow-filter-policy | tag tag | no-sid ] * |
|
To configure Level-2 routes that match a route-policy to leak to a Level-1 area |
import-route isis level-2 into level-1 [ filter-policy route-policy route-policy-name | direct allow-filter-policy | tag tag | no-sid ] * |
|
To configure a priority for the IS-IS routes that match a route-policy |
preference { route-policy route-policy-name | preference } * |
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 IS-IS Auto FRR.
Objectives |
Command |
Reference |
---|---|---|
To configure IS-IS to generate and advertise default IPv6 routes to the IS-IS domain only when external routes that match a route-policy (specified by the route-policy route-policy-name parameter) 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-2 | level-1-2 ] ] * [ avoid-learning| learning-avoid-loop ] |
|
To 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 ] ] |
- |
To configure IS-IS to accept the IPv6 routes that match a route-policy |
ipv6 filter-policy route-policy route-policy-name import |
|
To configure IS-IS to import the IPv6 routes from another routing protocol that match a route-policy |
ipv6 import-route { direct | static | unr | { ripng | isis | ospfv3 } [ process-id ] } | bgp [ permit-ibgp ] } [ cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * ipv6 import-route { { ospfv3 | ripng | isis } [ process-id ] | bgp [ permit-ibgp ] | direct | unr } inherit-cost [ tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * |
|
To configure Level-1 IPv6 routes that match a route-policy to leak to a Level-2 area |
ipv6 import-route isis level-1 into level-2 [ filter-policy route-policy route-policy-name | direct allow-filter-policy | tag tag ] * |
|
To configure Level-2 IPv6 routes that match a route-policy to leak to a Level-1 area |
ipv6 import-route isis level-2 into level-1 [ filter-policy route-policy route-policy-name | direct allow-filter-policy | tag tag ] * |
|
To configure a priority for the IPv6 IS-IS routes that match a route-policy |
ipv6 preference { route-policy route-policy-name | preference } * |
Run the import-route { direct | isis [ process-id ] inherit-cost [ tag tag | route-policy route-policy-name | { level-1 | level-2 | level-1-2 } ] * command to configure IS-IS to import routes from another protocol into the current topology.
For details on how to configure IPv6 IS-IS multi-topology, see Enabling MT for an IS-IS Process.
To apply a route-policy in the OSPF view, perform the following operations:
Objectives |
Command |
Reference |
---|---|---|
To 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 (specified by the route-policy route-policy-name parameter) |
default-route-advertise [ [ always | permit-calculate-other ] | cost cost | type type | route-policy route-policy-name | distribute-delay delay-time ] * default-route-advertise [ permit-calculate-other | cost cost | type type | route-policy route-policy-name | distribute-delay delay-time | permit-ibgp ] * default-route-advertise summary cost cost |
|
To configure OSPF to accept the routes that match a route-policy |
filter-policy route-policy route-policy-name [ secondary ] import |
|
To configure OSPF to import the routes that match a route-policy |
filter-policy route-policy route-policy-name export [ protocol [ process-id ] ] |
|
To configure OSPF to import routes from another protocol |
import-route { bgp [ permit-ibgp ] | direct | unr | rip [ process-id-rip ] | static | isis [ process-id-isis ] | ospf [ process-id-ospf ] [ cost cost | route-policy route-policy-name | tag tag | type type ] * } |
|
To configure a route-policy for OSPF local MT so that only the routes that match the route-policy (specified by the route-policy route-policy-name parameter) are added to the MIGP routing table |
local-mt filter-policy route-policy route-policy-name |
- |
To configure a priority for OSPF routes that match a route-policy |
preference [ ase | inter | intra ] { 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 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.
For details on the configuration of applying a route-policy to Type-3 LSAs, see Configuring OSPF to Filter LSAs in an 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 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 Configuring 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 view.
To apply a route-policy to OSPFv3 routes in the OSPFv3 view, see Table 7.
Objectives |
Command |
Reference |
---|---|---|
To configure OSPFv3 to advertise the default routes in the routing table that are not generated by OSPFv3 to an OSPFv3 routing area based on the parameters of a route-policy (specified by the route-policy route-policy-name parameter) |
default-route-advertise [ always | permit-calculate-other | cost cost | type type | tag tag | distribute-delay delay | route-policy route-policy-name ] * |
|
To configure OSPFv3 to accept the routes that match a route-policy |
filter-policy route-policy route-policy-name [ secondary ] import |
|
To configure OSPFv3 to import the routes that match a route-policy |
filter-policy route-policy route-policy-name export [ protocol [ process-id ] ] |
|
To configure OSPFv3 to import routes from another protocol |
import-route { bgp [ permit-ibgp ] | direct | unr | static | isis [ process-id ] | ripng [ process-id ] | ospfv3 [ process-id ] } [ cost cost | tag tag | type type | route-policy route-policy-name ] * } |
|
To 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 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 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, see Configuring OSPFv3 to Filter LSAs in an Area.
To apply a route-policy in the OSPFv3 FRR 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 view.
Run the frr command to enter the OSPFv3 IP FRR view.
Run the loop-free-alternate command to enable OSPFv3 IP FRR.
Run the frr-policy route route-policy route-policy-name command to configure OSPFv3 to add the backup routes that match a route-policy to the IP routing table.
For details on how to configure OSPFv3 IP FRR, see Configuring OSPFv3 IP FRR.
To apply a route-policy in the BGP-VPNv4 address family view, perform the following operations:
Run the nexthop recursive-lookup bit-error-detection { med + med-adjust-value | local-preference - localpref-adjust-value } * [ route-policy route-policy-name ] command to associate bit error events with the adjustment of the local preference or MED value for routes that match a route-policy. If route-policy route-policy-name is not specified in the command, the local preferences or MED values of all routes are adjusted.
For details on how to configure bit-error-triggered L3VPN route switching, see Configuring Bit-Error-Triggered L3VPN Route Switching.
Run the commit command to commit the configuration.
To apply a route-policy in the VPN instance view, perform the following operations:
To associate a VPN instance address family with one export route-policy, run the export route-policy route-policy-name [ add-ert-first ] command.
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 VPN instance IPv4 or IPv6 address family with one import route-policy, run the import route-policy route-policy-name command.
The import route-policy command can control route transmission 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.
Run the commit command to commit the configuration.
To apply a route-policy in the VPN instance IPv4 address family view, perform the following operations:
Run the ip { direct-routing-table | static-routing-table } route-policy route-policy-name command to apply a route-policy to direct or static routes in the VPN instance IPv4 address family.
After the ip route-policy command is run, a device can modify attributes of direct or static routes based on the route-policy.
Run the commit command to commit the configuration.
To apply a route-policy in the VPN instance IPv6 address family view, perform the following operations:
Run the commit command to commit the configuration.