802.1P provides for eight traffic classes drawn from priority fields in 802.1Q VLAN tags. The IEEE 802.1P standard describes important methods for providing QoS at the MAC level and defines traffic-class expediting (3 bits) and dynamic-multicast filtering to ensure traffic does not traverse the boundaries of Layer 2-switched networks.
Both 802.1P and 802.1Q are part of 802.1D.
Most vendors support 802.1P/Q in their Layer 2/3 equipment and modern NICs. This means that QoS tagging is pushed out to the network edge down to the NIC level. However, privileged treatment of these frames still is best effort in Layer 2-switched networks and does not involve reservation setup. The 3 priority bits can be mapped easily into the Layer 3 IP precedence bits or a subset of DSCPs. Therefore, we have coherent tagging, which is easy to implement. The remaining question?and there exists no uniform approach?is how to implement queuing for these priority flows at Layer 2 and Layer 3.
There is no 802.1P without 802.1Q VLAN tagging. The VLAN tag carries VLAN information?the VLAN ID (12 bits) and prioritization (3 bits). The Prioritization field was never defined in the VLAN standard, so 802.1P steps in and actually brings it to life. This effort defines a 32-bit tag header that is inserted after a frame's normal destination and source address header info. Switches, routers, servers, and even desktop systems can set these priority bits.
802.1Q priority is supported only rudimentary on UNIX. Linux vconfig can set these bits (see Example 13-15). Whether this works depends on the 802.1Q VLAN implementation of the OS.
[root@callisto:~#] vconfig add eth0 1 [root@callisto:~#] vconfig set_egress_map eth0.1 8 [root@callisto:~#] ifconfig ?a ... eth0.1 Link encap:Ethernet HWaddr 00:10:5A:D7:93:60 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) ... [root@callisto:~#] cat /proc/net/vlan/eth0.1 eth0.1 VID: 1 REORDER_HDR: 1 dev->priv_flags: 1 total frames received: 0 total bytes received: 0 Broadcast/Multicast Rcvd: 0 total frames transmitted: 0 total bytes transmitted: 0 total headroom inc: 0 total encap on xmit: 0 Device: eth0 INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 EGRESSS priority Mappings: 8:0