Discussion:
bridges, vlans, and xen, oh my!
(too old to reply)
der Mouse
2008-06-20 22:18:16 UTC
Permalink
Conceptually, what I want is a vlan interface that selects for untagged
packets on input and does not add any tag on output (what my own 802.1q
implementation calls VLAN_NONE, if that means anything to anyone).

Using the underlying interface is not suitable. This is because I want
to put this interface into a bridge, and I want to bridge only untagged
packets - tagged packets should go to the appropriate vlan interface
(if there is one) or be dropped (if not), never passed through the
bridge.

I'm using 4.0. What would be involved? Did I just miss something when
looking at 4.0's vlan stuff? Or is there some other facility which has
equivalent effect? Or does this require hacking on the vlan code?

(The mention of xen in the Subject: is there more to give me three
things to name than because it's really relevant. Xen is involved only
in that this is all happening in Xen domains. I've got a machine with
lots of ethernets being used as a testbed for some DSL hardware.)

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Quentin Garnier
2008-06-20 23:30:43 UTC
Permalink
Post by der Mouse
Conceptually, what I want is a vlan interface that selects for untagged
packets on input and does not add any tag on output (what my own 802.1q
implementation calls VLAN_NONE, if that means anything to anyone).
I've been bugged by that in the past, too. I wanted to allow the user
to do this:

ifconfig vlan0 vlan native vlan-if fxp0

And that would do what you expect to do. Otherwise stuff can go wrong
when you mix an interface with an address, a bridge and vlans on that
interface.

It should actually be very easy to do, I just never got around taking
the time to do it.

Any taker?
--
Quentin Garnier - ***@cubidou.net - ***@NetBSD.org
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
der Mouse
2008-06-21 00:15:12 UTC
Permalink
Post by der Mouse
Conceptually, what I want is a vlan interface that selects for
untagged packets on input and does not add any tag on output
I've been bugged by that in the past, too. [...]
It should actually be very easy to do, I just never got around taking
the time to do it.
Any taker?
I'll have a look at putting it into 4.0, then, difficult though it is
to restrain myself from doing something about the botchery of using
ifconfig to do what ought to be called vlanconfig....

der Mouse

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2008-06-21 05:23:29 UTC
Permalink
Post by der Mouse
Conceptually, what I want is a vlan interface that selects for
untagged packets on input and does not add any tag on output
I've been bugged by that in the past, too. [...]
It should actually be very easy to do, I just never got around taking
the time to do it.
It is easy. I have most of it working now. The only part that's
missing is some syntactic sugar in ifconfig; with what I have now, you
need to tell ifconfig "vlan 65535" to get an untagged-packets vlan.
(65535 is out of range; vlan tags run from 0 to 4095.)

Patches, relative to the 4.0 source tree, follow my signature. I think
I've got everything; if these don't work, let me know details and I'll
see if I missed something, or what.

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

diff -u -r base/sys/net/if_ether.h new/sys/net/if_ether.h
--- base/sys/net/if_ether.h Thu Nov 23 20:04:30 2006
+++ new/sys/net/if_ether.h Sat Jun 21 00:42:49 2008
@@ -157,6 +157,7 @@
capabilities to enable */

int ec_nvlans; /* # VLANs on this interface */
+ int ec_untaggedvlan; /* "untagged" vlan configured */
#ifdef MBUFTRACE
struct mowner ec_rx_mowner; /* mbufs received */
struct mowner ec_tx_mowner; /* mbufs transmitted */
diff -u -r base/sys/net/if_ethersubr.c new/sys/net/if_ethersubr.c
--- base/sys/net/if_ethersubr.c Tue Feb 27 18:16:42 2007
+++ new/sys/net/if_ethersubr.c Sat Jun 21 00:42:50 2008
@@ -773,6 +773,20 @@
}
#endif /* NAGR > 0 */

+#if NVLAN > 0
+ /*
+ * If an untagged vlan is configured,
+ * vlan_input wants the packet regardless of etype.
+ *
+ * Note that nothing is ever "received" on the parent interface
+ * when an untagged vlan is configured.
+ */
+ if (((struct ethercom *)ifp)->ec_untaggedvlan) {
+ vlan_input(ifp,m);
+ return;
+ }
+#endif /* NVLAN > 0 */
+
/*
* Handle protocols that expect to have the Ethernet header
* (and possibly FCS) intact.
diff -u -r base/sys/net/if_vlan.c new/sys/net/if_vlan.c
--- base/sys/net/if_vlan.c Wed Nov 15 20:33:40 2006
+++ new/sys/net/if_vlan.c Sat Jun 21 00:43:50 2008
@@ -177,7 +177,7 @@

static int vlan_clone_create(struct if_clone *, int);
static int vlan_clone_destroy(struct ifnet *);
-static int vlan_config(struct ifvlan *, struct ifnet *);
+static int vlan_config(struct ifvlan *, struct ifnet *, u_int16_t);
static int vlan_ioctl(struct ifnet *, u_long, caddr_t);
static void vlan_start(struct ifnet *);
static void vlan_unconfig(struct ifnet *);
@@ -269,7 +269,7 @@
* Configure a VLAN interface. Must be called at splnet().
*/
static int
-vlan_config(struct ifvlan *ifv, struct ifnet *p)
+vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag)
{
struct ifnet *ifp = &ifv->ifv_if;
int error;
@@ -277,6 +277,8 @@
if (ifv->ifv_p != NULL)
return (EBUSY);

+ ifv->ifv_tag = tag;
+
switch (p->if_type) {
case IFT_ETHER:
{
@@ -286,6 +288,9 @@
ifv->ifv_encaplen = ETHER_VLAN_ENCAP_LEN;
ifv->ifv_mintu = ETHERMIN;

+ if (tag == EVL_UNTAGGED)
+ ec->ec_untaggedvlan = 1;
+
/*
* If the parent supports the VLAN_MTU capability,
* i.e. can Tx/Rx larger than ETHER_MAX_LEN frames,
@@ -368,6 +373,7 @@
vlan_unconfig(struct ifnet *ifp)
{
struct ifvlan *ifv = ifp->if_softc;
+ struct ifvlan *ifv2;

if (ifv->ifv_p == NULL)
return;
@@ -399,6 +405,17 @@
}
}

+ if (ifv->ifv_tag == EVL_UNTAGGED) {
+ ec->ec_untaggedvlan = 0;
+ for (ifv2 = LIST_FIRST(&ifv_list); ifv2 != NULL;
+ ifv2 = LIST_NEXT(ifv2, ifv_list))
+ if ( (ifv2->ifv_p == ifv->ifv_p) &&
+ (ifv2->ifv_tag == EVL_UNTAGGED) ) {
+ ec->ec_untaggedvlan = 1;
+ break;
+ }
+ }
+
ether_ifdetach(ifp);
vlan_reset_linkname(ifp);
break;
@@ -526,17 +543,17 @@
vlan_unconfig(ifp);
break;
}
- if (vlr.vlr_tag != EVL_VLANOFTAG(vlr.vlr_tag)) {
- error = EINVAL; /* check for valid tag */
+ if ( (vlr.vlr_tag != EVL_VLANOFTAG(vlr.vlr_tag)) &&
+ (vlr.vlr_tag != EVL_UNTAGGED) ) { /* check for valid tag */
+ error = EINVAL;
break;
}
if ((pr = ifunit(vlr.vlr_parent)) == 0) {
error = ENOENT;
break;
}
- if ((error = vlan_config(ifv, pr)) != 0)
+ if ((error = vlan_config(ifv, pr, vlr.vlr_tag)) != 0)
break;
- ifv->ifv_tag = vlr.vlr_tag;
ifp->if_flags |= IFF_RUNNING;

/* Update promiscuous mode, if necessary. */
@@ -738,85 +755,90 @@
bpf_mtap(ifp->if_bpf, m);
#endif
/*
- * If the parent can insert the tag itself, just mark
- * the tag in the mbuf header.
+ * EVL_UNTAGGED means "don't tag" on output.
*/
- if (ec->ec_capabilities & ETHERCAP_VLAN_HWTAGGING) {
- struct m_tag *mtag;
-
- mtag = m_tag_get(PACKET_TAG_VLAN, sizeof(u_int),
- M_NOWAIT);
- if (mtag == NULL) {
- ifp->if_oerrors++;
- m_freem(m);
- continue;
- }
- *(u_int *)(mtag + 1) = ifv->ifv_tag;
- m_tag_prepend(m, mtag);
- } else {
+ if (ifv->ifv_tag != EVL_UNTAGGED) {
/*
- * insert the tag ourselves
+ * If the parent can insert the tag itself, just mark
+ * the tag in the mbuf header.
*/
- M_PREPEND(m, ifv->ifv_encaplen, M_DONTWAIT);
- if (m == NULL) {
- printf("%s: unable to prepend encap header",
- ifv->ifv_p->if_xname);
- ifp->if_oerrors++;
- continue;
- }
-
- switch (p->if_type) {
- case IFT_ETHER:
- {
- struct ether_vlan_header *evl;
+ if (ec->ec_capabilities & ETHERCAP_VLAN_HWTAGGING) {
+ struct m_tag *mtag;

- if (m->m_len < sizeof(struct ether_vlan_header))
- m = m_pullup(m,
- sizeof(struct ether_vlan_header));
- if (m == NULL) {
- printf("%s: unable to pullup encap "
- "header", ifv->ifv_p->if_xname);
+ mtag = m_tag_get(PACKET_TAG_VLAN, sizeof(u_int),
+ M_NOWAIT);
+ if (mtag == NULL) {
ifp->if_oerrors++;
+ m_freem(m);
continue;
}
-
- /*
- * Transform the Ethernet header into an
- * Ethernet header with 802.1Q encapsulation.
- */
- memmove(mtod(m, caddr_t),
- mtod(m, caddr_t) + ifv->ifv_encaplen,
- sizeof(struct ether_header));
- evl = mtod(m, struct ether_vlan_header *);
- evl->evl_proto = evl->evl_encap_proto;
- evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
- evl->evl_tag = htons(ifv->ifv_tag);
-
+ *(u_int *)(mtag + 1) = ifv->ifv_tag;
+ m_tag_prepend(m, mtag);
+ } else {
/*
- * To cater for VLAN-aware layer 2 ethernet
- * switches which may need to strip the tag
- * before forwarding the packet, make sure
- * the packet+tag is at least 68 bytes long.
- * This is necessary because our parent will
- * only pad to 64 bytes (ETHER_MIN_LEN) and
- * some switches will not pad by themselves
- * after deleting a tag.
+ * insert the tag ourselves
*/
- if (m->m_pkthdr.len <
- (ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN)) {
- m_copyback(m, m->m_pkthdr.len,
- (ETHER_MIN_LEN +
- ETHER_VLAN_ENCAP_LEN) -
- m->m_pkthdr.len,
- vlan_zero_pad_buff);
+ M_PREPEND(m, ifv->ifv_encaplen, M_DONTWAIT);
+ if (m == NULL) {
+ printf("%s: unable to prepend encap header",
+ ifv->ifv_p->if_xname);
+ ifp->if_oerrors++;
+ continue;
}
- break;
- }
+
+ switch (p->if_type) {
+ case IFT_ETHER:
+ {
+ struct ether_vlan_header *evl;
+
+ if (m->m_len < sizeof(struct ether_vlan_header))
+ m = m_pullup(m,
+ sizeof(struct ether_vlan_header));
+ if (m == NULL) {
+ printf("%s: unable to pullup encap "
+ "header", ifv->ifv_p->if_xname);
+ ifp->if_oerrors++;
+ continue;
+ }
+
+ /*
+ * Transform the Ethernet header into an
+ * Ethernet header with 802.1Q encapsulation.
+ */
+ memmove(mtod(m, caddr_t),
+ mtod(m, caddr_t) + ifv->ifv_encaplen,
+ sizeof(struct ether_header));
+ evl = mtod(m, struct ether_vlan_header *);
+ evl->evl_proto = evl->evl_encap_proto;
+ evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
+ evl->evl_tag = htons(ifv->ifv_tag);
+
+ /*
+ * To cater for VLAN-aware layer 2 ethernet
+ * switches which may need to strip the tag
+ * before forwarding the packet, make sure
+ * the packet+tag is at least 68 bytes long.
+ * This is necessary because our parent will
+ * only pad to 64 bytes (ETHER_MIN_LEN) and
+ * some switches will not pad by themselves
+ * after deleting a tag.
+ */
+ if (m->m_pkthdr.len <
+ (ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN)) {
+ m_copyback(m, m->m_pkthdr.len,
+ (ETHER_MIN_LEN +
+ ETHER_VLAN_ENCAP_LEN) -
+ m->m_pkthdr.len,
+ vlan_zero_pad_buff);
+ }
+ break;
+ }

#ifdef DIAGNOSTIC
- default:
- panic("vlan_start: impossible");
+ default:
+ panic("vlan_start: impossible");
#endif
+ }
}
}

@@ -870,16 +892,20 @@
return;
}
evl = mtod(m, struct ether_vlan_header *);
- KASSERT(ntohs(evl->evl_encap_proto) == ETHERTYPE_VLAN);
-
- tag = EVL_VLANOFTAG(ntohs(evl->evl_tag));
-
- /*
- * Restore the original ethertype. We'll remove
- * the encapsulation after we've found the vlan
- * interface corresponding to the tag.
- */
- evl->evl_encap_proto = evl->evl_proto;
+ if ( ((struct ethercom *)ifp)->ec_untaggedvlan &&
+ (ntohs(evl->evl_encap_proto) != ETHERTYPE_VLAN) ) {
+ tag = EVL_UNTAGGED;
+ } else {
+ KASSERT(ntohs(evl->evl_encap_proto) == ETHERTYPE_VLAN);
+ tag = EVL_VLANOFTAG(ntohs(evl->evl_tag));
+ /*
+ * Restore the original ethertype. We'll
+ * remove the encapsulation after we've
+ * found the vlan interface corresponding
+ * to the tag.
+ */
+ evl->evl_encap_proto = evl->evl_proto;
+ }
break;
}

@@ -905,10 +931,10 @@
}

/*
- * Now, remove the encapsulation header. The original
- * header has already been fixed up above.
+ * Now, remove the encapsulation header (except for untagged vlans).
+ * The original header has already been fixed up above.
*/
- if (mtag == NULL) {
+ if ((mtag == NULL) && (tag != EVL_UNTAGGED)) {
memmove(mtod(m, caddr_t) + ifv->ifv_encaplen,
mtod(m, caddr_t), sizeof(struct ether_header));
m_adj(m, ifv->ifv_encaplen);
diff -u -r base/sys/net/if_vlanvar.h new/sys/net/if_vlanvar.h
--- base/sys/net/if_vlanvar.h Sun Dec 11 07:24:51 2005
+++ new/sys/net/if_vlanvar.h Sat Jun 21 00:43:51 2008
@@ -80,6 +80,8 @@

#define EVL_VLANOFTAG(tag) ((tag) & 4095)
#define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7)
+/* This does not appear in packets; it is for vlr_tag/ifv_tag use. */
+#define EVL_UNTAGGED 65535

/* Configuration structure for SIOCSETVLAN and SIOCGETVLAN ioctls. */
struct vlanreq {

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young
2008-06-21 18:50:22 UTC
Permalink
Post by der Mouse
@@ -368,6 +373,7 @@
vlan_unconfig(struct ifnet *ifp)
{
struct ifvlan *ifv = ifp->if_softc;
+ struct ifvlan *ifv2;
if (ifv->ifv_p == NULL)
return;
@@ -399,6 +405,17 @@
}
}
+ if (ifv->ifv_tag == EVL_UNTAGGED) {
+ ec->ec_untaggedvlan = 0;
+ for (ifv2 = LIST_FIRST(&ifv_list); ifv2 != NULL;
+ ifv2 = LIST_NEXT(ifv2, ifv_list))
+ if ( (ifv2->ifv_p == ifv->ifv_p) &&
+ (ifv2->ifv_tag == EVL_UNTAGGED) ) {
+ ec->ec_untaggedvlan = 1;
+ break;
+ }
+ }
+
This is confusing. If I understand correctly, there may be only one
untagged VLAN active on any parent ifnet, and this code activates a second
untagged VLAN if the first is deactivated. I think that the for-loop
over the ifvs deserves a comment as to why it is unnecessary to skip
over ifv2 if ifv2 == ifv, or else it should explicitly skip.

Please use LIST_FOREACH(). :-)

Is it a good idea to allow more than one VLAN with the same tag, or more
than one untagged VLAN to be configured on the same parent?
Post by der Mouse
@@ -738,85 +755,90 @@
bpf_mtap(ifp->if_bpf, m);
#endif
/*
- * If the parent can insert the tag itself, just mark
- * the tag in the mbuf header.
+ * EVL_UNTAGGED means "don't tag" on output.
*/
- if (ec->ec_capabilities & ETHERCAP_VLAN_HWTAGGING) {
- struct m_tag *mtag;
-
- mtag = m_tag_get(PACKET_TAG_VLAN, sizeof(u_int),
- M_NOWAIT);
- if (mtag == NULL) {
- ifp->if_oerrors++;
- m_freem(m);
- continue;
- }
- *(u_int *)(mtag + 1) = ifv->ifv_tag;
- m_tag_prepend(m, mtag);
- } else {
+ if (ifv->ifv_tag != EVL_UNTAGGED) {
Now the patch becomes very hard to read because you have shifted
everything over. vlan_start already has too many levels of indentation.
You can accomplish the same thing by extracting a subroutine, or else
like this,

if (ifv->ifv_tag == EVLUNTAGGED)
;
else if (ec->ec_capabilities & ETHERCAP_VLAN_HWTAGGING) {

Dave
--
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933 ext 24

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2008-06-21 18:59:09 UTC
Permalink
Post by David Young
Post by der Mouse
+ if (ifv->ifv_tag == EVL_UNTAGGED) {
+ ec->ec_untaggedvlan = 0;
+ for (ifv2 = LIST_FIRST(&ifv_list); ifv2 != NULL;
+ ifv2 = LIST_NEXT(ifv2, ifv_list))
+ if ( (ifv2->ifv_p == ifv->ifv_p) &&
+ (ifv2->ifv_tag == EVL_UNTAGGED) ) {
+ ec->ec_untaggedvlan = 1;
+ break;
+ }
+ }
This is confusing. If I understand correctly, there may be only one
untagged VLAN active on any parent ifnet, and this code activates a
second untagged VLAN if the first is deactivated. I think that the
for-loop over the ifvs deserves a comment as to why it is unnecessary
to skip over ifv2 if ifv2 == ifv, or else it should explicitly skip.
Er. Yes, it should skip...hmm, that's odd; I had debugging printfs in
there at one point, without such a test, but didn't see it re-enable
untaggedvlan. I wonder why. *rummage* *rummage* Ah, because I
provoked the removal with ifconfig destroy, which does a LIST_REMOVE
before calling vlan_unconfig, so ifv wasn't in the list at that point.

I'll add a suitable check.
Post by David Young
Please use LIST_FOREACH(). :-)
I just copied the loop framework from elsewhere; I don't like the
LIST_* macros, so I don't use them myself and thus don't know the
facilities they provide. I held my nose and used them here for the
same reason I held my nose and copied the other ugly style aspects:
uniformly ugly style is better than inconsistent style (well, perhaps
except for really extreme cases, much more extreme than this).

I can switch it to LIST_FOREACH if you like; how would that loop be
written with LIST_FOREACH?
Post by David Young
Is it a good idea to allow more than one VLAN with the same tag, or
more than one untagged VLAN to be configured on the same parent?
I'm not sure. On input, only one of them will get input packets. The
only use I can see for it is merging output streams when either you
don't care about input or it doesn't matter which interface input goes
to. But I see no particular reason to prevent it, and the former code
didn't prevent it either, for tagged vlans....

When I added that code, I was thinking something like "this probably
shouldn't happen, but nothing's preventing it, and just because I can't
think of a use for it offhand is no excuse to misbehave in that case".
I probably should have added a comment to that effect.
Post by David Young
Post by der Mouse
[...]
Now the patch becomes very hard to read because you have shifted
everything over.
Yes; it was intended to be applied, not read. If you want something
intended to be read, apply it to a scratch copy of the file and then
use diff -u -b. :-)

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2008-06-21 19:44:15 UTC
Permalink
On further reflection and code reading, my patches to if_vlan.c were
incorrect in a few ways. They were somewhat schizoid about whether
ec_nvlans was all vlans or just tagged vlans (leaving the count wrong
under some circumstances, I think), and the ec_untaggevlan boolean
works better as a count, eliminating that loop in vlan_unconfig.

When I split ec_nvlans into ec_ntaggedvlans and ec_nuntaggedvlans, it
gets substantially better, but three drivers (if_bge.c, if_sip.c, and
if_ti.c, all in dev/pci) need slight tweaking. I've changed
VLAN_ATTACHED to VLAN_ATTACHED_TAGGED; that's the semantics all those
places want, and I wanted to change the name to make sure I didn't miss
any. I'm now doing a search for other uses of VLAN_ATTACHED in case
there are sokme that don't happen to get built into my test kernels.

I'll generate new patches and send a version for reading (with -b) here
and put a version for applying (without -b) up for ftp.

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Daniel Carosone
2008-06-23 21:58:23 UTC
Permalink
Post by Quentin Garnier
Post by der Mouse
Conceptually, what I want is a vlan interface that selects for untagged
packets on input and does not add any tag on output (what my own 802.1q
implementation calls VLAN_NONE, if that means anything to anyone).
I've been bugged by that in the past, too. I wanted to allow the user
ifconfig vlan0 vlan native vlan-if fxp0
As much as sometimes you need to do this (because other people's
networks are set up like this) and that it's a good capability for
NetBSD to possess, I need to add a strong word here against the
practice of mixing tagged and untagged/"native" vlans on the same
interface.

Amongst other messes, it can help facilitate vlan-hopping attacks
using double-tagged packets. An attacker can send a packet with a
vlan tag the same as your native vlan (which the switch will strip
off) followed by a second vlan header (which will be processed at your
next hop, probably your vlan(4) at the host). Depending on the
implementation and devices, other permutations may be possible. A
quick ref:
https://www2.sans.org/reading_room/whitepapers/networkdevs/1090.php

Even if you don't care about this in your circumstances now, you might
later, and there other reasons to avoid this too, especially if you're
using .1p QoS. Appearance of untagged packets can then be a good
indicator of a configuration error or other problem.

So, if you're setting up the network and have the freedom to choose
otherwise, please do.

Just a comment about practices, not about the ability of the tools to
be used flexibly (which I support).

--
Dan.
der Mouse
2008-06-24 03:31:56 UTC
Permalink
Amongst other messes, [mixing tagged and untagged on tha same trunk]
can help facilitate vlan-hopping attacks using double-tagged packets.
An attacker can send a packet with a vlan tag the same as your native
vlan (which the switch will strip off)
This is something that's always bothered me with vlan tagging: that
tagging switches still pay attention to tags even on
supposedly-untagged ports. ISTM that an untagged port should
completely ignore tags on incoming packets, in the sense of treating
frame type 0x8100 the same as any other.
Even if you don't care about this in your circumstances now,
I don't, no. This is a bench test setup, where I'm conflating data and
management on the same interface because it's easier than finding a way
to put yet another Ethernet in that box (or find another box). If and
when it goes into production, data and management will be on different
physical interfaces.

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...