News Update :

Layer 3 QoS: IP ToS, Precedence, CoS, IntServ, and DiffServ Codepoints

QoS definitions vary by service and approach chosen. For data communication networks, typical QoS characteristics and metrics include bandwidth, delay (latency), delay variation (jitter), and reliability, as follows:

  • Bandwidth— Peak data rate (PDR), sustained data rate (SDR), minimum data rate (MDR).

  • Delay/latency— End-to-end or round-trip delay, delay variation (jitter), node-processing delay.

  • Reliability— Availability (as percent of uptime), mean time between failures/mean time to repair (MTBF/MTTR), errors, and packet loss.

The IP header contains a Type of Service (ToS) field (see Example 13-12). Applications can set the three precedence bits of this ToS field at the network interface card (NIC) level according to their requirements.

Example 13-12. IPv4 Header with ToS Field
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Version | IHL | Type of Service | Total Length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Identification | Flags | Fragment Offset |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Time to Live | Protocol | Header Checksum |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Source Address |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Destination Address |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Options | Padding |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


In the context of IP QoS considerations, a 3-bit field in the ToS byte of the IP header is referred to as precedence (see Example 13-13). Using IP precedence, a network administrator can assign values from 0 (the default) to 7 to classify and prioritize types of traffic.

Example 13-13. ToS and Precedence
       0     1     2     3     4     5     6     7

+-----+-----+-----+-----+-----+-----+-----+-----+

| | | | | |

| PRECEDENCE | STRM|RELIABILITY| S/R |SPEED|

| | | | | |

+-----+-----+-----+-----+-----+-----+-----+-----+


Many applications and routers support IP precedence. The ToS and differentiated services (DiffServ) approach directly tag the traffic itself, which therefore contains in-band QoS markings. An out-band approach is the Resource Reservation Protocol (RSVP). An integrated services (IntServ) approach provides end-to-end QoS in IP networks and relies on per-flow state information and integration with RSVP as a signaling protocol at every involved hop. (IntServ is considered to have some weaknesses.)

DiffServ takes a simpler approach with less signaling overhead and no QoS-aware intermediate network nodes for the entire path. Packets are classified and marked to receive a particular per-hop forwarding behavior on nodes along their path (RFC 2475). The DiffServ (DS) field is supposed to succeed the IPv4 ToS field in the IPv4 header, which is deprecated and in IPv6 context "rejuvenated" as the traffic-class octet (see Example 13-14).

NOTE

For DiffServ internals, see RFC 2474, "Definition of Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers."


Example 13-14. DiffServ Codepoints
The DS field structure is presented below (RFC 2474):



0 1 2 3 4 5 6 7

+---+---+---+---+---+---+---+---+

| DSCP | CU |

+---+---+---+---+---+---+---+---+



DSCP: Differentiated services codepoint

CU: Currently unused (reserved)


Note that when you are dealing with DiffServ, two expressions are used frequently: PHB (per-hop behavior) and DSCP (DiffServ codepoint). In current architectures, IP precedence values are mapped into DSCPs

802.1P/Q Tagging/Priority—QoS at the Data-Link/MAC Sublayer

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.

NOTE

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.

Example 13-15. 802.1Q Priority Setting on Linux
[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
Share this Article on :

0 comments:

Post a Comment

 

© Copyright Cisco elearning 2010 -2011 | Design by Herdiansyah Hamzah | Published by Borneo Templates | Powered by Blogger.com.