To apply a routing policy, use the command appropriate to the client. Different protocols support different ways to apply policies, but there are some generalities.
Commands that use the keyword import-policy are used to change the attributes of routes installed into the switch routing table by the protocol. These commands cannot be used to determine the routes to be added to the routing table. The following are examples for the BGP (Border Gateway Protocol) and RIP (Routing Information Protocol) protocols:
configure bgp import-policy [policy-name | none]
configure rip import-policy [policy-name | none]
Commands that use the keyword route-policy control the routes advertised or received by the protocol. For BGP and RIP, here are some examples:
configure bgp neighbor [remoteaddr | all] {address-family [ipv4-unicast | ipv4-multicast |ipv6-unicast | ipv6-multicast |vpnv4]} route-policy [in | out] [none | policy]
configure bgp peer-group peer-group-name {address-family [ipv4-unicast | ipv4-multicast |ipv6-unicast | ipv6-multicast |vpnv4]} route-policy [in |out] [none | policy]
configure rip vlan [vlan_name | all] route-policy [in | out] [policy-name | none]
Other examples of commands that use routing policies include:
configure ospf area area-identifier external-filter [policy-map |none]
configure ospf add vlan [vlan-name | all] area area-identifier {passive} {vr vrf_name}
configure rip vlan [vlan_name | all] trusted-gateway [policy-name | none]
To remove a routing policy, use the none option in the command.
Note
When exporting a route into BGP with an export policy, the AS-Path is limited to a maximum of 15 AS numbers.