Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Aug 2008 18:38:46 +0200
From:      "Younger Wang" <Younger.Wang@packetfront.com>
To:        "Younger Wang" <Younger.Wang@packetfront.com>, "Julian Elischer" <julian@elischer.org>
Cc:        freebsd-net@freebsd.org
Subject:   RE: (Netgraph problem)  Inner tag and outer tag swapped
Message-ID:  <E04A1AC327C07042AB62CB2A7390E7AF0115A777@slipper.int.packetfront.com>
In-Reply-To: <E04A1AC327C07042AB62CB2A7390E7AF0115A776@slipper.int.packetfront.com>
References:  <E04A1AC327C07042AB62CB2A7390E7AF0115A727@slipper.int.packetfront.com><489C0DDA.8040606@elischer.org> <E04A1AC327C07042AB62CB2A7390E7AF0115A776@slipper.int.packetfront.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I diffed ng_vlan source between release 7 and vimage_7-20080228. They
are identical.

I will discard my own modification and try original vimage_7-20080228;
if it does not still work, I will roll back to release 7 kernel and try
again. Thank you so much for the hints.

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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E04A1AC327C07042AB62CB2A7390E7AF0115A777>