Reset Search
 

 

Article

How to Configure Policy Based Routing on an XSR

« Go Back

Information

 
TitleHow to Configure Policy Based Routing on an XSR
Objective
Configure Policy Based Routing to direct traffic originating at one or more specific sources to use a specific gateway regardless of static or dynamic route table information.
Environment
  • XSR
  • Routing
  • Policy Based Routing
  • PBR
Procedure

Presuming we want traffic originating from subnet 192.0.2.0/24 on interface Fastethernet 2 to use 198.51.100.1 as the next hop regardless of destination and regardless of route table information, including configured default gateway:  

1.  Identify the traffic to which the policy based route is to be applied.  This is done with an extended Access Control List (ACL):
XSR(config)#access-list 100 permit ip 192.0.2.0 0.0.0.255 any

2. Configure a route map:
 
XSR(config)# route-map pbr 100
XSR(config-pbr-map)#match ip address 100
XSR(config-pbr-map)#set ip next-hop 198.51.100.1
XSR(config-pbr-map)#exit
XSR(config)#

 
3.  Apply the policy to the ingress interface (from which this traffic originates):
 
XSR(config)#int f2
XSR(config-if<FastEthernet2>)#ip policy
XSR(config-if<FastEthernet2>)#exit
XSR(config)#exit
XSR#

 
Additional notes
  • To identify traffic of a more specific nature, such as from a mail server, we create the ACL a little differently:
XSR(config)# access-list 100 permit tcp host 192.0.2.12 eq 25 any eq 25
  • PBR can provide great flexibility, it all depends on how creative we want to make the ACL.

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255