Multiple Gateways Multiple Bonded NICS Recommended method

Scenario:
SLES11 SP2 or 3 Runlevel 3 “no NetworkManager”

Three Bonded Network Interfaces.
Bond0 comprising of eth0 and eth2
Bond1 comprising of eth1 and eth3
Bond3 comprising of eth4 and eth6
eth5 is a private network with default Gateway.

Which is the Recommend method solution for SLES11-SP2 and 3
1.
Add GATEWAY=123.45.67.1 to bond0 123.45.67.10/24
Add GATEWAY=123.45.68.1 to bond1
Add GATEWAY=123.45.69.1 to bond2
default 192.159.18.1 - - only entry in /etc/sysconfig/network/routes.

or

Create a file /etc/sysconfig/network/ifroute-bond0
#DESTINATION GATEWAY NETMASK INTERFACE
10.1.1.1 147.45.67.1 255.255.255.255 bond0

Create a file /etc/sysconfig/network/ifroute-bond1
#DESTINATION GATEWAY NETMASK INTERFACE
10.1.1.1 147.45.68.1 255.255.255.255 bond1

Create a file /etc/sysconfig/networl/ifroute-bond2
#DESTINATION GATEWAY NETMASK INTERFACE
10.1.1.1 147.45.69.1 255.255.255.255 bond2

Add to /etc/sysconfig/network/routes
10.1.1.1 147.45.67.1 255.255.255.255 bond0
10.1.1.1 147.45.68.1 255.255.255.255 bond1
10.1.1.1 147.45.69.1 255.255.255.255 bond2
default 192.159.18.1 - -

Now I am a little confused as to how /etc/sysconfig/network/scripts/ifup-route, ifdown-route and ifstatus-route are configured and how they interact with the bonded network interfaces.

I have three scenarios that all work but I do need to understand how SLES prefers multiple Gateways in a Bonded environment. I look forward to your reply’s.

thank you
George Van Tuyl

Hi George,

Now I am a little confused as to how /etc/sysconfig/network/scripts/ifup-route, ifdown-route and ifstatus-route are configured and how they interact with the bonded network interfaces.

to these (and corresponding) scripts, bonding interfaces are the same as native interfaces. (Of course, in case of bonds code is executed to enslave native interfaces, but you’re talking about routes here).

If all three versions work for you, I’d say use what works the easiest for you. I would prefer to have all routing statements in one place, so I’d use /etc/sysconfig/network/routes, others might want to see everything concerning an interface in one place, thus using the ifcfg-* file.

Regards,
Jens

PS: Are those bonds up at the same time? I was under the impression that ifup-route uses basic routing, thus leading to a “last one wins” situation concerning routes to the same target subnet…