Routing Policies
This section describes how to configure the elements needed to define routing policies. Routing policies modify and redirect routes to and from the system to satisfy specific network deployment requirements.
Use the following building blocks to configure routing policies:
-
Route Access Lists – The basic building block of a routing policy. Route access lists filter routes based on a range of IP addresses.
-
IP Prefix Lists – A more advanced element of a routing policy. An IP Prefix list filters routes based on IP prefixes.
-
AS Path Access Lists – A basic building block used for Border Gateway Protocol (BGP) routing. These lists filter Autonomous System (AS) paths.
-
Route Maps – Route-maps provide detailed control over routes during route selection or route advertisement by a routing protocol, and in route redistribution between routing protocols. For this level of control you use IP Prefix Lists, Route Access Lists and AS Path Access Lists to specify IP addresses, address ranges, and Autonomous System paths.
Creating IP Prefix Lists
Use the following configuration example to create IP Prefix Lists:
config
context context_name
ip prefix-list name list_name { deny | permit } network_address/net_mask
Notes:
-
Set the IP prefix list to deny, permit or match any prefix.
-
IPv4 dotted-decimal and IPv6 colon-separated-hexadecimal addresses are supported.
-
Save your configuration as described in the Verifying and Saving Your Configuration chapter.
Creating Route Access Lists
Use the following procedure to create a Route Access List:
config
context context_name
route-access-list { extended identifier } { deny | permit } [ ip address ip_address ]
route-access-list named list_name { deny | permit } { ip_address/mask | any } [ exact-match ]
route-access-list
standard identifier { permit | deny ) { ip_address
wildcard_mask | any |network_address }
Notes:
-
A maximum of 64 access lists are supported per context.
- A maximum of 16 entries can defined for each route-access-list.
-
Save your configuration as described in the Verifying and Saving Your Configuration chapter.
Creating AS Path Access Lists
Use the following procedure to create an AS Path Access List:
config
context context_name
ip as-path access-list list_name [ { deny | permit } reg_expr ]
Notes:
-
Save your configuration as described in the Verifying and Saving Your Configuration chapter.
Creating Route Maps
Use the following configuration example to create a Route Map:
config
context context_name
route-map map_name { deny | permit } seq_number
Notes:
-
Use the match and set commands in Route Map Configuration mode to configure the route map. Refer to the Command Line Interface Reference for more information on these commands.
-
Save your configuration as described in the Verifying and Saving Your Configuration chapter.
Sample Configuration
The example below shows a configuration that creates two route access lists, applies them to a route map, and uses that route map for a BGP router neighbor.
The example below shows a configuration that creates two route access lists, applies them to a route map, and uses that route map for a BGP router neighbor.
config
context isp1
route-access-list named RACLin1a permit 88.151.1.0/30
route-access-list named RACLin1a permit 88.151.1.4/30
route-access-list named RACLany permit any
route-map RMnet1 deny 100
match ip address route-access-list RACLin 1 a
#exit
route-map RMnet1 deny 200
match ip address route-access-list RACLin 1 b
#exit
route-map RMnet1 permit 1000
match ip address route-access-list RACLany
#exit
router bgp 1
neighbor 152.20.1.99 as-path 101
neighbor 152.20.1.99 route-map RMnet1