User guide

Routing Policies Configuring BGP
page 4-84 OmniSwitch AOS Release 7 Advanced Routing Configuration Guide March 2015
3 Optionally, you can set a minimum length of the prefix to be matched in the policy using the ip bgp
policy prefix6-list ge command. For example:
-> ip bgp policy prefix6-list uniqLocal FC00::/48 ge 48
Prefix policy uniqLocal now denies routes after FC00::/48
4 Optionally, you can set a maximum length of the prefix to be matched in the policy using the ip bgp
policy prefix6-list le command. For example:
-> ip bgp policy prefix6-list uniqLocal FC00::/48 le 24
Prefix policy uniqLocal now denies routes between FC00::/48 and FC00::/24
Creating a Route Map Policy
Route map policies let you amalgamate the other policy types together, as well as add various other filters.
For example, you could have a route map policy that includes both an AS path policy and a community
policy.
To create a route map policy:
1 Name the route map policy and assign it a sequence number using the ip bgp policy route-map
command. The sequence number allows for multiple instances of a policy, and orders the route map poli-
cies so that a lower sequence number is applied first. For example:
-> ip bgp policy route-map mapfilter 1
Route map policy mapfilter is now ready.
2 Set the policy action using the ip bgp policy route-map action command. The policy action either
permits or denies routes that match the filter. Permitted routes are advertised, while denied routes are not.
For example:
-> ip bgp policy route-map mapfilter 1 action deny
Prefix policy mapfilter now denies routes that are filtered.
3 Add various conditions to the route map policy. It is possible to add an AS path policy, a community
policy, a prefix policy, a prefix6 policy, as well as indicate other variables such as local preference and
weight. The following table displays a list of the commands that can be used to construct a route map
policy:
Route Map Options Command
Assigns an AS path matching list to the
route map.
ip bgp policy route-map aspath-list
Configures the AS path prepend action to
be taken when a match is found.
ip bgp policy route-map asprepend
Configures the action to be taken on the
community attribute when a match is
found.
ip bgp policy route-map community
Assigns a community matching list to the
route map.
ip bgp policy route-map community-list
Configures the action to be taken for a
community string when a match is found.
ip bgp policy route-map community-mode