CLI Guide

Table Of Contents
Layer 3 Routing Commands 1523
Route map sequence 20 in route map equal-access is used to match all
packets sourced from any host in subnet 10.2.0.0. If there is a match, and if
the router has no explicit route for the packet’s destination, it is sent to next-
hop address 172.16.7.7.
All other packets are forwarded as per normal L3 destination-based routing.
console(config-if-vlan3)#ip policy route-map equal-access
console(config)#ip access-list R1
console(config-ip-acl)#permit ip 10.1.0.0 0.0.255.255 any
console(config-ip-acl)#exit
console(config)#ip access-list R2
console(config-ip-acl)#permit ip 10.2.0.0 0.0.255.255 any
console(config-ip-acl)#exit
console(config)#route-map equal-access permit 10
console(config-route-map)#match ip address R1
console(config-route-map)#set ip default next-hop 192.168.6.6
console(config-route-map)#exit
console(config)#route-map equal-access permit 20
console(config-route-map)#match ip address R2
console(config-route-map)#set ip default next-hop 172.16.7.7
console(config-route-map)#exit
console(config)#interface vlan 11
console(config-if-vlan11)#ip address 10.1.1.1 255.255.255.0
console(config-if-vlan11)#ip policy route-map equal-access
console(config)#interface vlan 12
console(config-if-vlan12)#ip address 10.1.1.1 255.255.255.0
console(config-if-vlan12)#ip policy route-map equal-access
console(config)#interface vlan 13
console(config-if-vlan13)#ip address 192.168.6.5 255.255.255.0
console(config)#interface vlan 16
console(config-if-vlan16)#ip address 172.16.7.6 255.255.255.0
This example illustrates the scenario where IP ACL referenced by a route-map
is removed or rules are added or deleted from that ACL, this is how
configuration is rejected:
console#show ip access-lists
Current number of ACLs: 9 Maximum number of ACLs: 100
ACL ID/Name Rules Interface(s) Direction Count
------------------------------- ----- ----------- ---------- ----------
1 1
2 1