Monday, September 9, 2013

IEEE 802.1p: LAN Layer 2 QoS/CoS Протокол приоритизации трафика


IEEE 802.1p specification enables Layer 2 switches to prioritize traffic and perform dynamic multicast filtering. The prioritization specification works at the media access control (MAC) framing layer (OSI model layer 2). The 802.1P standard also offers provisions to filter multicast traffic to ensure it does not proliferate over layer 2-switched networks.


The 802.1p header includes a three-bit field for prioritization, which allows packets to be grouped into various traffic classes. The IEEE has made broad recommendations concerning how network managers can implement these traffic classes, but it stops short of mandating the use of its recommended traffic class definitions. It can also be defined as best-effort QoS (Quality of Service) or CoS (Class of Service) at Layer 2 and is implemented in network adapters and switches without involving any reservation setup. 802.1p traffic is simply classified and sent to the destination; no bandwidth reservations are established.
The IEEE 802.1p is an extension of the IEEE 802.1Q (VLANs tagging) standard and they work in tandem. The 802.1Q standard specifies a tag that appends to an Ethernet MAC frame. The VLAN tag has two parts: The VLAN ID (12-bit) and Prioritization (3-bit). The prioritization field was not defined and used in the 802.1Q VLAN standard. The 802.1P defines this prioritization field.
IEEE 802.1p establishes eight levels of priority. Although network managers must determine actual mappings, IEEE has made broad recommendations. The highest priority is seven, which might go to network-critical traffic such as Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) table updates. Values five and six might be for delay-sensitive applications such as interactive video and voice. Data classes four through one range from controlled-load applications such as streaming multimedia and business-critical traffic - carrying SAP data, for instance - down to "loss eligible" traffic. The zero value is used as a best-effort default, invoked automatically when no other value has been set.


Protocol Structure - IEEE 802.1p: LAN Layer 2 QoS/CoS Protocol for Traffic Prioritization

IEEE 802.1Q Tagged Frame for Ethernet:

716622242-14964 bytes
PreambleSFDDASATPIDTCIType LengthDataCRC

  • Preamble (PRE)- 7 bytes. The PRE is an alternating pattern of ones and zeros that tells receiving stations that a frame is coming, and that provides a means to synchronize the frame-reception portions of receiving physical layers with the incoming bit stream.
  • Start-of-frame delimiter (SFD)- 1 byte. The SOF is an alternating pattern of ones and zeros, ending with two consecutive 1-bits indicating that the next bit is the left-most bit in the left-most byte of the destination address.
  • Destination address (DA)- 6 bytes. The DA field identifies which station(s) should receive the frame.
  • Source addresses (SA)- 6 bytes. The SA field identifies the sending station.
  • TPID- defined value of 8100 in hex. When a frame has the EtherType equal to 8100, this frame carries the tag IEEE 802.1Q / 802.1P.
  • TCI - Tag Control Information field including user priority, Canonical format indicator and VLAN ID.

3112bits
User PriorityCFIBits of VLAN ID (VIDI) to identify possible VLANs

  • User Priority- Defines user priority, giving eight (2^3) priority levels. IEEE 802.1P defines the operation for these 3 user priority bits.
  • CFI- Canonical Format Indicator is always set to zero for Ethernet switches. CFI is used for compatibility reason between Ethernet type network and Token Ring type network. If a frame received at an Ethernet port has a CFI set to 1, then that frame should not be forwarded as it is to an untagged port.
  • VID- VLAN ID is the identification of the VLAN, which is basically used by the standard 802.1Q. It has 12 bits and allow the identification of 4096 (2^12) VLANs. Of the 4096 possible VIDs, a VID of 0 is used to identify priority frames and value 4095 (FFF) is reserved, so the maximum possible VLAN configurations are 4,094.
  • Length/Type- 2 bytes. This field indicates either the number of MAC-client data bytes that are contained in the data field of the frame, or the frame type ID if the frame is assembled using an optional format.
  • Data- Is a sequence of nbytes (48=< n =<1500 64bytes.="" any="" frame="" is="" li="" minimum="" of="" the="" total="" value.="">
  • Frame check sequence (FCS)- 4 bytes. This sequence contains a 32-bit cyclic redundancy check (CRC) value, which is created by the sending MAC and is recalculated by the receiving MAC to check for damaged frames.

Related Protocols
IEEE 802.3 , 802.2 , 802.1D , 802.1Q

Sponsor Source
802.1p standard is defined by IEEE (http://www.ieee.org ).

Reference
http://standards.ieee.org/getieee802/download/802.1Q-1998.pdf : IEEE 802.1Q Standard

http://www.javvin.com/protocol8021P.html