You are not logged in.

#1 2009-03-22 12:01:36

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

enabling jumbo frames at boot [SOLVED]

I'd like to use a non-standard mtu size for my eth0 (the socalled 4k jumbo frame is best for my hardware).  I don't know the Arch way to do this on boot.  What is the Arch equivalent of Debian's /etc/network/interfaces?  Under Debian, all I needed to do was add a line to the /etc/network/interfaces that read simply, "mtu 4000" and this got taken care of when eth0 came up.  Right now the only way I can do this under Arch is:

# ifconfig eth0 mtu 4000

I know I can write a script to do this, but I'm sure there's a better way.

Thanks!

Last edited by graysky (2009-04-23 20:51:30)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-03-23 21:06:02

Leffe
Member
Registered: 2006-05-30
Posts: 47

Re: enabling jumbo frames at boot [SOLVED]

I'm sure you can just stick the ``mtu 4000'' in the eth0 configuration in /etc/rc.conf; unless you are using DHCP.

Offline

#3 2009-03-24 02:43:04

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: enabling jumbo frames at boot [SOLVED]

graysky wrote:

I'd like to use a non-standard mtu size for my eth0 (the socalled 4k jumbo frame is best for my hardware).  I don't know the Arch way to do this on boot.  What is the Arch equivalent of Debian's /etc/network/interfaces?  Under Debian, all I needed to do was add a line to the /etc/network/interfaces that read simply, "mtu 4000" and this got taken care of when eth0 came up.  Right now the only way I can do this under Arch is:

# ifconfig eth0 mtu 4000

I know I can write a script to do this, but I'm sure there's a better way.

Thanks!

You can set the line:

ifconfig eth0 mtu 4000

in the file /etc/rc.local. It gets executed after all other init scripts.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#4 2009-03-24 19:46:20

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: enabling jumbo frames at boot [SOLVED]

@mektub - thanks, this is what I've been doing, but I thought there might be a more elegant way to do it smile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2009-03-24 19:54:52

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: enabling jumbo frames at boot [SOLVED]

Leffe's suggestion works for static IPs. If you're using DHCP, install netcfg and use the IFOPTS profile parameter.

Offline

#6 2009-04-18 21:39:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: enabling jumbo frames at boot [SOLVED]

@tomk - yeah, when I added the ifconfig line to my /etc/rc.local it didn't set the mtu parameter.  Can you elaborate on the netcfg/IFOPTS solution you're proposing?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-04-19 08:15:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: enabling jumbo frames at boot [SOLVED]

Read the Network Profiles wiki page, install netcfg, read the profile examples in /etc/network.d/examples.

Offline

#8 2009-04-23 19:50:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: enabling jumbo frames at boot [SOLVED]

Thanks for the link tomk.  I checked out the example and wiki page, but none of them had an example setting an MTU size...?  Googling it came up with nothing useful either.

Last edited by graysky (2009-04-23 20:06:17)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2009-04-23 19:58:16

bushmannt
Member
From: Charlston, SC
Registered: 2008-08-07
Posts: 7
Website

Re: enabling jumbo frames at boot [SOLVED]

it might be a timing issue; if your interfaces arent fully up before you hit rc.local, then it's probably not gonna work.  did you try to put a sleep command in rc.local before setting the mtu?  not for production, but just to see if it's a timing issue.  is your networking script executing in the background or foreground?

Offline

#10 2009-04-23 20:08:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: enabling jumbo frames at boot [SOLVED]

@bushmannt - good point, I have it backgrounded because it takes a good 10 s for some reason.  Perhaps I'd have better luck w/ a static setting speed-wise?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2009-04-23 20:23:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: enabling jumbo frames at boot [SOLVED]

I think I have it set now without using netcfg.  I went to a static config, entered my dns's into /etc/reslov.conf and added an mtu 4000 line to my eth1 line in my /etc/rc.conf

eth1="eth1 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255 mtu 4000"
#eth1="dhcp"
INTERFACES=(eth1)

EDIT: Nope... this didn't stay on a reboot.  The mtu size was correctly set, but somehow my DNS's aren't getting used sad

Last edited by graysky (2009-04-23 20:29:08)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2009-04-23 20:50:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: enabling jumbo frames at boot [SOLVED]

GOT IT FINALLY.

/etc/rc.local

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
/sbin/ifconfig eth1 mtu 4000

/etc/rc.conf (relevant section)

eth1="eth1 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth1)
gateway="default gw 192.168.1.1"
ROUTES=(gateway)

/etc/reslov.conf

search my.ips.net
nameserver 1
nameserver 2

(Replace the myisp.net with your ISP and the 1 and 2 with your DNS's)

Finally, /etc/conf.d/dhcpcd needed to be tweaked to keep the dhcpcd from overwriting my /etc/reslov.conf

#
# Arguments to be passed to the DHCP client daemon
#

#DHCPCD_ARGS="-q"
DHCPCD_ARGS="-C resolv.conf -q"

Reference: this wiki page


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#13 2009-04-24 05:58:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: enabling jumbo frames at boot [SOLVED]

Uhmm.. you're using static addressing now, so dhcp configuration is irrelevant.

Re netcfg, I know that there is no example that includes an mtu setting, but there is an example with an IFOPTS line, and you've already been told that the IFOPTS line is what you should use for the mtu setting.

Anyway... glad you got it working. smile

Offline

Board footer

Powered by FluxBB