I have to gigabit network interfaces which I have bridged.
/etc/network/interfaces is:
auto lo
iface lo inet loopback
# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
iface eth1 inet manual
# Bridge setup
auto br0
iface br0 inet static
bridge_ports eth0 eth1
address 192.168.88.2
broadcast 192.168.88.255
netmask 255.255.255.0
gateway 192.168.88.254
dns-nameservers 192.168.88.254
But the MTU is only 1500
myth@myth:~$ traceroute --mtu 192.168.88.1
traceroute to 192.168.88.1 (192.168.88.1), 30 hops max, 65000 byte packets
1 RoboStation.local (192.168.88.1) 0.278 ms F=1500 0.279 ms 0.287 ms
If I run the following commands:
myth@myth:~$ sudo ifconfig eth0 mtu 9000
myth@myth:~$ sudo ifconfig eth1 mtu 9000
myth@myth:~$ traceroute --mtu 192.168.88.1
traceroute to 192.168.88.1 (192.168.88.1), 30 hops max, 65000 byte packets
1 RoboStation.local (192.168.88.1) 0.407 ms F=9000 0.422 ms 0.383 ms
Now I have MTU of 9000 and transfers to my NAS are MUCH faster
But, I thought I would just do this in the /etc/network/interfaces file:
auto lo
iface lo inet loopback
# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
mtu 9000
iface eth1 inet manual
mtu 9000
# Bridge setup
auto br0
iface br0 inet static
bridge_ports eth0 eth1
address 192.168.88.2
broadcast 192.168.88.255
netmask 255.255.255.0
gateway 192.168.88.254
dns-nameservers 192.168.88.254
mtu 9000
But the network just fails to come up at boot
I removed the mtu 9000
from the br0 section and the PC boots with the network coming up, but the MTU is still 9000
How do I set the MTU to 9000 for eth0 and eth1 at boot so the bridge runs at 9000?
Also is there a way to test /etc/network/interfaces without rebooting all the time?
Best Answer
Looks like the
mtu
option is not available when using themanual
method (seeinterfaces(5)
). So, here's what is supposed to work (incorporating the feedback from the comments):Using the
up
(or in this casepost-up
) option we can specify our own command to run during (of after) the time the interface is brought up.