WLAN0 MTU Setting
-
We are using an external WiFi dongle which is wlan0. The dongle defaults to an incorrect MTU setting of 2315, which causes any connection to become unstable. We solved this by using the following command:
sudo ip link set dev wlan0 mtu 1492This corrects the MTU problem. However, on reboot, the VOXL2 seems to be changing it back to the original. Since the entire networking system is non-standard and follows a range of "voxl" type configs and scripts, I tried to follow my way down the rabbit hole and noticed a lot of very nice scripting logic, but nothing specifically telling me where I can permanently change the MTU setting for WLAN0 (or for that matter any other interface).
Can someone shed some light on where I can update the MTU so that on reboot it will not overwrite the setting? I assume there is a wpa_supplicant somewhere, but from what I saw it could easily become overwritten by voxl-wifi.
As an aside, I don't think any WLAN connection should ever have a default MTU larger than 1492 and if needed allow someone to do the proper optimization testing to determine a links real MTU and then use that.
Thanks in advance.
-
So here is the quick fix:
Adding this to .bashrc updates the MTU on boot:
sudo ip link set dev wlan0 mtu 1492
However, it would be nice to really understand the VOXL dhclient scripting so that we can set the MTU properly for that interface.
-
@Mastermind This is the source for voxl-wifi on VOXL2 if you want to take a look: https://gitlab.com/voxl-public/voxl-sdk/utilities/qrb5165-system-tweaks/-/blob/master/scripts/voxl-wifi