Quick MTU questions about VLANs/QinQ


  • (1) If the parent interface is set to something like 8K, 9K, can I set the children interfaces with the same MTU or do I have set their MTUs smaller manually? 4B less according to the docs (2) The [per VLAN] MTU overhead doesn't add up if their on the same level, right? i.e; on the same parent interface, but (3) what about in another stacked level like QinQ? Would it add up then?

    I just found out to do ping sweeps option of the ping command, it's really useful but better know for sure.

    Thanks!


  • @skilledinept

    VLANs are not separate interfaces. There is only one interface and that is the one that determines the MTU. The only significant difference with a VLAN frame is the contents of the Ethertype/length field and the extra 4 bytes to hold the VLAN tag. A 2nd tag is called QinQ and takes another 4 bytes. MTU refers to the amount of payload a frame could contain. Back in the days when NICs were actually limited to 1500 bytes, the VLAN tags would reduce the space available for the payload. However, frame expansion happened many years ago, to allow space for VLAN and other tags. These days, NICs support jumbo frames with some able to handle around 16 KB. In this situation, the space occupied by VLAN tags can be pretty much ignored.


  • @jknott Got it, thanks! I learned a lot, the most bizarre thing is that on VMware switches the MTU is 20bytes less than the one set. Just for VLAN trunking nothing fancy like VXLAN or anything like that.

    I also got some super weird results on FreeBSD (not pfSense, or firewall distribution at all) where using this hot new command I learned it'd go until certain MTU and pass the traffic, 9000, for instance, but wehn it's "sweeping" (increasing) but starting an echo request right at the same 9000 would say it's too big. …and if you add LACP to the mix things go cray, Britney-Spears-umbrella-meldown-cray. 😂

    e.g;
    ping -D -g 8940 -G 9100 -h 1 -i .2 x.x.x.x
    OK ...blahblah millisec
    OK ...blahblah millisec
    …
    ping -D -s 9000 x.x.x.x
    Too heavy, this ain't UPS grrl. …timeout
    Too heavy, this ain't UPS grrl. …timeout
    …