Is it possible to have the second nic on my server to be used to access the GUI when the first nic goes down

mason64

Active Member
Apr 18, 2022
46
5
28
Sorry for the long title,

Is it possible to have my second installed nic a 2.5gb card to work for the GUI if the main nic 1gb card goes down

Currently i have my set up like this

Nic 1 - 10.0.0.41/24
gateway - 10.0.0.1

Nic 2 - 10.0.0.51/24

both work just fine for the VM's, but if i unplug the 1st nic it wont let me access the gui via 10.0.0.51:8006,

I have seen videos where they have a different subnet (think thats what its called) where they have 10.0.1.51/24 for example but if i do that i dont get any access to that nic as its not on my same network.

What am i doing wrong or do i need to something different for this. My goal is if nic 1 goes down nic 2 will carry on working for the gui.

Thanks
 
Using two interfaces on the same subnet and assigning each of them an IP address is not a common way to provide redundancy.
In general, bonding is used for this purpose.

Here is an example configuration.

If you want automatic failover, the typical approach is to:

  • put the two NICs into a bond
  • use active-backup mode
  • assign only one management IP to vmbr0 instead of using two separate management IPs

A configuration example would look like this:

Code:
auto lo
iface lo inet loopback

iface eno1 inet manual
iface eno2 inet manual

auto bond0
iface bond0 inet manual
    bond-slaves eno1 eno2
    bond-mode active-backup
    bond-miimon 100
    bond-primary eno1

auto vmbr0
iface vmbr0 inet static
    address 10.0.0.41/24
    gateway 10.0.0.1
    bridge-ports bond0
    bridge-stp off
    bridge-fd 0


With this setup, even if eno1 goes down, the host can continue to use the same management IP through bond0.

Also, please note that active-backup does not combine bandwidth; it only uses one active interface at a time.
 
  • Like
Reactions: UdoB, news and woma