Wired Intelligent Edge

 View Only
Expand all | Collapse all

Multiple static route with different next-hop

This thread has been viewed 13 times
  • 1.  Multiple static route with different next-hop

    Posted Jul 10, 2023 12:47 PM

    Hello everyone,

    I got a situation where I need to route 2 different VLANs on an aruba switch 5406r zl2

    These VLANs receive communication from specific IP addresses through a site-to-site VPN.

    I need both VLANs to route back those IPs through their own Firewall IP gateway.

    Example:

    IP 10.5.0.2 is default route for VLAN 2
    IP 10.100.0.2 is default route for VLAN 3

    If I enable just one of them on the static routes, either works.
    If I enable both of them on static routes just one works, the other doesn't.
    How can I make both work for same destination?

    ip route 10.129.192.17 255.255.255.255 10.5.0.2
    ip route 10.100.77.15 255.255.255.255 10.5.0.2
    ip route 10.129.192.17 255.255.255.255 10.100.0.2
    ip route 10.100.77.15 255.255.255.255 10.100.0.2



  • 2.  RE: Multiple static route with different next-hop

    Posted Jul 11, 2023 03:43 AM

    Hi, what you are trying to achieve cannot be done with a single virtual router. A single routing table can only hold a single entry for a specific route. This is a fundamental of how routing works.

    On a platform like CX, you can configure multiple routing tables (VRF). You can then attach a VLAN routed interface (SVI) to one of these virtual routing tables. 

    However, depending on the detail of what you need to achieve, policy based routing might be an option. See this thread for a discussion. I haven't done it myself but you basically match traffic and then forward the traffic to a specific destination. So your vlan2 sources could be forwarded one way, the vlan3 sources forwarded another. Policy based routing could be seen as coming before classic routing in the decision process.