When rebooting machine often network won't work but sometimes it does

thierrybla

Member
Apr 15, 2019
19
0
6
34
Hey people,

I noticed recently that my network sometimes doesn't work when I reboot my machine I run it headless with GPU passthrough but I can see when my GPU VM boots up onto a screen (Windows 10) I can see that the network is just not working and therefor it's not showing the Proxmox GUI either.

I also noticed that if I reboot the machine again, or mutliple times in some cases it will eventually work.. I am clueless.
My machine has 2 network ports with a "bond0 (linux bond)" with "active-backup" enabled between "eth0" and "eth1" with bond primary being "eth1" since it is a 2.5Gb/s port.

I tried to mess around with my network config file but I can't seem to find the issue, I will attach the network file and a screenshot of the network options in de GUI.

FYI: I set everything to DHCP and put a static IP for the machine in my PFsense router.

Thanks in advance for all the help, it's extremely frustrating.

Greetings
 

Attachments

  • interfaces.txt
    interfaces.txt
    872 bytes · Views: 4
  • Screenshot_1.png
    Screenshot_1.png
    15.2 KB · Views: 8
FYI: I set everything to DHCP and put a static IP for the machine in my PFsense router.
* Proxmox VE expects to have a static IP - thus dhcp is not really supported (although in theory setting a static lease and having the proper entries in DNS+/etc/hosts might work)
* still: you want to set dhcp only on the bridge interface, not on the ethernet port, not on the bond

for example on a virtual test-machine:
Code:
auto ens19
iface ens19 inet manual

auto ens20
iface ens20 inet manual

auto bond0
iface bond0 inet manual
    bond-slaves ens19 ens20
    bond-miimon 100
    bond-mode active-backup
    bond-primary ens19

auto vmbr0
iface vmbr0 inet dhcp
    bridge-ports bond0
    bridge-stp off
    bridge-fd 0

could work

I hope this helps!
 
* Proxmox VE expects to have a static IP - thus dhcp is not really supported (although in theory setting a static lease and having the proper entries in DNS+/etc/hosts might work)
* still: you want to set dhcp only on the bridge interface, not on the ethernet port, not on the bond

for example on a virtual test-machine:
Code:
auto ens19
iface ens19 inet manual

auto ens20
iface ens20 inet manual

auto bond0
iface bond0 inet manual
    bond-slaves ens19 ens20
    bond-miimon 100
    bond-mode active-backup
    bond-primary ens19

auto vmbr0
iface vmbr0 inet dhcp
    bridge-ports bond0
    bridge-stp off
    bridge-fd 0

could work

I hope this helps!
Hey Stoiko,

Thanks for your reply, I used this method before (static Ip's on everything) but I had the same problem, upon reboot it just doesn't work untill I reboot it a couple of times and then it would work eventually.

I have a feeling it might be a problem with something else, do you know any other reason why it would behave like this?

P.S. My ETH0 is Intel and my ETH1 is Realtek, could that be a problem?

Thanks in advance!
 
, do you know any other reason why it would behave like this?
not by the description alone - but I'd suggest to check the system-journal after booting (`journalctl -b`) - most issues should be visible there

My ETH0 is Intel and my ETH1 is Realtek, could that be a problem?
In theory an active-passive bond should work with different ethernet NICs - in practice I have run into quite a few issues with various NICs, and realtek specifically has caused some troubles for me.
 
Maybe it's the 2,5gb/s link.

What i mean is, on my intel x550 (10gb/s) nic, it took quite long and sometimes i had to trigger myself the autonegotiation to get the 2,5gb/s link up.
That time i had only a 2,5gb/s switch.

Once i switched up to 10gb/s, it worked instantly and with 1gb/s too. Just the 2,5gb/s took quite long.

Maybe you have an similar issue.

But you can check that, if you fix the linkspeed.
(On my side the x550 didn't supported the fixed 2,5gb/s step that time, only 1 & 10gb/s were fixable and 2,5gb/s worked only through autonegotiation)
But that's the only idea i have.

And keep in mind, it was my issue, doesn't means that it is your issue either.

Cheers
 
Maybe it's the 2,5gb/s link.

What i mean is, on my intel x550 (10gb/s) nic, it took quite long and sometimes i had to trigger myself the autonegotiation to get the 2,5gb/s link up.
That time i had only a 2,5gb/s switch.

Once i switched up to 10gb/s, it worked instantly and with 1gb/s too. Just the 2,5gb/s took quite long.

Maybe you have an similar issue.

But you can check that, if you fix the linkspeed.
(On my side the x550 didn't supported the fixed 2,5gb/s step that time, only 1 & 10gb/s were fixable and 2,5gb/s worked only through autonegotiation)
But that's the only idea i have.

And keep in mind, it was my issue, doesn't means that it is your issue either.

Cheers
Thanks for your input, very interesting.