Cisco IOS policy route default traffic
From OISecWiki
When migrating for instance firewalls it might come in handy to push all default traffic without a specific route in the RIB towards another next-hop. To do this on Cisco IOS, we have to use route-maps. The ip default next-hop stanza will make sure everything that has no entry in the RIB (0.0.0.0/0 is ignored) will be routed towards that next-hop.
In this example we route all default traffic coming on interface Vlan100 towards 10.42.255.254:
route-map outgoing-new-fw permit 1 set ip default next-hop 10.42.255.254 ! interface Vlan100 ip policy route-map outgoing-new-fw
We can also do the same for specific source ranges on the interface:
ip access-list extended pfx-outgoing-new-fw permit ip 10.42.1.0 0.0.1.255 any deny ip any any ! route-map outgoing-new-fw permit 1 match ip address pfx-outgoing-new-fw set ip default next-hop 10.42.255.254 ! interface Vlan100 ip policy route-map outgoing-new-fw