You are not logged in.

#1 2006-11-02 19:53:26

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

how to change MTU?

hey all. how i can change the MTU permanantly?

Offline

#2 2006-11-02 20:06:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: how to change MTU?

probably just add the 'mtu 1420' or whatever... to the line in rc.conf for your interface.
that line is just fed to ifconfig i believe.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2006-11-02 20:15:20

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

cactus wrote:

probably just add the 'mtu 1420' or whatever... to the line in rc.conf for your interface.
that line is just fed to ifconfig i believe.


i tried that after searching the forums for the answer. someone suggested adding "mtu xxxx" to the eth0 line in rc.conf. but that just killed my net.

Offline

#4 2006-11-02 21:22:27

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: how to change MTU?

where did you add it into the eth0 line?
it should look like..

eth0="eth0 10.128.128.50 netmask 255.255.255.0 broadcast 10.128.128.255 mtu 1420"

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2006-11-02 21:42:47

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

cactus wrote:

where did you add it into the eth0 line?
it should look like..

eth0="eth0 10.128.128.50 netmask 255.255.255.0 broadcast 10.128.128.255 mtu 1420"

ahh, ok. i did it wrong then (n00b!) hehe

i did it like eth0="dhcp" "mtu 1492"

lemme try the correct way, ill get back to ya!.

Offline

#6 2006-11-02 21:49:51

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: how to change MTU?

oh. if your doing dhcp.. i don't know if that will work..
hmm...


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#7 2006-11-02 21:54:13

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

nope, didnt work. the search continues.

Offline

#8 2006-11-02 21:58:42

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: how to change MTU?

Echo the desired value to /sys/class/net/eth0/mtu (add "echo value > /sys/class/net/eth0/mtu" to /etc/rc.local to make it permanent).

Creating an iptables rule should also work, but that's a bit more complicated solution.

Offline

#9 2006-11-02 22:26:00

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

lucke wrote:

Echo the desired value to /sys/class/net/eth0/mtu (add "echo value > /sys/class/net/eth0/mtu" to /etc/rc.local to make it permanent).

Creating an iptables rule should also work, but that's a bit more complicated solution.


ok, that didnt work. it didnt kill my net this time, but ifconfig says MTU is still at 1500. there is also an error line at bootup. it goes by so fast (arch boots soo FAST i luv it!) that i cant read it all. but i did catch that its refering to the echo line in /etc/rc.local.

heres how i have it entered in rc.local

!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

#set mtu
"echo 1492 > /sys/class/net/eth0/mtu"

does that look right?

Offline

#10 2006-11-02 22:27:50

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: how to change MTU?

there shouldn't be any quotes around the echo line scarney


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#11 2006-11-02 22:28:52

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

doh! grr. ok lemme fix that heh.

Offline

#12 2006-11-02 22:29:13

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: how to change MTU?

Remove the "".

Execute it normally in command line (as root) to see whether it actually works before rebooting.

If you have bash set up not to overwrite files with >, use >> instead.

Offline

#13 2006-11-02 22:35:13

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

weee, it works!. removing the quotes did it, you guys are the best.

Offline

#14 2006-11-03 19:52:00

nazgoul
Member
From: Germany/Greece
Registered: 2006-08-09
Posts: 12

Re: how to change MTU?

if I'm not mistaken you can also set it via ifconfig

Offline

#15 2006-11-03 20:01:44

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: how to change MTU?

Now that you mention - actually, you're right.

It's actually as easy as executing "ifconfig eth0 mtu value". Seems we were too stuck on setting it while putting the interface up (vide cactus' suggestion) ;-)

Offline

#16 2006-11-03 20:37:23

scarney
Member
From: Wisconsin, US
Registered: 2006-07-11
Posts: 173

Re: how to change MTU?

ifconfig sets it temporarily. once ya reboot, it resets back to 1500.

Offline

#17 2006-11-03 20:45:32

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: how to change MTU?

Well, it's the same with changing mtu in /sys - that's why one should add either of those lines to /etc/rc.local, in order to make it permanent.

Offline

Board footer

Powered by FluxBB