Thursday, January 21, 2010

Change MTU for Solaris on e1000g interface

I have Linux and OpenSolaris installed on Virtualbox with Intel Pro/1000 network interface, Changing MTU on Linux worked fine but it failed on Solaris
$ifconfig e1000g1 mtu 9000
ifconfig: setifmtu: SIOCSLIFMTU: e1000g1: Invalid argument

It turns out that Solaris's driver doesn't have jumbo frame enabled by default, you have to enable it manually. Following enables jumbo frame on e1000g1 only.
# 0 is for normal ethernet frames.
# 1 is for upto 4k size frames.
# 2 is for upto 8k size frames.
# 3 is for upto 16k size frames.
# These are maximum frame limits, not the actual ethernet frame
# size. Your actual ethernet frame size would be determined by
# protocol stack configuration (please refer to ndd command man pages)
# For Jumbo Frame Support (9k ethernet packet)
# use 3 (upto 16k size frames)

Now set MTU to 9000 instead of 16K by editing file hostname.e1000g1. hostname.e1000g1 is interface configuration file, the first entry is your ip address or a name, the name must be resolvable in /etc/hosts.
ip/name mtu 9000

#shutdown -i6 to reboot to take effect.

dladm is supposed to be the new method, But it didn't work.
#dladm show-linkprop -p mtu e1000g1
e1000g1 mtu rw 16298 1500 --
#dladm set-linkprop -p mtu=9000 e1000g1
dladm: warning: cannot set link property 'mtu' on 'e1000g1': try again later


  1. you have to disable the network interface first with :
    ifconfig e1000g1 unplumb

  2. that still doesn't get rid of the problem.

    root@coraidnaz:/home/coraid# ifconfig net1 unplumb
    root@coraidnaz:/home/coraid# dladm set-linkprop -t -p mtu=9000 net1
    dladm: warning: cannot set link property 'mtu' on 'net1': link busy

  3. You have to delete the datalink ipadm delete-if e1000g1
    Then set mtu
    then create the new datalink ipadm create-addr -T static -a x.x.x.x/24 e1000g1/v4