Source Based Routing

I have multiple routes to a particular network, I would like to route a particular local network over a certain link, while the rest of the local networks to that remote network over the normal routes. Is there a source based routing solution I can use with my x460s running XOS ?

12 replies

Have you tried PBR?
Well actually I have, and it didn't seem to work. I am looking at a static routing solution. The PBR seem to work with the routing protocols.
Tried PBR (both redirect and redirect-name) and it did not work for me. Followed exactly same commands as concept guide but still does not go to wanted next hop but used default routing table instead. Any one able to get source ip based routing with PBR working on XOS 15.6?
Userlevel 6
PBR it's not exactly commands, it's mostly ACLs
Yes am aware if it ACL and have configured the flow-redirection, access-list and policy file exactly same as what is given in concept guide and GTACT knowledge based example but does not work. Any way to troubleshoot further e.g. any form of tracing or debugging?
Userlevel 2
Hi Jason,

How about using multiple virtual router (VR)? Some source address are connected to a VR and others are connected to other VRs. You can specify different routing table for each VR.

Best regards,
Hi Mrxlazuardin,

Yes, multiple VR is one way but not feasible for my setup. I have one incoming network but two outbound network (different nexthops) that i need to route to based on source ip coming from the incoming network. Unfortunately since one common incoming network unable to put that network into different VR.
I have not configured any other VR's just using the default VR, VR-Default.

You know this post is like 6 months old and just now ppl are responding to it. I have no idea what I was even trying to do back then. I know that I have patch-10 everywhere now.
Userlevel 1
Jason - I have successfully implemented PBR to achieve that goal. Here is the policy file I used -

entry REDIRECT {
if match all {
protocol tcp;
then {

Note that this particular policy only captures TCP traffic, you will have to edit it to your specific needs.

Good luck!
Thanks Sean, exactly same configuration we did on our box (X770 Summit) but failed to work. ACL got hit as counter incremented but the redirect action does not seem to do what supposed to do. Suspect its some bug then.
Userlevel 3

the question is what are you trying to achieve ?

1) redirect to direct connected IP address

host IP1 < -- > switch L3 < --- > host IP2 => redirect to IP2 will work

2) redirect to IP address that is behind a next switch/router

host IP1 < -- > switch L3 < --- > router <---> host IP2 => redirect to IP2 will not work

The concept guide says:

"When a switch finds a matching ACL rule, it forwards the packet to the redirect IP address as specified
in the rule without modifying the packet (except as noted above).
The traffic flow is redirected only after applying the ACL to the port and only when the redirect IP
address’s adjacency is resolved. When the ARP or NDP table does not have the information to reach
the redirect IP address, the packet is routed based on the Layer 3 routing table. When the switch does
not know how to reach the redirect IP address in the rule, the rule is installed with a warning, and traffic
is not redirected until the address is resolved in the ARP or NDP table. After the address is resolved, the
traffic is redirected."

I know this is an old post, when doing this, do you have to specify a protocol or can you use multiple protocols?