Results 1 to 6 of 6

Thread: Permanent MTU change (but no interface in config)

  1. #1
    Join Date
    Apr 2006
    Beans
    136

    Permanent MTU change (but no interface in config)

    Ubuntu Hardy with gigabit lan.. I can set the mtu manually by:

    sudo ifconfig eth0 mtu 9000

    And this works fine, but I want it to always start with that default mtu.

    I've been told to add mtu 9000 to the /etc/network/interfaces file, but mine doesn't have any values for eth0 in there! Here is the contents of my file, what else must I put in to get eth0 to default to mtu 9000?

    Code:
    auto lo
    iface lo inet loopback
    My network is setup through DHCP if this matters...

  2. #2
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Permanent MTU change (but no interface in config)

    How did you originally configure your eth0 interface? If you used Network Manager, it should have saved its settings for eth0 in your /etc/network/interfaces file. Did you set it up entirely manually maybe?

    You could try adding eth0 to your interfaces file manually with:
    Code:
    iface eth0 inet dhcp
    mtu 9000
    auto eth0
    If you then do:
    Code:
    sudo ifdown eth0
    sudo ifup eth0
    Then it should be using your new MTU value, because ifdown/ifup use that interface file. And having eth0 in your interfaces file should make the new MTU value stick on a reboot.

    P.S. "Gigabit LAN"??? I'm envious.
    Last edited by caljohnsmith; August 29th, 2008 at 08:13 PM.

  3. #3
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Permanent MTU change (but no interface in config)

    I have a question. How do you throttle back to 1500 MTU for internet destinations? Do you need to? I know that 10/100 Ethernet has a max of 1500 MTU. How is that compatibility maintained?

    I ask because my next network will be gig Ethernet. Can you point me towards some information please.

    Thanks in advance,

    Red

  4. #4
    Join Date
    Apr 2006
    Beans
    136

    Re: Permanent MTU change (but no interface in config)

    I've tried adding

    Code:
    auto eth0
    mtu 9000
    and this just hangs the bootup process... so I have to delete those lines. How can I get this accomplished? I don't see any way to do it through network manager...

  5. #5
    Join Date
    Apr 2006
    Beans
    136

    Re: Permanent MTU change (but no interface in config)

    Decided to update this post as I ran into the problem a year later...

    Solution:

    Create a file, I called it mtu in /etc/network/if-up.d/ :
    Code:
    sudo gedit /etc/network/if-up.d/mtu
    Add the following to it (Set the mtu to your desired, I enabled jumbo frames):
    Code:
    #!/bin/sh
    ifconfig eth1 mtu 9000
    Make the file executable:
    Code:
    sudo chmod 755 /etc/network/if-up.d/mtu
    Reboot, and all should be well.

  6. #6
    Join Date
    Dec 2006
    Beans
    1,133
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Permanent MTU change (but no interface in config)

    Quote Originally Posted by caljohnsmith View Post
    How did you originally configure your eth0 interface? If you used Network Manager, it should have saved its settings for eth0 in your /etc/network/interfaces file. Did you set it up entirely manually maybe?
    With what version did Network Manager start using the /etc/network/interfaces file? That is a big change and I haven't seen any documentation of it anywhere.
    There are no dumb questions, just dumb answers.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •