lagg of em0/em1 + VLAN = lower MTU?
Gary Palmer
gpalmer at freebsd.org
Mon Jul 13 12:06:55 UTC 2015
On Mon, Jul 13, 2015 at 10:29:48AM +0100, Karl Pielorz wrote:
>
>
> --On 13 July 2015 10:51 +0200 Steve Read <steve.read at stormshield.eu> wrote:
>
> > 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.
>
> Ok, I understand all that (despite a bad cold!) - but looking at other
> peoples ifconfig outputs found on google, they show:
>
> - Underlying interface, MTU 1500
> - LAGG interface, MTU 1500
> - VLAN sub interface, MTU 1500
>
> I don't get that - from the same ifconfig-uration I get:
>
> - Underlying interface, MTU 1500
> - LAGG interface, MTU 1500
> - VLAN sub interface, MTU 1496
>
> I thought if cards natively support VLAN's the VLAN tag was handled 'behind
> the scenes' - e.g. if I go setup em3.10 - I wouldn't see the MTU drop to
> 1496.
>
> In fact, I've just done this with em3 on that machine...
>
> ifconfig em3.10 create
> ifconfig em3.10 inet 10.12.13.1 netmask 255.255.255.0
> ifconfig em3 inet 10.13.14.1 netmask 255.255.255.0
>
> ifconfig em3
> em3: flags=8c02<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
>
> ifconfig em3.10
> em3.10: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>
> I realise the packets sent by em3.10 will now be 1504 bytes MTU - and if
> your switch doesn't support VLAN's (and/or can only cope with strict 1500
> byte packets you're probably in trouble) - but the above is doing what I'd
> "expect" to happen for the LAGG case.
>
> I could understand losing the 4 bytes maybe if the card didn't support
> native VLAN's (or having to do it if your switch can't cope with 1500+4
> byte frames) - but not if they're supported.
>
> > 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.
>
> Yes, I get that - but as I said I thought 'native VLAN' tagging was handled
> differently - as shown by the example above with em3.
>
> afaik - Lagging interfaces has no effect on MTU, but something behind the
> scenes is treating lagg0.10 differently from, say em0.10 as far as MTU
> configuration goes?
>
> Ultimately the question is - why are other people running the same ifconfig
> (admittedly on different FreeBSD versions / cards) and getting what I'd
> expect [a working system], but I don't?
Have you read the HARDWARE section of vlan(4)?
Regards,
Gary
More information about the freebsd-net
mailing list