Proper way for persistent mtu in 8.10?

Asked by EricDHH

Hello

please tell me the proper way to set persistent mtu for an interface. Before intrepid we can set

auto eth0
#iface eth0 inet dhcp
post-up /sbin/ifconfig $IFACE mtu 1464

or

mtu 1464

or

pre-up ......

and everything was fine. Now every try as described in the manual page will give "malformed line in /etc/network/interfaces" while boot and no result. This ends in

eth0 Link encap:Ethernet Hardware Adresse 00:19:66:5c:ed:d3
          inet Adresse:192.168.1.101 Bcast:192.168.1.255 Maske:255.255.255.0
          inet6-Adresse: fe80::219:66ff:fe5c:edd3/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
                                                                   ^^^^^^^

complete ignorance from the networking scripts.

NiceXMas
Eric

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Evert van Grootheest
Solved:
Last query:
Last reply:
Revision history for this message
EricDHH (ericdhh) said :
#1

Great

the other solution, using of dhclient.conf is smashed too

/etc/dhcp3/dhclient.conf line 22: semicolon expected.
interface-mtu 1464;

UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1

It seems there is no other way than creating own init scripts to get the option running. Thats a big mess or a heavy and annoying bug. Is "Use Windows, you can solve it by registry" the solution? Took a look to Fedora, they have init scripts to rule that.

P.S. My dhcp server is a draytek vigor, no way to workaround this ubuntu client bug there.

byebye
Eric

Revision history for this message
mjlee105 (mjlee105) said :
#2

is there a way to create the persistant usb key via 8.10 that does not act as an live cd installation. if i use a cut cd, or an iso file, I end up with a live version. I have noticed that certain files will not download properly, because of this state.

Revision history for this message
Jan Evert van Grootheest (j-e-van-grootheest) said :
#3

Hi TuxfarmHH,

Your quote from /etc/network/interfaces fails because it is actually wrong. You commented out the iface line.
So now the post-up is related to what exactly?

Possibly you meant to comment out the auto line?

Thanks,
Jan Evert

Revision history for this message
EricDHH (ericdhh) said :
#4

Hmm

yes that was the wrong line, the machine use eth1 without quoted iface line. Looking at the i386 machine now, it use eth0.

auto lo
iface lo inet loopback
mtu 1452

eric@vishnu:~$ ifconfig
eth0 Link encap:Ethernet Hardware Adresse 00:d0:59:ca:e6:25
          inet Adresse:192.168.1.103 Bcast:192.168.1.255 Maske:255.255.255.0
          inet6-Adresse: fe80::2d0:59ff:feca:e625/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1

This cause a "malformed line in interfaces" error while booting. Post and Pre-up seems to be ignored when dhcp is used. How can a mtu set within the network configuration after dhcp cycle?

Bye
Eric

Revision history for this message
Jan Evert van Grootheest (j-e-van-grootheest) said :
#5

hi TuxFarm,

I'm not sure I understand what you mean.
The part that you quote about 'lo' is fine, although the mtu keyword is not needed for lo.

Although I have not tried, I think that the post-up should still work. Also with dhcp.

So there should be a section
---------start quote--------------
iface eth0 inet dhcp
  post-up /sbin/ifconfig eth0 mtu 1452
---------end quote--------------

Would you please copy-paste your entire /etc/network/interfaces? Because the error indicates that there is a typo in it. So I think we should look at what the typo is.

Also, which version of ifup do you have? The output of 'dpkg -l ifupdown' should suffice to answer that.

Thanks.

Revision history for this message
EricDHH (ericdhh) said :
#6

Okay now i'm on the right machine, the laptop file is affected by network manager. Here is no network manager running.

State now, the system has a firewire card so the nic is running under eth1

eric@charon:~$ more /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
#iface eth0 inet dhcp

auto eth1
post-up /sbin/ifconfig eth0 mtu 1464
#iface eth1 inet dhcp

auto eth2
#iface eth2 inet dhcp

auto ath0
#iface ath0 inet dhcp

auto wlan0
#iface wlan0 inet dhcp

My version is
ifupdown 0.6.8ubuntu12

This happens when network is stopped or started:
root@charon:/home/eric# /etc/init.d/networking stop
 * Deconfiguring network interfaces... /etc/network/interfaces:8: misplaced option
ifdown: couldn't read interfaces file "/etc/network/interfaces"
                                                                         [fail]
root@charon:/home/eric# /etc/init.d/networking start
 * Configuring network interfaces... /etc/network/interfaces:8: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
                                                                         [fail]

Please try it at your machine, the pre-up and mtu do the same.

Greetings
Eric

Revision history for this message
Best Jan Evert van Grootheest (j-e-van-grootheest) said :
#7

Hi TuxFarm,

Your interfaces file shows what's wrong... you have commented out all the 'iface' lines. That is the reason ifup/ifdown don't know about them. The 'iface' stanza explains to ifup/ifdown which interfaces exist and in what way they are to be configured (dhcp in your case).

Now, if we look at the warnings, the 'misplaced option' is reported on line 8. This is the first 'post-up' line for eth0. It complains here because it is not in the section about eth0.

You probably want (the begin of) your file to look like this:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
post-up /sbin/ifconfig eth0 mtu 1464

Revision history for this message
EricDHH (ericdhh) said :
#8

Hello

this needs more forensics, i have never touched the interfaces but had a update from hardy to intrepid. Other behaviours cause me a full rollback to hardy, now the interfaces look different.

root@charon:/home/eric# more /etc/network/interfaces
auto lo
iface lo inet loopback

But network is running, seems to come from network manager.

root@charon:/home/eric# ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:66:5c:ed:d3
          inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::219:66ff:fe5c:edd3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:747 errors:0 dropped:0 overruns:0 frame:0
          TX packets:979 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:496836 (485.1 KB) TX bytes:187378 (182.9 KB)
          Interrupt:252 Base address:0x2000

The network-admin in hardy give me no way to set a mtu, i try out your suggest.

Listening on LPF/eth0/00:19:66:5c:ed:d3
Sending on LPF/eth0/00:19:66:5c:ed:d3
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER of 192.168.1.101 from 192.168.1.1
DHCPREQUEST of 192.168.1.101 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.101 from 192.168.1.1
bound to 192.168.1.101 -- renewal in 101942 seconds.
                                                                         [ OK ]
root@charon:/home/eric# ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:66:5c:ed:d3
          inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::219:66ff:fe5c:edd3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1464 Metric:1

Yes so it's okay, thank you!!!

Bye
Eric

Revision history for this message
EricDHH (ericdhh) said :
#9

Thanks janevert, that solved my question.