From owner-freebsd-net@FreeBSD.ORG Fri Aug 8 16:58:58 2008 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 F2229106567C for ; Fri, 8 Aug 2008 16:58:58 +0000 (UTC) (envelope-from Younger.Wang@packetfront.com) Received: from mail.packetfront.com (mail.packetfront.com [212.247.6.198]) by mx1.freebsd.org (Postfix) with ESMTP id 7B9808FC13 for ; Fri, 8 Aug 2008 16:58:58 +0000 (UTC) (envelope-from Younger.Wang@packetfront.com) Received: from localhost (localhost [127.0.0.1]) by mail.packetfront.com (Postfix) with ESMTP id 50644A30D8; Fri, 8 Aug 2008 18:58:29 +0200 (CEST) Received: from mail.packetfront.com ([127.0.0.1]) by localhost (mail.packetfront.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28908-02; Fri, 8 Aug 2008 18:58:28 +0200 (CEST) Received: from fw.packetfront.com (unknown [192.121.165.1]) by mail.packetfront.com (Postfix) with ESMTP id EBDB8A30D3; Fri, 8 Aug 2008 18:58:28 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 8 Aug 2008 19:00:43 +0200 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: (Netgraph problem) Inner tag and outer tag swapped Thread-Index: Acj5aYOBdRkAhUCDQxS+dRRAHdC5lQACSVHAAAFI5MA= References: <489C0DDA.8040606@elischer.org> From: "Younger Wang" To: "Younger Wang" , "Julian Elischer" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at packetfront.com Cc: freebsd-net@freebsd.org Subject: RE: (Netgraph problem) Inner tag and outer tag swapped 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: Fri, 08 Aug 2008 16:58:59 -0000 I have rolled back to release 7 kernel. The problem is still there.=20 The problem is seen only when the single tagged frame ingresses from an ether node. I tested it on bge and fxp cards. If the single tagged frame was injected from an eiface interface, there is no problem.=20 BR Younger Wang -----Original Message----- From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-net@freebsd.org] On Behalf Of Younger Wang Sent: Saturday, August 09, 2008 12:29 AM To: Julian Elischer Cc: freebsd-net@freebsd.org Subject: RE: (Netgraph problem) Inner tag and outer tag swapped Hi, I expect to see [Ether header][tag 4000][tag 201][payload] in hub_QinQ, but in fact it was [ether header][tag 201][tag 4000][payload]. I inserted the hub because I wanted to sniffer in the segment. It should not cause any problem, should it? The system I run is based on vimage_7-20080228.tgz (http://imunes.tel.fer.hr/virtnet/), on FreeBSD Release 7, with ng_vlan module modified to support changing ethertype. My modification was made for release 7 however. Yes, the difference between vimage source and release 7 could be the cause. I will check it during the weekend.=20 Big thanks! BR Younger Wang -----Original Message----- From: Julian Elischer [mailto:julian@elischer.org]=20 Sent: Friday, August 08, 2008 5:12 PM To: Younger Wang Subject: Re: (Netgraph problem) Inner tag and outer tag swapped Younger Wang wrote: > Hi, >=20 > =20 >=20 > fxp0 is connected to a trunk port. Frames tagged with VID=3D201 = arrives at > fxp0 from a switch trunk port, I expect it will be captured at hub_QinQ, > with outer tag =3D 4000, and inner tag =3D 201. But in fact, it was received > with the outer and inner tags reversed. is this what you think is on the wire? [ether header][tag 201][tag 4000][payload] >=20 > =20 >=20 > But if I inject the same frame on hub_c4000, the frame is received at > hub_QinQ as expected (inner tag =3D 201, outer tag =3D 4000). I am = really > confused. Has anyone seen the same problem? Big thanks. >=20 > =20 >=20 > Here is my netgraph setup: >=20 > =20 >=20 > ngctl mkpeer fxp0: hub lower physical >=20 > ngctl name fxp0:lower hub_c4000 looking at your config.. I see: [hub] down0 | downstream [vlan] vlan4000 | up [hub] <--- why do you need this? physical | lower [ether] what version of FreeBSD? some changes were made in vlan handling in the late6/7 timeframe. >=20 > =20 >=20 > ngctl mkpeer hub_c4000: vlan up vlan4000 >=20 > ngctl name hub_c4000:up vlan_QinQ >=20 > =20 >=20 > ngctl mkpeer vlan_QinQ: hub downstream down0 >=20 > ngctl name vlan_QinQ:downstream hub_QinQ >=20 > =20 >=20 > ngctl msg vlan_QinQ: addfilter { vlan=3D4000 hook=3D"vlan4000" } >=20 > =20 >=20 > BR >=20 > Younger Wang >=20 > =20 >=20 > =20 >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"