| 1 |
|
| 2 |
|
| 3 |
This directory contains an example which |
| 4 |
tests the setting of the Diffserv Codepoint (DSCP) |
| 5 |
values in the |
| 6 |
IP TOS field of a stream of UDP packets. |
| 7 |
|
| 8 |
Running the example |
| 9 |
=================== |
| 10 |
|
| 11 |
(1) On one host, run: |
| 12 |
server [UDP port number] |
| 13 |
|
| 14 |
If port number is omitted, a default port number of 20002 |
| 15 |
is used. |
| 16 |
|
| 17 |
(2) On a second host, run: |
| 18 |
diffserv_test [destination host] [destination port] |
| 19 |
|
| 20 |
The host and port of where the server is running should |
| 21 |
be specified. |
| 22 |
|
| 23 |
A stream of UDP packets will be sent from to the server, |
| 24 |
with various codepoints set. |
| 25 |
|
| 26 |
(3) Look at the Diffserv Field (formerly known as the TOS field) |
| 27 |
of your packets, using a protocol analyzer, such as Ethereal. |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
Introduction |
| 33 |
============ |
| 34 |
In RFC 2474, the Type of Service (TOS) field in |
| 35 |
the IP header was renamed the Diffserv (DS) field. |
| 36 |
The DS field is one octet (8 bits). |
| 37 |
|
| 38 |
0 1 2 3 4 5 6 7 |
| 39 |
+---+---+---+---+---+---+---+---+ |
| 40 |
| DSCP | ECN | |
| 41 |
+---+---+---+---+---+---+---+---+ |
| 42 |
|
| 43 |
The first 6 bits of the field are |
| 44 |
reserved for the Diffserv Codepoint (DSCP). |
| 45 |
There are 64 possible values (0-63) for the DSCP. |
| 46 |
|
| 47 |
Bits 6 and 7 of the DS field are reserved |
| 48 |
for Explicit Congestion Notification (ECN). |
| 49 |
ECN is defined in RFC 3168. |
| 50 |
|
| 51 |
|
| 52 |
Per-Hop Behaviors (PHB) |
| 53 |
======================= |
| 54 |
|
| 55 |
A Per-Hop Behavior (PHB) is a description of the externally |
| 56 |
observable forwarding treatment applied at a differentiated |
| 57 |
services compliant node. |
| 58 |
|
| 59 |
Certain PHB's are defined in RFC's and associated with |
| 60 |
different DSCP values. Other values are undefined and left |
| 61 |
for experimentation. Please refer to the RFC's for a full |
| 62 |
explanation of the attributes of the various PHB's. |
| 63 |
|
| 64 |
|
| 65 |
DSCP value PHB RFC |
| 66 |
(binary) |
| 67 |
----------------------------------------------------------- |
| 68 |
000000 Default (Best Effort) 2474 |
| 69 |
001000 Class Selector (CS1) 2474 |
| 70 |
010000 Class Selector (CS2) 2474 |
| 71 |
011000 Class Selector (CS3) 2474 |
| 72 |
100000 Class Selector (CS4) 2474 |
| 73 |
101000 Class Selector (CS5) 2474 |
| 74 |
110000 Class Selector (CS6) 2474 |
| 75 |
111000 Class Selector (CS7) 2474 |
| 76 |
001010 Assured Forwarding (AF11) 2597 |
| 77 |
001100 Assured Forwarding (AF12) 2597 |
| 78 |
001110 Assured Forwarding (AF13) 2597 |
| 79 |
010010 Assured Forwarding (AF21) 2597 |
| 80 |
010100 Assured Forwarding (AF22) 2597 |
| 81 |
010110 Assured Forwarding (AF23) 2597 |
| 82 |
011010 Assured Forwarding (AF31) 2597 |
| 83 |
011100 Assured Forwarding (AF32) 2597 |
| 84 |
011110 Assured Forwarding (AF33) 2597 |
| 85 |
100010 Assured Forwarding (AF41) 2597 |
| 86 |
100100 Assured Forwarding (AF42) 2597 |
| 87 |
100110 Assured Forwarding (AF43) 2597 |
| 88 |
101110 Expedited Forwarding (EF) 2598 |
| 89 |
|
| 90 |
|
| 91 |
References |
| 92 |
========== |
| 93 |
RFC 2474, "Definition of the Differentiated Services (DS Field) |
| 94 |
in the IPv4 and IPv6 Headers", http://www.ietf.org/rfc/rfc2474.txt |
| 95 |
|
| 96 |
RFC 2475, "An Architecture for Differentiated Services", |
| 97 |
http://www.ietf.org/rfc/rfc2475.txt |
| 98 |
|
| 99 |
RFC 2597, "Assured Forwarding PHB Group", http://www.ietf.org/rfc/rfc2597.txt |
| 100 |
|
| 101 |
RFC 3246, "An Expedited Forwarding PHB", http://www.ietf.org/rfc/rfc3246.txt |
| 102 |
|
| 103 |
RFC 3247, "Supplemental Information for the New Definition of the EF PHB", |
| 104 |
http://www.ietf.org/rfc/rfc3247.txt |
| 105 |
|
| 106 |
RFC 3168, "The Addition of Explicit Congestion Notification (ECN) |
| 107 |
to IP", http://www.ietf.org/rfc/rfc3168.txt |
| 108 |
|
| 109 |
Ethereal, http://www.ethereal.com |