"pre-up" configuration of /etc/interfaces/network

CZappe

Member
Jan 25, 2021
32
9
13
Santa Fe, NM, USA
www.bti-usa.com
I'm rebuilding network connections on a Proxmox node set up by a previous sysadmin after I replaced a failing NIC. While configuring the new NIC's interfaces in the web GUI, I noticed that there were some customizations that appeared to be deeper than I could touch through the GUI. Specifically the "pre-up" setting:
auto bond0
iface bond0 inet manual
bond-slaves [interface1] [interface2]
bond-miimon 100
bond-mode 802.3ad
bond-xmit-hash-policy layer2

auto vmbr2
iface vmbr2 inet static
address XXXX.XXX.XXX.XXX/24
bridge-ports bond0
bridge-stp off
bridge-fd 0
pre-up ( ip link set [interface1] mtu 9000 && ip link set [interface2] mtu 9000 && ip link set bond0 mtu 9000 )
I need to update the interfaces found under pre-up with the actual interface IDs of the new NIC that I used when setting up bond0. I found that updating the bond0 interface IDs did not subsequently update the pre-up field of vmbr2. If possible, I'd like to continue using the Proxmox GUI to configure network interfaces to keep things tidy, but is this a case where I'd need to edit the file directly using the shell?
 
Hi,
I think it should be enough to add mtu 9000 to the bond itself. Not sure why the pre-up command would be needed. After reloading the interfaces you can check with e.g. ip a to see if it worked and the interfaces have an MTU of 9000. If it doesn't work try setting it on the slaves as well.
 
  • Like
Reactions: EagleTG and CZappe
Hi,
I think it should be enough to add mtu 9000 to the bond itself. Not sure why the pre-up command would be needed. After reloading the interfaces you can check with e.g. ip a to see if it worked and the interfaces have an MTU of 9000. If it doesn't work try setting it on the slaves as well.
That did the trick. I removed the pre-up line from the /etc/network/interfaces and set the MTU of bond0 to 9000. After applying the configuration, the slave interfaces successfully inherited the bond's MTU value. Thanks for the tip!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!