By default OpenWRT creates LAN1..4 and WAN as part of the DSA setup. All of those have an MTU of 1500 except the underlying eth0 which has an MTU of 1504.
I would like to change e.g. the WAN MTU because my ISP uses PPPoE so I should reduce the MTU to 1492 or better yet increase the WAN MTU to 1508 so I can transmit "standard" 1500 mtu size packets.
Since its DSA I tried changing the ETH0 MTU, which I can only increase to 1510? but the underlying WAN or any LAN can't be changed: a number higher than 1500 gives:
RTNETLINK answers: Invalid argument
but a lower number says:
RTNETLINK answers: Not supported
Looking at the code for the mtk_soc and the mt7530 it seems that both support up to 2K (minus some header overhead), so why can't I make the changes?
root@gw:~# ip a s | grep -e ^2 -e ^3
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc fq_codel state UP group default qlen 1000
3: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
root@gw:~# ip link set wan mtu 1515
root@gw:~# ip a s | grep -e ^2 -e ^3
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc fq_codel state UP group default qlen 1000
3: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1515 qdisc noqueue state UP group default qlen 1000
For me on my Xiaomi Redmi Router AC2100
with MediaTek MT7621 ver:1 eco:3
running OpenWrt 21.02.1
it is possible to change the mtu for wan....
oh, I have installed, don't know if it matters:
root@gw:~# opkg list-installed|grep ip-full
ip-full - 5.11.0-3
But I really dont understand why u try to lower the mtu for eth0 - that would affect also the mtu of all child interfaces.
the mtu for PPPoE must only be lowered for the wan interface - this is at best done with:
uci add network device # =cfg100f15
uci set network.@device[-1].name='wan'
uci set network.@device[-1].mtu='1492'
uci set network.@device[-1].mtu6='1492'
or in luci u should look at network > devices tab
1 Like
Thanks for checking. Maybe something changed in the recent updates?
I did a fresh git pull; feeds update; make clean etc. Still the same problem.
I don't think I should need IP-full, but I have that anyway ip-full-5.14.0.2 running latest snapshot and kernel 5.10.76.
I can change the number on de Luci devices page and it will show anything between 576 - 9000. However IP LINK will still show 1500. I believe what IP is reporting over what Luci is reading from the config file.
BTW: the reason I tried eth0 was because initially I tried a higher number than 1500 and since eth0 MTU was set to 1504 I figured maybe a child is not allowed to have a higher number.
I did a downgrade to kernel 5.4 and I could change the MTU (without the need for ip-full). Up and down. This also has the DSA driver already so something most have changed with version 5.10.
I will try to investigate this problem further.