From owner-freebsd-net@freebsd.org Mon Jul 13 09:29:49 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 8B3663FAC for ; Mon, 13 Jul 2015 09:29:49 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from mail.tdx.com (mail.tdx.com [62.13.128.18]) by mx1.freebsd.org (Postfix) with ESMTP id 5A04110D4 for ; Mon, 13 Jul 2015 09:29:48 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from [10.12.30.106] (vpn01-01.tdx.co.uk [62.13.130.213]) (authenticated bits=0) by mail.tdx.com (8.14.3/8.14.3/) with ESMTP id t6D9TlFE017703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Jul 2015 10:29:48 +0100 (BST) Date: Mon, 13 Jul 2015 10:29:48 +0100 From: Karl Pielorz To: Steve Read , freebsd-net@freebsd.org Subject: Re: lagg of em0/em1 + VLAN = lower MTU? Message-ID: In-Reply-To: <55A37C1E.90804@stormshield.eu> References: <7CFE75F7566F5789DAD9FBB2@[10.12.30.106]> <55A37C1E.90804@stormshield.eu> X-Mailer: Mulberry/4.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 09:29:49 -0000 --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? -Karl