Source Routing - Force 2 LANs via 2 different WANs

The scenario is a router with 2 LANs and two WANs. The 1st WAN goes via a DC like a colo point, then out to the Internet. It is a backup default route, mainly used for accessing the colo LAN. All LAN2 users should always use WAN1, even to access DC/Colo/Remote subnet.

interface FastEthernet0/0.10
 description LAN1
 encapsulation dot1Q 10
 ip address
 ip nat inside
 ip virtual-reassembly

interface FastEthernet0/0.20
 description LAN2
 encapsulation dot1Q 20
 ip address
 ip nat inside
 ip virtual-reassembly
 ip policy route-map FORCE-LAN2-VIA-WAN1

interface FastEthernet0/1
 description WAN1
 ip address dhcp
 ip nat outside
 ip virtual-reassembly

interface FastEthernet0/2
 description WAN2 - Used for
 ip address

! Static route, to route to a remote subnet via 2nd WAN link
ip route 210 track 1
! A default route is received on fa0/1 (WAN1) via DHCP from ISP
! for all other traffic
! Backup default route via WAN2
ip route 210 track 1

! NAT fa0/0.10 users when accessing the Internet via WAN1
ip nat inside source route-map ROUTE-WAN1 interface FastEthernet0/1 overload
! NAT fa0/0.20 users out via WAN1
ip nat inside source route-map FORCE-LAN2-VIA-WAN1 interface FastEthernet0/1 overload

route-map ROUTE-WAN1 permit 10
 match interface FastEthernet0/1

route-map FORCE-LAN2-VIA-WAN1 permit 10
 match interface FastEthernet0/0.20
 set default interface FastEthernet0/1
 ! "set default interface" - is where the magic happens as this overrides any specific prefix entries in the FIB
 ! "set default" or "set ip next-hop dynamic dhcp" etc

Previous page: IP SLA PSN Example
Next page: Track OSPF Route Metric