Mittwoch, 17. April 2013

ArchLinux: Setting MTU with netctl

First things first: I'm using a router from my internet provider...
After migrating my wireless connection management on my laptop from wicd to netctl, I felt a huge drop in throughput. I saw that my network adapters were using the default mtu of 1500. And then I remembered, yes, wicd has had a nice box to enter a custom mtu.

After some searching I found out, that netctl can handle custom mtu configurations as well. The 'ExecUpPost' entry in a connection profile handles this. Here's the simple WPA2 profile that I'm using for my home network (check out the line printed in bold letters):
Description=Home Wifi
Connection=wireless
Interface=wlp3s0
Security=wpa
IP='dhcp'
ESSID=my_network_name
AP=74:31:70:A1:3F:51
Key=\"xyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxy
ExecUpPost='/usr/sbin/ip link set wlp3s0 mtu 1492'

I'm sharing it here, in case
a) anyone else encounters the same problem and
b) I forget again, how to set it

Enjoy.