Network Multipath Routing

Latest response

Hello,

how to setup persistent network multipath routing in RHEL 7.x (surviving reboot)?

ie ->

eno1 - mgmt
eno2, eno3 - real traffic

ip route add table 88 default nexthop via eno2_GW_IPv4 dev eno2 weight 10 nexthop via eno3_GW_IPv4 dev eno3 weight 10

that works fine when typed through cli, but can't find any info how to setup those in /../network-scripts/* files, any advice ?
Following that - how to expand that defined route so when one of two devices is down (ie `nmcli connection down eno2) traffic still goes through the other one (eno3)?
MGMT interface (eno1) is mentioned here to emphasise that source policy routing is used for management traffic.

TIA,

Responses

Hello

Does this section in Networking Guide help Configuring Static Routes in ifcfg files

I've read all that already, it does not mention the important part - multipath routing, so no, it does not help. Keyword here is 'nexthop' in route definition and at least two iface in one route definition.

It should go like this:

  • Setup your tables in /etc/iproute2/rt_tables
  • Configure rules in /etc/sysconfig/network-scripts/rule-ethX
  • Configure routes in /etc/sysconfig/network-scripts/route-ethX
  • If using NetworkManager, install the NetworkManager-config-routing-rules package

The rule-ethX and route-ethX files just pass their contents one-line-at-a-time to the ip rule or ip route commands.

I would guess for your purpose, you'd put your route in route-eno3 because the interfaces should be processed in alphabetical order and it wouldn't make much sense to add a route for both interfaces when eno2 is up but eno3 isn't.

References:

Thank you for your attempt to help me but you did NOT even try to reproduce or test what I'm asking. I DO know about rule-iface (ethX is 'obsolete') and route-iface and source policy routing (mgmt iface is set that way). Now the problem is MULTIPATH routing, meaning you have two or more 'nexthop's hence TWO interfaces in one default route. ie ->

# ip route show table 88
default
  nexthop via eno2_GW_IPv4 dev eno2 weight 10
  nexthop via eno3_GW_IPv4 dev eno3 weight 10

now tell me in what single /../network-scripts/ file I should put that so it will be persistent over reboots ?
About your proposal of route-eno3, if I do ifdown/ifup of eno2 route definition is gone even tho both ifaces are up again.

thank you in advance,

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.