Network Bonding – Attach Multiple IP Addresses to a Single Device

bonding

I am setting up an Ubuntu server for several hosting tasks that has 2 network cards and I have 5 ip addresses reserved for this server.

From the bonding documentation I understand that it can easily be used both as a fault tolerance and load balancing tool, but all the examples I've seen deal with only one ip address per bonding device.

What would be the correct way to bond the two network cards together and assign all of the 5 ip addresses to the single device? Can I use virtual device names like bond0:0 for that, do I set up 4 additional bond devices using the same network cards? Or is it not possible at all?

I have the server in a co-location facility and I really would not like to lose connectivity by trying something that does not work.

Best Answer

First of all you can't do what you want with bonding. Some kind of bonding require network admin action on the network switch side.

Without any action on the network switch, you can safely use mode 1 (active/backup) to cover a nic failure.

You create 1 bond interface with both nics inside, and you setup the main system ip address on it.

Once it's fine, you create 4 ip aliases on top of your bond device (bond0:0, bond0:1, bond0:2, bond0:3)

Tip : be sure to have an access to the server console, either through a network kvm deport device, or through ipmi, or even hp ilo/dell drac/... because, except if you are very lucky, you will break network connectivity during implementation.