Export to GitHub

exports - DSCPWorkAround.wiki


Marcelo Araujo

Copyright © 2008 Marcelo Araujo

This research are based in some technologies existing in the market, all papers and documents used in this study are available on the Internet and are referenced in this document. If you want to use this document how reference in some project, please don't forget the credits.

Introduction

We have a new form for implementing scalable classifications and for accommodating heterogeneous applications requirements and user expectations within networks IP.

References

  • Cisco - Implementing Quality of Service Policies with DSCP
  • DSCP Code - Differentiated Services Field Codepoints
  • RFC 2474 - Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers
  • RFC 2475 - An Architecture for Differentiated Services
  • RFC 2597 - Assured Forwarding PHB Group
  • RFC 2598 - An Expedited Forwarding PHB
  • RFC 3246 - An Expedited Forwarding PHB (Per-Hop Behavior)
  • RFC 3260 - New Terminology and Clarifications for Diffserv

How this work

This research describes how the Differentiated Services Code Point(DSCP) works in network to prioritize and sort some flows of IP packages.

Differentiated Services technology defined by Cisco:

Differentiated Services (DiffServ) is a new model in which traffic is treated by intermediate systems with relative priorities based on the type of services (ToS) field. Defined in RFC 2474 and RFC 2475, the DiffServ standard supersedes the original specification for defining packet priority described in RFC 791. DiffServ increases the number of definable priority levels by reallocating bits of an IP packet for priority marking.

Defined by RFC 2474:

Differentiated services enhancements to the Internet protocol are intended to enable scalable service discrimination in the Internet without the need for per-flow state and signaling at every hop. A variety of services may be built from a small, well-defined set of building blocks which are deployed in network nodes.

DS fields

DSCP uses the six first significant bits within ToS header. The last two bits not is used and we not have documents that describe how we uses it.

DS structure: ```

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
  |         DSCP          |  CU   |
  +---+---+---+---+---+---+---+---+

  DSCP: differentiated services codepoint
  CU:   currently unused

```

How is relationship between DSCP and IP precedence fields

My question is: How DSCP works in the same network that have IP PRECEDENCE fields marked.

The DS structure provides interoperability between networks that use the IP PRECEDENCE. The IETF reuse all bits in ToS field as the DS field for DiffServ but maintain total compatibility between both technologies.

Example:

IP PRECEDENCE: ``` 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | 1 | 1 | 0 | | +---+---+---+---+---+---+---+---+

  IP PRECEDENCE
  PRECEDENCE = INTERCONTROL

```

DSCP Code: ```

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
  | 1 | 1 | 0 |                   |
  +---+---+---+---+---+---+---+---+

  DSCP: CS6
  NOTE: CS is Class Selector.

```

CS maintain the interoperability between networks that use IP PRECEDENCE and DSCP to manipulate and sort some data flows.

As example: DSCP IPTOSPRE Space
--------- --------- -------
CS0 ROUTINE 000000
CS1 PRIORITY 001000
CS2 IMMEDIATE 010000
CS3 FLASH 011000
CS4 FLASHOVER 100000
CS5 CRITICECP 101000
CS6 INTERCONTROL 110000
CS7 NETCONTROL 111000

How it works inside network

We have six most significant bits of the DiffServ fields is called as the DSCP. The DiffServ allows to create some mechanisms for conditioning the traffic in network.

The six first bits of DS field: ```

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
  | 0 | 0 | 0 | 0 | 0 | 0 |       |
  +---+---+---+---+---+---+---+---+

```

The package classification is available in three levels, the levels provides a new form to differentiate services within network. On the RFC 2597 and 2598 are proposed three levels:

Three levels: EF (expedite forwarding): Which have a low delay and grant the needed bandwidth. AF (assure forwarding) : Differentiate and classify the bandwidth. BE (best-effort) : No bandwidth classification.

EF - Expedite forwarding

Thus as is described in RFC 2598, the EF have a low loss, low latency, low jitter and assured bandwidth for end-to-end points, the point-to-point connections or a "virtual leased line" is very similar with this service that has also been described as Premium service. Many situations where the network have an exceeded traffic and we need some bandwidth guaranteed for an application, the EF traffic should receive this rate independent of the intensity of any other traffic attempting to transit the node.

The recommended codepoint for EF: EF - 101110

AF - Assure forwarding

The RFC 2597 defines a group called Assured Forwarding(AF) within DS domain. This group defines four main levels to sort and manipulate some flows within network. Thus as is described in RFC 2597, the AF is a means for a provider DS domain to offer different levels of forwarding assurances for IP packets received from a customer DS domain. We uses the AF to create some flows controls in network and sort the packages in different queues based in two situations, transmission priority and probability of discard.

Understanding the AF class: ``` Class 1 Class 2 Class 3 Class 4 +----------+----------+----------+----------+ Low Drop Prec | 001010 | 010010 | 011010 | 100010 | Medium Drop Prec | 001100 | 010100 | 011100 | 100100 | High Drop Prec | 001110 | 010110 | 011110 | 100110 | +----------+----------+----------+----------+

 AFxy - where x: Transmission priority.
        where y: Discard probability.

```

Follows the recommended codepoints: Codepoint Bin ----------- --------- AF11 001010 AF12 001100 AF13 001110 AF21 010010 AF22 010100 AF23 010110 AF31 011010 AF32 011100 AF33 011110 AF41 100010 AF42 100100 AF43 100110

BE - Best effort

When is not necessary any mechanism for differentiate a traffic, we use the best effort class, this is a default.

  • DSCP Code - Differentiated Services Field Codepoints
  • RFC 2474 - Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers
  • RFC 2475 - An Architecture for Differentiated Services
  • RFC 2597 - Assured Forwarding PHB Group
  • RFC 2598 - An Expedited Forwarding PHB
  • RFC 3246 - An Expedited Forwarding PHB (Per-Hop Behavior)
  • RFC 3260 - New Terminology and Clarifications for Diffserv

How this work

This research describes how the Differentiated Services Code Point(DSCP) works in network to prioritize and sort some flows of IP packages.

Differentiated Services technology defined by Cisco:

Differentiated Services (DiffServ) is a new model in which traffic is treated by intermediate systems with relative priorities based on the type of services (ToS) field. Defined in RFC 2474 and RFC 2475, the DiffServ standard supersedes the original specification for defining packet priority described in RFC 791. DiffServ increases the number of definable priority levels by reallocating bits of an IP packet for priority marking.

Defined by RFC 2474:

Differentiated services enhancements to the Internet protocol are intended to enable scalable service discrimination in the Internet without the need for per-flow state and signaling at every hop. A variety of services may be built from a small, well-defined set of building blocks which are deployed in network nodes.

DS fields

DSCP uses the six first significant bits within ToS header. The last two bits not is used and we not have documents that describe how we uses it.

DS structure: ```

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
  |         DSCP          |  CU   |
  +---+---+---+---+---+---+---+---+

  DSCP: differentiated services codepoint
  CU:   currently unused

```

How is relationship between DSCP and IP precedence fields

My question is: How DSCP works in the same network that have IP PRECEDENCE fields marked.

The DS structure provides interoperability between networks that use the IP PRECEDENCE. The IETF reuse all bits in ToS field as the DS field for DiffServ but maintain total compatibility between both technologies.

Example:

IP PRECEDENCE: ``` 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | 1 | 1 | 0 | | +---+---+---+---+---+---+---+---+

  IP PRECEDENCE
  PRECEDENCE = INTERCONTROL

```

DSCP Code: ```

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
  | 1 | 1 | 0 |                   |
  +---+---+---+---+---+---+---+---+

  DSCP: CS6
  NOTE: CS is Class Selector.

```

CS maintain the interoperability between networks that use IP PRECEDENCE and DSCP to manipulate and sort some data flows.

As example: DSCP IPTOSPRE Space
--------- --------- -------
CS0 ROUTINE 000000
CS1 PRIORITY 001000
CS2 IMMEDIATE 010000
CS3 FLASH 011000
CS4 FLASHOVER 100000
CS5 CRITICECP 101000
CS6 INTERCONTROL 110000
CS7 NETCONTROL 111000

How it works inside network

We have six most significant bits of the DiffServ fields is called as the DSCP. The DiffServ allows to create some mechanisms for conditioning the traffic in network.

I can represent the BE how: ```

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
  | 0 | 0 | 0 | 0 | 0 | 0 |       |
  +---+---+---+---+---+---+---+---+

```

PR Number: kern/102471

How is applicable

You can use how follows to set the classification:

ipfw add 10 dscp AF33 ip from 192.168.0.0/24 to any

You can use to match the package that has the marked flag:

ipfw add 11 count ip from 192.168.0.0/24 to any dscp AF33