HOW TO Change the default Maximum Transmission Unit (MTU) Size

The maximum transmission unit (MTU) is the size (in bytes) of the largest protocol data unit that it can pass onwards. MTU parameters usually appear in association with a communications interface (NIC, serial port, etc.). The MTU may be fixed by standards (as is the case with Ethernet) or decided at connect time (as is usually the case with point-to-point serial links).

A higher MTU brings greater efficiency because each packet carries more user data while protocol overheads, such as headers or underlying per-packet delays remain fixed, and higher efficiency means a slight improvement in bulk protocol throughput. However, large packets can occupy a slow link for some time, causing greater delays to following packets and increasing lag and minimum latency. For example, a 1500 byte packet, the largest allowed by Ethernet at the network layer (and hence most of the Internet), would tie up a 14.4k modem for about one second.

OK, enough for MTU overview,you can read more on Wikipedia pages.

Now here are the step by step to increase the MTU size, on Solaris of course.

by default, if you type “ifconfig -a” you will get the MTU size is 1500:

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.32.16.1 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:73:25:e8
e1000g1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
inet 10.32.16.2 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:6a:34:ae
bash-3.00#

you can change MTU size by running “ifconfig <interface> mtu <mtu_size>”, but it doesn’t work for e1000g if the max default is still 1500. try and you will got error like this:

bash-3.00# ifconfig e1000g1 mtu 8000
ifconfig: setifmtu: SIOCSLIFMTU: e1000g1: Invalid argument

{tried on bge interface also on M5000 and the result still same:
root@server # ifconfig bge2 mtu 8000
ifconfig: setifmtu: SIOCSLIFMTU: bge2: Invalid argument

{using dladm command also failed:
root@server # dladm set-linkprop -p mtu=8000 bge2
dladm: warning: invalid link property ‘mtu’

READ from this link and this link, then finally I understand that changing MTU size is different for each interface types. and here are the conclusion:

Change MTU size for E1000g (Intel PRO/1000 Gigabit family device driver) interface:

Scenario:

I have 2 interface; e1000g0 and e1000g1. I need to change the MTU size to 8000  for e1000g1 interface only.

1.  Check current config with “ifconfig -a”

2. edit file “/kernel/drv/e1000g.conf”

go to “MaxFrameSize” line, change the zero values number like this:

MaxFrameSize=0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
# 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)

Note: Above configuration only affect to e1000g1.

If you want to change MTU size to all interface, just simply change all zero values with 1,2,3 as you need:

Example: MaxFrameSize=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2;

then, all your interface will support 8K MTU.

3. reboot

4. check the result with “ifconfig -a | grep mtu”

bash-3.00# ifconfig -a | grep mtu
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
e1000g0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
e1000g1: flags=1201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 8106 index 3
bash-3.00#

5. After reboot, the MTU size is 8106. if you want 8000 mtu size, then edit file “/etc/hostname.e1000g1”:

bash-3.00# cat /etc/hostname.e1000g1
solaris10 mtu 8000

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.32.16.1 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:73:25:e8
e1000g1: flags=1201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS,FIXEDMTU> mtu 8000 index 3
inet 10.32.16.2 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:6a:34:ae

Change MTU size for bge (Broadcom Gigabit Ethernet device driver) interface:

bash­3.00# grep bge /etc/path_to_inst
“/pci@0,600000/pci@0/pci@8/pci@0/network@2” 0 “bge”
“/pci@0,600000/pci@0/pci@8/pci@0/network@2,1” 1 “bge”
­

bash­3.00# cat /etc/system
set bge:bge_jumbo_enable = 1
­

bash­3.00# cat /platform/sun4u/kernel/drv/bge.conf
default_mtu=9000;
name=”bge” parent=”/pci@0,600000″ unitaddress=”2″ default_mtu=9000;

bash­3.00# reboot
bash­3.00# ifconfig ­-a

Change MTU size for ce (Cassini Gigabit-Ethernet device driver) interface:

Go to here

5 responses to “HOW TO Change the default Maximum Transmission Unit (MTU) Size

  1. Hi, Good page.

    Jumbo – you don’t need any /etc/system entry : hit your driver’s config only

    in bge.conf;

    default_mtu = 9000;

    That will set jumbo frames for all interfaces on boot making individual interface entries redundant and possibly requiring adjustment via manual ifconfig or hostname.ifid mtu directive

    in my bge.conf I use;
    # jumbo
    default_mtu = 1500;
    # jumbo@stor-net IF bge3
    name=”bge” parent=”/pci@1d,700000″ unit-address=”2,1″ default_mtu=9000;

    This keeps my other interface mtu size where it should be at 1500

  2. On igb NICs:
    ===
    root@openindiana:~# grep -v ^# /kernel/drv/igb.conf
    default_mtu = 9000;
    tx_ring_size =4096
    rx_ring_size =4096
    mr_enable =1
    ===

  3. Pingback: Maximizing rsync performance between Linux and Solaris – Schadenfreude

  4. I have 2 e1000g devices with both set in the /kernel/drv/e1000g.conf file for a max MTU of 3 or 1500-16298

    1 NIC plays nice and it allows the larger MTU. The other NIC, no matter what i do will not go above 1500 MTU:

    Any ideas, Thank you!

    root@keeper:/volumes# dladm show-linkprop -p mtu e1000g0
    LINK PROPERTY PERM VALUE DEFAULT POSSIBLE
    e1000g0 mtu rw 9000 1500 1500-16298
    root@keeper:/volumes# dladm show-linkprop -p mtu e1000g1
    LINK PROPERTY PERM VALUE DEFAULT POSSIBLE
    e1000g1 mtu rw 1500 1500 1500
    root@keeper:/volumes#

  5. With 3 e1000g interfaces I am still experiencing this problem on 2 out of the 3 interfaces. My add-on PCI-E Intel card displays the correct MTU range of 1500-16298.

    The 2 built-in Intel interfaces show only MTU of 1500.

    my /kernel/drv/e1000g.conf and /var/lib/dpkg/alien/sunwintgige/reloc/kernel/drv/e1000g.conf (If I do not set this one too, the above conf file gets overwritten) are set to: MaxFrameSize=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3;

    And root@keeper:/kernel/drv# dladm show-link LINK CLASS MTU STATE BRIDGE OVER e1000g2 phys 1500 up — — e1000g0 phys 9000 up — — e1000g1 phys 1500 up — —

    How do I get the e1000g driver to allow max MTU on all 3 e1000g interfaces?

    Thank you, Matthew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s