I am experimenting with the MUX sample from the 2003 ddk. I am trying to use vlan ids that are in the range of 3000-3016. I seem to be able to assign a vlanID in this range but when I monitor the actual network traffic the high order 4 bits seem to be getting stripped. So 3016 becomes 200, 3017 is 201 etc...

I check the registry and the vlanID is being persisted with the proper value but isn't making it into the tagged outgoing traffic properly.

Just curious if anyone has seen this or am I missing something?

Thanks, Tim

Re: Question on VLAN ID overflow in MUX sample by Alireza

Alireza
Tue Mar 02 18:49:40 CST 2004

Let me investigate this and get back to you.

-thanks, ali


--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Ranger, Tim" <tranger@belairnetworks.com> wrote in message
news:82428C6C-FB6B-4A4A-B333-5E7B8C523520@microsoft.com...
> I am experimenting with the MUX sample from the 2003 ddk. I am trying to
use vlan ids that are in the range of 3000-3016. I seem to be able to assign
a vlanID in this range but when I monitor the actual network traffic the
high order 4 bits seem to be getting stripped. So 3016 becomes 200, 3017 is
201 etc...
>
> I check the registry and the vlanID is being persisted with the proper
value but isn't making it into the tagged outgoing traffic properly.
>
> Just curious if anyone has seen this or am I missing something?
>
> Thanks, Tim



Re: Question on VLAN ID overflow in MUX sample by stewo68

stewo68
Wed Mar 03 07:05:00 CST 2004

It seems the problem is in the following macro in "mux.h":

#define SET_VLAN_ID_TO_TAG(_pTagHeader, VlanId) \
{ \
_pTagHeader->TagInfo[0] |= (((UCHAR)VlanId >> 8) & 0x0f); \
_pTagHeader->TagInfo[1] |= (UCHAR)VlanId;\
}

The cast to UCHAR in the first line cuts off the upper bits. So this
should be:

_pTagHeader->TagInfo[0] |= ((UCHAR)(VlanId >> 8)) & 0x0f;

[Note that I would personally prefer to do the cast as the last
action, i.e. "(UCHAR)((VlanId >> 8)) & 0x0f)". Also, "VlanId" should
be embraced by parenthesis (always a good idea in macros):
"(UCHAR)(((VlanId) >> 8)) & 0x0f)".]

Note that the VLAN Tag Control Information is defined as follows:

bit 15-13 = user priority
bit 12 = canonical format indicator (CFI)
bit 11-0 = VLAN identifier (VID)

So the VID is actually only 12 bits wide (0..4095). See IEEE 802.3
"Tagged MAC Frame Format"
(http://standards.ieee.org/getieee802/802.3.html).

Stephan
---
"Ranger, Tim" <tranger@belairnetworks.com> wrote in message news:<82428C6C-FB6B-4A4A-B333-5E7B8C523520@microsoft.com>...
> I am experimenting with the MUX sample from the 2003 ddk. I am trying to use vlan ids that are in the range of 3000-3016. I seem to be able to assign a vlanID in this range but when I monitor the actual network traffic the high order 4 bits seem to be getting stripped. So 3016 becomes 200, 3017 is 201 etc...
>
> I check the registry and the vlanID is being persisted with the proper value but isn't making it into the tagged outgoing traffic properly.
>
> Just curious if anyone has seen this or am I missing something?
>
> Thanks, Tim