Monday, 15 August 2011

QoS Field Marking

Layer 3 Marking (IP Header)

There is only one field in the IP header which been overloaded so may times for various protocols. Its the perfect opportunity for asking confusing questions. The diagram below shows two ways of breaking up the field.

In IPv4 this byte is generally referred to as the Type of Service (TOS) field. In IPv6 this byte is called the Traffic Class field.

DiffServe (Differentiated Services Control Point - DSCP) and IP Precedence (IP Prec)

The original way includes IP Prec + TOS + ECN and the new way is DiffServ + ECN.

ECN or Explicit Congestion Notification allows end-to-end notification of network congestion without dropping packets. ECN is an optional feature that is only used when both endpoints support it and are willing to use it. It is only effective when supported by the underlying network.

The mapping between the two methods is shown in the table below. The DiffServe method is probably the most important method of marking a packet. See below for other methods

AFxy = assured forwarding class X, drop priority Y
EF = Expedited Forwarding
CS = Class Selector

To convert IP Precedence to DSCP , just multiply by 8.
 DSCP = 8 * IP Prec

For IP Prec of Critical this is:
8*5 = DSCP 40

To convert Per Hop Behaviour (AFxy) to DSCP use the following:
DSCP = (8*x)+(2*y)

For AF13 This becomes

(8*1)+(2*3) = DSCP 14

The reverse equation is
x = int(DSCP / 8 )
y = remainder(DSCP/8)/2

The mnemonic to remember the order of IP Prec is "NIC F FIPR".

Integrated Services (IntServ)

This uses RSVP to allocate end-to-end bandwidth and does not scale well.

MPLS Experimental QOS
This 3 bit field included in the header

Layer 2 Markings


Ethernet - Class of Service (CoS or 802.1p)
This 3 bit field is included in the .1Q or ISL frames only. As a resut is only important on a trunked link. All other links dont use use this framing!


Frame Relay - Discard Eligibility (DE)
Single bit field, when set means that the frame can be dropped in preference to other frames.

ATM - Cell Loss Priority (CLP)
Single bit field, when set means that the frame can be dropped in preference to other frames.

No comments:

Post a Comment