Policy Routing Using Route Maps
Router(config)#route-map ISP1 permit 20 |
Creates a route map named ISP1. This route map will permit traffic based on subsequent criteria. A sequence number of 20 is assigned. |
Router(config-route-map)#match ip address 1 |
Specifies the match criteria (the conditions that should be tested); in this case, match addresses filtered using ACL 1. |
Router(config-route-map)#set ip next hop 6.6.6.6 |
Specifies that packets that pass a match are output to the router at IP address 6.6.6.6. |
Router(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 serial 0/0/0. |
Router(config-route-map)#set ip default next hop 6.6.6.6 |
Defines where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination. |
Router(config-route-map)#set default interface serial 0/0/0 |
Defines where to output packets that pass a match clause of a route map for policy routing and have no explicit route to the destination. |
Router(config-route-map)#exit |
Returns to global configuration mode. |
Router(config)#interface fastethernet 0/0 |
Moves to interface configuration mode. |
Router(config-if)#ip policy route-map ISP1 |
Specifies a route map to use for policy routing on an incoming interface that is receiving the packets that need to be policy routed. |
Router(config-if)#exit |
Returns to global configuration mode. |
Router(config)#ip local policy route-map ISP1 |
Specifies a route map to use for policy routing on all packets originating on the router. |
Router(config)#interface fastethernet 0/0 |
Moves to interface configuration mode. |
Router(config-if)#ip route-cache policy |
Enables fast-switched policy routing. |
A fast-switched PBR supports all the match commands and most of the set commands except for the following:
- The set ip default next-hop command is not supported.
- The set interface command is supported over point-to-point links, unless a route cache entry exists that uses the same interface that is specified in the set interface command in the route map.
Router#show ip policy |
Displays route maps that are configured on the interfaces. |
Router#show route-map [map-name] |
Displays route maps. |
Router#debug ip policy |
Enables the display of IP policy routing events. |
Router#traceroute |
Enables the extended traceroute command, which allows the specification of the source address. |
Router#ping |
Enables the extended ping command, which allows for the specification of the source address. |