How can I check the MTU value for my current connection?
In my network connection settings, the MTU is set to automatic and I would like to know wich value was automatic selected for it.
03 Answers
ifconfigto view the current MTU. Example (just searching for MTU):
ifconfig| grep -i MTU UP BROADCAST MULTICAST MTU:1500 Metric:1 UP LOOPBACK RUNNING MTU:65536 Metric:1 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 0 Alternative method:
ip addr | grep mtuFor example:
ip addr | grep mtu
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1300 qdisc fq_codel state UP group default qlen 1000
3: wlp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
4: veth0@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP group default qlen 1000 3 You can read the value from the /sys kernel file system:
cat /sys/class/net/<interface>/mtuReplace <interface> with the name of the interface to query.