From owner-freebsd-net@FreeBSD.ORG Wed Aug 29 11:05:56 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C29B16A419 for ; Wed, 29 Aug 2007 11:05:56 +0000 (UTC) (envelope-from ivsan@ngs.ru) Received: from homos.ksn.ru (mx.ksn.ru [80.242.64.14]) by mx1.freebsd.org (Postfix) with ESMTP id 514B713C469 for ; Wed, 29 Aug 2007 11:05:54 +0000 (UTC) (envelope-from ivsan@ngs.ru) Received: (qmail 21530 invoked by uid 2529); 29 Aug 2007 17:38:55 +0700 Received: from antispam.localhost (localhost [127.0.0.1]) by mail2.ksn.ru (Postfix) with SMTP id 3E6B867827 for ; Wed, 29 Aug 2007 17:38:55 +0700 (NOVST) Received: from [80.242.66.33] (Eugene-Mogutov.officeip.ksn.ru [80.242.66.33]) by mail2.ksn.ru (Postfix) with ESMTP id D99D867829 for ; Wed, 29 Aug 2007 17:38:50 +0700 (NOVST) Message-ID: <46D54CC8.4020702@ngs.ru> Date: Wed, 29 Aug 2007 17:39:04 +0700 From: Ivan Alexandrovich User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-SpamTest-Info: Profile: Formal (1270/070803) X-SpamTest-Info: Profile: Detect Hard (4/030526) X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Archiving/Rejecting (2/030321) X-SpamTest-Version: SMTP-Filter Version 2.1.0 [0148], SpamtestISP/Release Subject: vlan stacking X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2007 11:05:56 -0000 Hi I'm wondering is anybody using double vlans ("q-in-q", "vlan stacking", any name you like) on production hosts? Does it play well with common ethernet device drivers in freebsd (concerning the frame size) - fxp, em, for example? Looks like that almost nobody mentions q-in-q in freebsd maillists/forums, except that nesting ng_vlan can be used to implement it. At the the end of the message there's an example of initialization sequence that we try to use. It's rather straightforward but maybe someone can criticize it or drop a hint how to do it the right way. Thanks, Ivan #rl0: creating 802.1q vlan 3555 and nested vlan 2555 ifconfig rl0 10.123.0.1 netmask 255.255.255.0 kldload ng_ether kldload ng_vlan ngctl mkpeer rl0: vlan lower downstream ngctl name rl0:lower vlanL1 ngctl connect rl0: vlanL1: upper nomatch ngctl mkpeer vlanL1: eiface vlan3555 ether ngctl msg vlanL1: addfilter '{ vlan=3555 hook="vlan3555" }' # the same mac address as for parent interface rl0 ifconfig ngeth0 link 00:c0:df:1f:22:de ifconfig ngeth0 10.124.0.1 netmask 255.255.255.0 ngctl mkpeer ngeth0: vlan lower downstream ngctl name ngeth0:lower vlanL2 ngctl connect ngeth0: vlanL2: upper nomatch ngctl mkpeer vlanL2: eiface vlan2555 ether ngctl msg vlanL2: addfilter '{ vlan=2555 hook="vlan2555" }' ifconfig ngeth1 link 00:c0:df:1f:22:de ifconfig ngeth1 10.125.0.1 netmask 255.255.255.0 ifconfig ngeth0 name spvid3555 ifconfig ngeth1 name dvlan2555 ifconfig rl0 promisc