Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

Source based routing

I have two subnets, by default all traffic goes through path 1. For one destination say x.x.x.x, subnet one should take path 1 and subnet two should take path 2. How can i achieve this.

Thanks in Advance


Re: Source based routing

Hi Friend,

Yes that is possible through Policy Base Routing (PBR)

Try this config and I think this should work

route-map Test permit 10

match ip address 100

set ip next-hop <-----Path 1


route-map Test permit 20

match ip address 200

set ip next-hop <-----Path 2


access-list 100 permit ip

access-list 200 permit ip

Router(config)interface fa0/1

Router(config-if)# ip policy route-map Test

You can define your first subnet as source network A in ACL 100 and second subnet as source network B in ACL 200.

HTH, if yes please rate the post.


Re: Source based routing


Only as a reminder, dont forget that Policy Based Routing could be sometimes called a static routing based on source.

So you have to be carefull not losing the reliability of your routing.

there are some routing features to help you.

-Policy Based Routing: Recursive Next Hop

-PBR Support for Multiple Tracking Options

But those are only available in some plataforms and some IOS versions.


if it does, please rate this post, I'd appreciate.


Re: Source based routing


Please also check the current CPU utilization, and memory on teh router as well. The PBR is a CPU intensive feature and once you enable it it will take a large number of CPU cycles to make the decisions. Check the memory part also, you should have adequate memory on the router to support it.

HTH, Please rate if it does.

-amit singh


Re: Source based routing

Just use a static route.

IP ROUTE yy.yy.yy.yy

xx=the net/subnet you want to direct yy=the address of the next hop for the path mm=network mask

Use the Default Gateway / GW of Last Resort for the main traffic, and a static for the exception traffic.

Easy to do and not so hard on the resources.

Good Luck


Re: Source based routing

Hello Scott,

I'm not sure static routes will help him in this case as he is doing source based routing.

As I understood, he needs to sent traffic from subnet1 to 1 path and from subnet 2 to 2 path , when going to the same destination.

So, I believe Policy Based Routing will be the solution. Enabling CEF helps on the CPU issues.


Re: Source based routing

Hi Scott,

Static routes is a detination base routing method which cannot be used to take the decision based on source subnet. So as updated in my first post and also by Vlad, PBR will be the simplest way to achieve original poster requirement.



CreatePlease to create content