summaryrefslogtreecommitdiff
path: root/examples/QOS/Diffserv/README
blob: 285d514ad129739118049a1b9081e25d63fa40d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
This directory contains an example which
tests the setting of the Diffserv Codepoint (DSCP)
values in the
IP TOS field of a stream of UDP packets.

Running the example
===================

(1)  On one host, run: 
        server [UDP port number]

     If port number is omitted, a default port number of 20002
     is used.

(2)  On a second host, run:
        diffserv_test [destination host] [destination port]

        The host and port of where the server is running should
        be specified.

     A stream of UDP packets will be sent from to the server,
     with various codepoints set.

(3)  Look at the Diffserv Field (formerly known as the TOS field)
     of your packets, using a protocol analyzer, such as Ethereal.




Introduction
============
In RFC 2474, the Type of Service (TOS) field in 
the IP header was renamed the Diffserv (DS) field.
The DS field is one octet (8 bits).

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

The first 6 bits of the field are
reserved for the Diffserv Codepoint (DSCP).
There are 64 possible values (0-63) for the DSCP.

Bits 6 and 7 of the DS field are reserved
for Explicit Congestion Notification (ECN).
ECN is defined in RFC 3168.


Per-Hop Behaviors (PHB)
=======================

A Per-Hop Behavior (PHB) is a description of the externally
observable forwarding treatment applied at a differentiated
services compliant node.

Certain PHB's are defined in RFC's and associated with
different DSCP values.  Other values are undefined and left
for experimentation.  Please refer to the RFC's for a full
explanation of the attributes of the various PHB's.


DSCP value     PHB                          RFC
(binary)
-----------------------------------------------------------
000000         Default (Best Effort)        2474
001000         Class Selector (CS1)         2474
010000         Class Selector (CS2)         2474
011000         Class Selector (CS3)         2474
100000         Class Selector (CS4)         2474
101000         Class Selector (CS5)         2474
110000         Class Selector (CS6)         2474
111000         Class Selector (CS7)         2474
001010         Assured Forwarding (AF11)    2597
001100         Assured Forwarding (AF12)    2597
001110         Assured Forwarding (AF13)    2597
010010         Assured Forwarding (AF21)    2597
010100         Assured Forwarding (AF22)    2597
010110         Assured Forwarding (AF23)    2597
011010         Assured Forwarding (AF31)    2597
011100         Assured Forwarding (AF32)    2597
011110         Assured Forwarding (AF33)    2597
100010         Assured Forwarding (AF41)    2597
100100         Assured Forwarding (AF42)    2597
100110         Assured Forwarding (AF43)    2597
101110         Expedited Forwarding (EF)    2598


References
==========
RFC 2474, "Definition of the Differentiated Services (DS Field)
           in the IPv4 and IPv6 Headers", http://www.ietf.org/rfc/rfc2474.txt

RFC 2475, "An Architecture for Differentiated Services",
           http://www.ietf.org/rfc/rfc2475.txt

RFC 2597, "Assured Forwarding PHB Group", http://www.ietf.org/rfc/rfc2597.txt

RFC 3246, "An Expedited Forwarding PHB", http://www.ietf.org/rfc/rfc3246.txt

RFC 3247, "Supplemental Information for the New Definition of the EF PHB", 
          http://www.ietf.org/rfc/rfc3247.txt

RFC 3168, "The Addition of Explicit Congestion Notification (ECN)
           to IP", http://www.ietf.org/rfc/rfc3168.txt

Ethereal, http://www.ethereal.com