Network bonding

I have an OSA network device already configured on my SLES12 system. I want to bring in another OSA device and set it up as a secondary device that will communicate with the network if the first OSA device fails. The second OSA device would use the same ip address. Also, I would prefer to use a different gateway.
using YAST I select the OSA device and then select "no link and ip setup (bonding slaves).
Select Add → ipv4 address label → Secondary
ip address → same IP address as first device
mask —> 255.255.255.0
I did not see an option for a different gateway. Is it possible to use a different gateway?
Do I need to do the same procedure with the original device?
I do not see any bonding with the ifconfig output.
I deleted the ip addr and Bcast from the output.

eth0 Link encap:Ethernet HWaddr 02:00:00:00:00:6F
inet addr: Bcast: Mask:255.255.255.0
inet6 addr: fe80::200:0:a00:6f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:664 errors:0 dropped:0 overruns:0 frame:0
TX packets:479 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80008 (78.1 Kb) TX bytes:192554 (188.0 Kb)

eth1 Link encap:Ethernet HWaddr 02:00:00:00:00:70
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3456 (3.3 Kb) TX bytes:0 (0.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

Hi mikenash,

“bonding” is meant to combine two or more physical links, acting as a single virtual link. Hence the objective “set up a different gateway” doesn’t make much sense in that context.

You’d configure your physical links as “bonding slaves” and have no IP configuration for them. Then, you create a bonding device what will enslave your physicals - and it’s that bonding device that carries the IP configuration (single IP / gateway).

Is that the way your OSA links work, IOW, do they really both work for the same IP address (on your side) and the network operator side does take IP packets on either link? Or are these actually two distinct IP links, that (for one reason or another) can have the same IP address on your side, but will have to be configured individually, i.e. with a different gateway address?

In the latter case, creating an automagical take-over might get a bit more complicated than setting up link aggregation.

Regards,
Jens

Hello Jens, Thank you for your reply. What I was looking for is a primary and secondary setup. When a primary OSA controller or route stop functioning a secondary OSA controller with a different route would take over using the same IP address. An automatic function is preferable but a manual process could also work. I am thinking that I could use ONBOOT=NO for one configuration. That would me to edit each configuration and edit the values. Then repair the problem with the first configuration. Could this work if no automation is available?

Hi Mike/mikenash,

I am thinking that I could use ONBOOT=NO for one configuration.

while “NO” doesn’t seem to be an option (see /etc/sysconfig/network/ifcfg.template - there “off” is mentioned), I’d go for “manual”, no matter if it’s an automatic script calling ifup :smiley:

All you’d have to add is some monitoring script that will call “ifdown” for the failing, and “ifup” for the backup link… and be able to handle switch-back properly. OR, of course, do it by hand.

Regards,
Jens

Thank you.