Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jul 2015 10:51:42 +0200
From:      Steve Read <steve.read@stormshield.eu>
To:        freebsd-net@freebsd.org
Subject:   Re: lagg of em0/em1 + VLAN = lower MTU?
Message-ID:  <55A37C1E.90804@stormshield.eu>
In-Reply-To: <7CFE75F7566F5789DAD9FBB2@[10.12.30.106]>
References:  <7CFE75F7566F5789DAD9FBB2@[10.12.30.106]>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10.07.2015 15:04, Karl Pielorz wrote:
>
> The MTU on lagg0.10 has shrunk by 4 (size of VLAN tag). Is there a way
> of avoiding that?
No.

Think about what it means.  The MTU on the lagg0 interface is the
largest packet it can send for you or for its VLAN interfaces.  The MTU
on the lagg0.10 (VLAN) interface is the largest packet *it* can send for
you.  The VLAN tag is added to the packet that you give to lagg0.10, and
so the MTU of lagg0.10 must be smaller than the MTU of lagg0.

Crudely speaking, the sequence is:
* The TCP/IP layers create a packet of N bytes (starting with an IP
header), and give them to the "ethernet" layer (lagg0.10) which adds 14
bytes of MAC/ethertype, for a total of N+14.  This must fit into the the
MTU of lagg0.10.
* lagg0.10 then adds four more bytes between the MAC/ethertype and the
IP packet, for a total of N+14+4.  This must fit into the MTU of lagg0.
* lagg0 then sends the packet.

Note that the packet given to lagg0 is four bytes bigger than the packet
given to lagg0.10, and this is always true.  If you make the MTU of
lagg0.10 equal to the MTU of lagg0, then lagg0.10 will end up generating
packets that are oversize for lagg0, and you don't want that.

-- Steve Read



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55A37C1E.90804>