December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to use different network links depending on the source address.
Policy-based routing allows you to configure special routing rules beyond the normal IP routing table. One common application is to route packets based on the IP source address rather than the destination address:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list1permitRouter(config)#10.15.35.0 0.0.0.255access-list2permitRouter(config)#10.15.36.0 0.0.0.255interfaceRouter(config-if)#Ethernet0ip addressRouter(config-if)#10.15.22.7 255.255.255.0ip policy route-mapRouter(config-if)#Engineersip route-cache policyRouter(config-if)#exitRouter(config)#route-mapEngineerspermitRouter(config-route-map)#10match ip addressRouter(config-route-map)#1set ip next-hopRouter(config-route-map)#10.15.27.1exitRouter(config)#route-mapEngineerspermitRouter(config-route-map)#20match ip addressRouter(config-route-map)#2set interfaceRouter(config-route-map)#Ethernet1endRouter#
This configuration example defines a special routing policy for a group of users defined by the route map called “Engineers.” This name is arbitrary, and we recommend that you choose names for your route maps that are meaningful in your organization. This example applies the route map to all of the packets received on the interface Ethernet0. This might be required because these users ...