iperf and QOS/TOS Settings

iPerf is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, protocols, and buffers. For each test, it reports the bandwidth, loss, and other parameters.

QoS (Quality of Service) is a set of technologies used to manage network traffic in a cost-effective manner to enhance user experiences for various applications.

TOS (Type of Service) is a field in the IPv4 header which is used for Precedence, Delay, Throughput, and Reliability. It can be used to prioritize different types of traffic.



Cisco QOS Best Practices:


Using iperf with those values:
In each of these commands, replace with the IP address of the machine you want to test against.

Also, ensure that iperf is running in server mode (iperf -s) on the destination machine.

1. Routing (CS6) – ToS value 0xC0

iperf -c -S 192

2. Voice (EF) – ToS value 0xB8

iperf -c -S 184

3. Interactive-Video (AF41) – ToS value 0x88

iperf -c -S 136

4. Streaming-Video (CS4) – ToS value 0x80

iperf -c -S 128

5. Mission-Critical (AF31) – ToS value 0x68

iperf -c -S 104

6. Call-Signaling (CS3) – ToS value 0x60

iperf -c -S 96

7. Transactional Data (AF21) – ToS value 0x48

iperf -c -S 72

8. Network Management (CS2) – ToS value 0x40

iperf -c -S 64

9. Bulk Data (AF11) – ToS value 0x28

iperf -c -S 40

10. Scavenger (CS1) – ToS value 0x20

iperf -c -S 32

11. Best Effort (0) – ToS value 0x00

iperf -c -S 0

To set the Type of Service (ToS) value using iperf, you can use the `-S` flag. The value is an integer between 0 and 255. Below is a list of how you could test the different classes of service. Note that the values are hexadecimal, so they will need to be converted to decimal for use with iperf.

The `-q` parameter can be used in iperf3 to set the DSCP (Differentiated Services Code Point) value directly. You can express the value directly in decimal form without conversion. Here are the examples using `-q` with DSCP:

1. Routing (CS6) – DSCP value 48

iperf3 -c -q 48

2. Voice (EF) – DSCP value 46

iperf3 -c -q 46

3. Interactive-Video (AF41) – DSCP value 34

iperf3 -c -q 34

4. Streaming-Video (CS4) – DSCP value 32

iperf3 -c -q 32

5. Mission-Critical (AF31) – DSCP value 26

iperf3 -c -q 26

6. Call-Signaling (CS3) – DSCP value 24

iperf3 -c -q 24

7. Transactional Data (AF21) – DSCP value 18

iperf3 -c -q 18

8. Network Management (CS2) – DSCP value 16

iperf3 -c -q 16

9. Bulk Data (AF11) – DSCP value 10

iperf3 -c -q 10

10. Scavenger (CS1) – DSCP value 8

iperf3 -c -q 8

11. Best Effort (0) – DSCP value 0

iperf3 -c -q 0

As wit the -S flag for ToS, setting the DSCP value with -q just marks packets with the specified value; it does not actually provide QoS. You need a network infrastructure configured to recognize and prioritize DSCP-marked traffic for QoS.