From owner-freebsd-net@freebsd.org Mon Jul 13 12:06:55 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0499999338 for ; Mon, 13 Jul 2015 12:06:54 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7B51920 for ; Mon, 13 Jul 2015 12:06:54 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZEcVX-000Alw-1y; Mon, 13 Jul 2015 13:06:51 +0100 Date: Mon, 13 Jul 2015 13:06:51 +0100 From: Gary Palmer To: Karl Pielorz Cc: Steve Read , freebsd-net@freebsd.org Subject: Re: lagg of em0/em1 + VLAN = lower MTU? Message-ID: <20150713120651.GA68542@in-addr.com> References: <7CFE75F7566F5789DAD9FBB2@[10.12.30.106]> <55A37C1E.90804@stormshield.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2015 12:06:55 -0000 On Mon, Jul 13, 2015 at 10:29:48AM +0100, Karl Pielorz wrote: > > > --On 13 July 2015 10:51 +0200 Steve Read 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 metric 0 mtu 1500 > > ifconfig em3.10 > em3.10: flags=8843 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