- Offset Lists
- Cisco IOS IP Service Level Agreements
- Policy Routing Using Route Maps
- Configuration Example: Route Maps
Configuration Example: Route Maps
Figure 5-2 shows the network topology for the configuration that follows, which demonstrates how to configure route maps using the commands covered in this chapter.
Figure 5-2 Network Topology for Route Map Configuration
Assume for this example that you want to enforce the following policy:
- Internet-bound traffic from 192.168.1.0/24 is to be routed to ISP1.
- Internet-bound traffic from 172.16.1.0/24 is to be routed to ISP2.
- All other traffic to be routed normally according to their destination addresses.
Portland Router
Router>enable |
Moves to privileged mode. |
Router#configure terminal |
Moves to global configuration mode. |
Router(config)#hostname Portland |
Sets the hostname of this router. |
Portland(config)#access-list 1 permit 192.168.1.0 0.0.0.255 |
Creates ACL 1, which will filter out addresses for our first route map. |
Portland(config)#access-list 2 permit 172.16.1.0 0.0.0.255 |
Creates ACL 2, which will filter out addresses for our second route map. |
Portland(config)#access-list 101 permit ip 192.168.1.0 0.0.0.255 172. |
Creates an extended ACL, resulting in a filter based on both source and destination IP address. |
Portland(config)#access-list 102 permit ip 172.16.1.0 0.0.0.255 192.168. |
Creates an extended ACL, resulting in a filter based on both source and destination IP address. |
Portland(config)#route-map ISP1 permit 10 |
Creates a route map called ISP1. This route map will permit traffic based on subsequent criteria. A sequence number of 10 is assigned. |
Portland(config-route-map)#match ip address 1 |
Specifies the match criteria—match addresses filtered from ACL 1. |
Portland(config-route-map)#set interface serial 0/0/0 |
Specifies the set actions (what action is to be performed if the match criteria is met); in this case, forward packets out interface s0/0. |
Portland(config-route-map)#exit |
Returns to global configuration mode. |
Portland(config)#route-map ISP2 permit 10 |
Creates a route map called ISP2. |
Portland(config-route-map)#match ip address 2 |
Specifies the match criteria—match addresses filtered from ACL 2. |
Portland(config-route-map)#set interface serial 0/0/1 |
Specifies the set actions (what action is to be performed if the match criteria is met); in this case, forward packets out interface s0/1. |
Portland(config-route-map)#exit |
Returns to global configuration mode. |
Portland(config)#route-map 192To172 permit 10 |
Creates a route map named 192To172. This route map will permit traffic based on subsequent criteria. A sequence number of 10 is assigned. |
Portland(config-route-map)#match ip address 101 |
Specifies the match criteria—match addresses filtered from ACL 101. |
Portland(config-route-map)#set interface fastethernet 0/1 |
Specifies the set actions—forward packets out interface FastEthernet 0/1. |
Portland(config-route-map)#exit |
Returns to global configuration mode. |
Portland(config)#route-map 172To192 permit 10 |
Creates a route map named 172To192. |
Portland(config-route-map)#match ip address 102 |
Specifies the match criteria—match addresses filtered from ACL 102. |
Portland(config-route-map)#set interface fastethernet 0/0 |
Specifies the set actions—forward packets out interface FastEthernet 0/0. |
Portland(config-route-map)#exit |
Returns to global configuration mode. |
Portland(config)#interface serial 0/0/0 |
Moves to interface configuration mode. |
Portland(config-if)#description link to ISP1 |
Sets a locally significant description of the interface. |
Portland(config-if)#ip address 198.133.219.1 255.255.255.252 |
Assigns an IP address and netmask. |
Portland(config-if)#no shutdown |
Enables the interface. |
Portland(config)#interface serial 0/0/1 |
Moves to interface configuration mode. |
Portland(config-if)#description link to ISP2 |
Sets a locally significant description of the interface. |
Portland(config-if)#ip address 192.31.7.1 255.255.255.252 |
Assigns an IP address and netmask. |
Portland(config-if)#no shutdown |
Enables the interface. |
Portland(config)#interface fastethernet 0/0 |
Moves to interface configuration mode. |
Portland(config-if)#ip address 192.168.1.1 255.255.255.0 |
Configures an IP address and netmask. |
Portland(config-if)#ip policy route-map ISP1 |
Applies the route map named ISP1 to this interface. |
Portland(config-if)#ip policy route-map 192To172 |
Applies the route map named 192To172 to this interface. |
Portland(config-if)#no shutdown |
Enables the interface. |
Portland(config-if)#exit |
Returns to global configuration mode. |
Portland(config)#interface fastethernet 0/1 |
Moves to interface configuration mode. |
Portland(config-if)#ip address 172.16.1.1 255.255.255.0 |
Configures an IP address and netmask. |
Portland(config-if)#ip policy route-map ISP2 |
Applies the route map named ISP2 to this interface. |
Portland(config-if)#ip policy route-map 172To192 |
Applies the route map named 172To192 to this interface. |
Portland(config-if)#no shutdown |
Enables the interface. |
Portland(config-if)#exit |
Returns to global configuration mode. |
Portland(config)#exit |
Returns to privileged mode. |
Portland#copy running-config startup-config |
Saves the configuration to NVRAM. |