There was an interesting post in EE recently about policy based routing. So the network goes this way;

Lan connected to an Cisco router which has 2 ISP connections. The main one is terminated on serial0/0 and another aDSL link at serial0/1. The internal lan is connected to Fe0/1

There are other complexities of VPN and stuff, lets leave that aside. So basic requirement as to route all the traffic through serial0/0 => means the default route on the router would be pointing to serial0/0 and the user wanted all the internet web browsing traffic to go over the aDSL link and save link space on the main link. Something like this is always good to have and actually we can have this done based on policy based routing and include even fault-tolerance by having the aDSL link as backup link in case the main link goes down.

   1: default route & default route with higher metric, so it gets inserted to routing table 
   2: in case the first one goes down.
   3:  
   4: ip route 0.0.0.0 0.0.0.0 serial0/0 
   5: ip route 0.0.0.0 0.0.0.0 serial0/1 10 
   6:  
   7: The above helps in backup-route. 
   8:  
   9: The following route-map decides if the traffic is web browsing and if so then sends
  10: packet out through aDSL link, otherwise traffic goes through the main link.
  11:  
  12: route-map webtraffic permit 10
  13:   match ip address 200
  14:   set ip next-hop <aDSL Interface remote side ip>
  15:  
  16: access-list 200 permit tcp <Internal Network> <Wildcard Mask> any eq 80
  17: access-list 200 permit tcp <Internal Network> <Wildcard Mask> any eq 443
  18:  
  19: It is assigned to the interface, so that it can be evaluated at the entry level in
  20: local lan which is connected to Fe0/1
  21: int Fe0/1
  22: ip policy route-map webtraffic 
Technorati Tags: ,