Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Looks like the mtu option is not available when using the manual method (see interfaces(5)). So, here's what is supposed to work (incorporating the feedback from the comments):

auto lo
iface lo inet loopback

# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
   # nothing here

iface eth1 inet manual
   # nothing here

# Bridge setup
auto br0
iface br0 inet static
   bridge_ports eth0 eth1
   address 192.168.88.2
   ...
   post-up ifconfig eth0 mtu 9000 && ifconfig eth1 mtu 9000

Using the up (or in this case post-up) option we can specify our own command to run during (of after) the time the interface is brought up.

share|improve this answer
    
The bridge itself just seems to take the smallest MTU from it's set of hosted devices and uses that. MTU on br0 in the interfaces file causes the networking to fail to start on boot. –  RoboJ1M Apr 9 '13 at 8:57
    
However I did manage to solve it last night, using almost exactly this solution. I added: post-up ifconfig eth0 mtu 9000 at the end of the br0 section, twice, both for eth0 and eth1. –  RoboJ1M Apr 9 '13 at 8:58
    
@RoboJ1M Thanks, I've updated my answer. –  gertvdijk Apr 9 '13 at 9:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.