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

CZappe

Active Member
Jan 25, 2021
36
12
28
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!