ONT – Layer 3 Marking

Now that I covered Layer 2 marking it is time for the more resource friendly way, Layer 3 marking.

Definition:
ToS (Type of Services) byte in the IPv4 header contain a six-bit DSCP (Differentiated Services Code Point) and a two-bit ECN (Explicit Congestion Notification) field. It is located between the Destination IP and L4 data in the header.

Layer 3 marking has the ability to carry data (marking info) from router to router across the network. The first implementation of marking using the ToS byte was IP Precedence which only used the left-most 3 bits. The IP Precedence marking strategies are the same as the CoS marking strategies.

DSCP Marking strategies:

Introduced more usable markings

Maintained backwards compatibility with IP precedence

The eight bits are split as shown:

000 | 000 | 00

Left part is PHB (Per-Hop Behavior) – major class
Middle part is Drop Probability – minor class, it will break the tie if left part is equal
Right part is Flow Control – PCs can be told to slow down to prevent packet loss. This is not included in DSCP marking.

Drop Probability currently only uses the left-most two (of three) bits and can be one of three:
High drop preference: 11
Medium drop preference: 10
Low drop reference: 01

The rules for can be confusing: while higher PHB is better, higher Drop Probability is worse. The combination of the two fields will make the decision on the precedence.

As with classification, it is important to remember that the level of preferences is just for marking, it does not define treatment (policing). We use marking techniques for greater flexibility but only when we actually apply them on an interface they will have an impact.