Routing Policies Configuring BGP
page 4-46 OmniSwitch 6800/6850/9000 Advanced Routing Configuration Guide December 2007
2 Next, use the ip bgp policy aspath-list action command to set the policy action. The action of a policy
is whether the route filtered by the policy is permitted or denied. Denied routes are not propagated by the
BGP speaker, while permitted routes are. For example:
-> ip bgp policy aspath-list aspathfilter “^100 200$” action permit
The AS path policy aspathfilter now permits routes that match the regular expression ^100 200$. Regular
expressions must be enclosed by quotes.
3 Optionally, you can set the priority for routes filtered by the policy using the ip bgp policy aspath-list
priority command. Priority for policies indicates which policy should be applied first to routes. Routes
with a high priority number are applied first. To set the policy priority, enter the policy name with the
priority number, as shown:
-> ip bgp policy aspath-list aspathfilter “^100 200$” priority 10
The AS path policy aspathfilter now has a priority of 10. Regular expressions must be enclosed by
quotes.
Creating a Community List Policy
Community list policies must be assigned a name and a community number. Predetermined communities
are specified in RFC 1997.
To create a community policy:
1 Assign a name and community number to the policy using the ip bgp policy community-list
command, as shown:
-> ip bgp policy community-list commfilter 600:1
The policy name is commfilter and it looks for routes in the community 600:1.
2 Set the policy action using the ip bgp policy community-list 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 community-list commfilter 600:1 action permit
The commfilter policy now permits routes in community 600:1 to be advertised.
3 Set the policy match type using the ip bgp policy community-list match-type command. The match
type can be set to either exact or occur. An exact match only affects routes that are solely in the specified
community, while an occur match indicates that the community can be anywhere in the community list.
For example:
-> ip bgp policy community-list commfilter 600:1 match-type exact
Policy commfilter now looks for routes that only belong to the community 600:1.
4 Optionally, you can set the priority for routes filtered by the policy using the ip bgp policy
community-list priority command. Priority for policies indicates which policy should be applied first to
routes. Routes with a high priority number are applied first. To set the policy priority, enter the policy
name with the priority number, as shown:
-> ip bgp policy community-list commfilter 500:1 priority 3
Policy commfilter now has a priority of 3.