02 November 2011

Simple Cisco PBR

Cisco PBR ( Policy Based Routing ) uses route-maps applied to the ingress interface. Suppose you have 2 ISPs,   s0/0 and s0/1. You want traffic from the LAN interface (fa4) to be routed out each gateway depending on traffic type. Here is how you would achieve that.

ip access-list extended s0_traffic
 permit tcp any any eq www ftp 22
ip access-list extended s1_traffic
 permit ip any any
route-map fa4_in permit 10
 match ip address s0_traffic
 set ip next-hop s0/0
route-map fa4_in permit 20
 match ip address s1_traffic
 set ip next-hop s0/1
int fa4
ip policy route-map fa4_in

Traffic that doesn't match a route map statement will use the global routing table so you could also just configure the s0/0 ACL and route map, and set up a default route for s0/1.

No comments:

Post a Comment