How to change the value of MTU?

I want to change the value of mtu of devices greater than 1500 bytes, but when I put a value greater than 1500 byte this message appeared:

the mtu must not exceed the parent device mtu of 1500 byte

How can change the MTU value greater than 1500?

what it says, change it on the parent device 1st ?

1 Like

This point I didn't understand it, what is parent device and how to change on parent device ?

I think is more of a information.

And the hardware you have must be able to handle jumbo frames!

Have you tried in Luci to apply unchecked?

But easiest is probably to change in uci code or directly in config file for dhcp I think if is located, or maybe in the network file?

1 Like

eth0 would be the parent device for the eth0 VLANs

parent is the actual (often, but not always) hw sitting underneath the device you're trying to change.

2 Likes
root@OpenWrt:/# ifconfig
eth0      Link encap:Ethernet  HWaddr E8:94:F6:0F:54:B2
          inet6 addr: fe80::ea94:f6ff:fe0f:54b2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2546 errors:0 dropped:4 overruns:0 frame:0
          TX packets:1874 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:436813 (426.5 KiB)  TX bytes:400212 (390.8 KiB)

eth0.1    Link encap:Ethernet  HWaddr E8:94:F6:0F:54:B7
          inet addr:10.10.10.1  Bcast:10.10.10.255  Mask:255.255.255.0
          inet6 addr: fd58:841:d787::1/60 Scope:Global
          inet6 addr: fd58:841:d787:3::1/64 Scope:Global
          inet6 addr: fd58:841:d787:6::1/63 Scope:Global
          inet6 addr: fd58:841:d787:1::3de/128 Scope:Global
          inet6 addr: fd58:841:d787:1::1/64 Scope:Global
          inet6 addr: fd58:841:d787:4::1/62 Scope:Global
          inet6 addr: fd58:841:d787:7::1/64 Scope:Global
          inet6 addr: fd58:841:d787::3de/128 Scope:Global
          inet6 addr: fe80::ea94:f6ff:fe0f:54b7/64 Scope:Link
          inet6 addr: fd58:841:d787:2::1/63 Scope:Global
          inet6 addr: fd58:841:d787:5::1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2026 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:298514 (291.5 KiB)  TX bytes:276165 (269.6 KiB)

eth0.2    Link encap:Ethernet  HWaddr E8:94:F6:0F:54:BD
          inet addr:10.10.20.33  Bcast:10.10.20.255  Mask:255.255.255.0
          inet6 addr: fe80::ea94:f6ff:fe0f:54bd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:501 errors:0 dropped:0 overruns:0 frame:0
          TX packets:414 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:70299 (68.6 KiB)  TX bytes:104167 (101.7 KiB)

When I run ifconfig, the MTU of interfaces is 1500 byte , how can I change it to more than 1500 bytr knowing that I change tham from /etc/config/network but still in ifconfig 1500 byte.

if your nic supports ( ! ) then to set mtu to 9000 bytes for example
ip link set dev eth0 mtu 9000
then you can set any child interface
ip link set dev eth0.1 mtu 9000

again, have to highlight, if the interface supports larger than 1500 bytes mtu values. it is not always possible.

when you say changed in config file what exactly you did? can you show your /etc/config/network?

root@OpenWrt:/# ip link set dev eth0 mtu 9000
[ 1801.116928] eth0: mtu greater than device maximum
ip: SIOCSIFMTU: Invalid argument
root@OpenWrt:/# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd58:0841:d787::/48'

config atm-bridge 'atm'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'
        option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'a'
        option tone 'av'
        option ds_snr_offset '0'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option device 'eth0.1'
        option ipaddr '10.10.10.1'
        option broadcast '10.10.10.255'

config device
        option name 'dsl0'
        option macaddr 'e8:94:f6:0f:54:b3'
        option mtu '5000'

config interface 'wan'
        option proto 'dhcp'
        option device 'eth0.1'

config interface 'wan6'
        option device '@wan'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '2 4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5 6t'
        option vid '2'

config device
        option name 'eth0.2'
        option type '8021q'
        option ifname 'eth0'
        option vid '2'
        option macaddr 'E8:94:F6:0F:54:Bd'
        option mtu '5000'

config interface 'vlan2'
        option proto 'static'
        option device 'eth0.2'
        option netmask '255.255.255.0'
        option ipaddr '10.10.20.33'

config device
        option name 'eth0.1'
        option type '8021q'
        option ifname 'eth0'
        option vid '1'
        option macaddr 'E8:94:F6:0F:54:B7'
        option mtu '5000'

config device
        option name 'eth0'
        option macaddr 'E8:94:F6:0F:54:B2'
        option mtu '5000'

The problem is I can't set value more than the parent device MTU of 1500 byte.
But, I didn't know how to change parent device MTU also.

ok this is the part which i highlighted twice ... your device does not support 9000 mtu. it is not possible to increase from 1500 to 9000, your hardware does not allow it. you cannot do anything further,

Thank you so much. :blush:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.