Source Based Routing

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
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 15.2.1.5 ?
Photo of Jason Weems

Jason Weems

  • 412 Points 250 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Cibulka, Leandro

Cibulka, Leandro, Alum

  • 236 Points 100 badge 2x thumb
Have you tried PBR?
Photo of Jason Weems

Jason Weems

  • 412 Points 250 badge 2x thumb
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.
Photo of Chew Choon Chong

Chew Choon Chong

  • 190 Points 100 badge 2x thumb

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? 

Photo of Alexandr P

Alexandr P, Embassador

  • 11,998 Points 10k badge 2x thumb
PBR it's not exactly commands, it's mostly ACLs
Photo of Chew Choon Chong

Chew Choon Chong

  • 190 Points 100 badge 2x thumb

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?

Photo of Mrxlazuardin

Mrxlazuardin

  • 1,454 Points 1k badge 2x thumb
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,
Photo of Chew Choon Chong

Chew Choon Chong

  • 190 Points 100 badge 2x thumb

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.

Photo of Jason Weems

Jason Weems

  • 412 Points 250 badge 2x thumb

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 15.3.3.5 patch-10 everywhere now.

Photo of Sean Brady

Sean Brady

  • 318 Points 250 badge 2x thumb
Jason -  I have successfully implemented PBR to achieve that goal.  Here is the policy file I used -

entry REDIRECT {
if match all {
    source-address 10.50.15.0/24;
    destination-address 0.0.0.0/0;
    protocol tcp;
}
then {
    redirect 10.254.254.2;
}
}

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

Good luck!
Photo of Chew Choon Chong

Chew Choon Chong

  • 190 Points 100 badge 2x thumb
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.
Photo of Jarek

Jarek

  • 2,398 Points 2k badge 2x thumb
Hi,

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."


--
Jarek
Photo of Nick Shoemaker

Nick Shoemaker

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