# Gentoo script support for setting eth0 MTU? [solved]

## floTTes

Is there any way to set my MTU on net.eth0 without modifying the original scripts? I haven't found a config variable so far ... Maybe i've just overlooked it.

Thanks!

----------

## jpl888

nano -w /etc/conf.d/net

In the section where you specify eth0's address e.g 192.168.1.1/24

add mtu x where "x" is the size of the mtu you want.

Thats how I did it to get mtu to 9000 for Gigabit perfomance.

----------

## kottlettstanze

Just search /etc/conf.d/net for mtu (line 121 for me)  :Smile:  At least in a recent baselayout, there is a variable for it.

----------

## floTTes

HM ... I don't find anything related in my net.example ... strange, maybe i need some glasses!  :Shocked:  No problem, it should look like this, ey?

```
config_eth0=( "dhcp mtu 1454" )
```

----------

## UberLord

That's not going to work. You'll need baselayout-1.12.0_pre7-r1

```
mtu_eth0="1454"
```

But it will get set after a dhcp address is obtained, which may be bad for dhcp. _pre8 will set MTU before and after dhcp  :Smile: 

----------

## floTTes

Thanks for all your help, but i guess i'll stay with my stable baselayout for a while. 1.12.0_pre8-r1 looks totally broken to me ... no local network device and some other heavy glitches, at least 2-3 startup scripts won't be started.  :Shocked: 

P.S.: About your scripts: No offense, dude! Sonic owns. Still playing Sega Smash Hits on my Dreamcast!  :Twisted Evil: 

----------

## rdvrey

I am trying to do something simalar but to no avail:

mtu_eth0="1470"

mtu_eth1="1470"

mtu_eth2="1470"

config_eth0=( "10.0.0.1 netmask 255.0.0.0")

config_eth1=( "192.168.196.6 netmask 255.255.255.0")

config_eth2=( "192.168.0.1 netmask 255.255.255.0")

after this I do:

 /etc/init.d/net.eth1 restart

BUT :

bridge1 conf.d # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:10:4B:30:5F:93

          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:16554 errors:0 dropped:0 overruns:0 frame:0

          TX packets:15929 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:2139031 (2.0 Mb)  TX bytes:12597865 (12.0 Mb)

          Interrupt:11 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:50:BF:98:C6:FF

          inet addr:192.168.196.6  Bcast:192.168.196.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                      <------------------------------------------------------

          RX packets:76989 errors:0 dropped:0 overruns:0 frame:0

          TX packets:70091 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:18945043 (18.0 Mb)  TX bytes:12093413 (11.5 Mb)

          Interrupt:10 Base address:0x6400

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Any ideas ?

regards

Robert

----------

## rdvrey

SOLVED

That version is still masked after unmasking copying the new init.d scripts it worked

Robert

----------

