qos_project
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
qos_project [2017/12/06 11:19] – [VLC Tool] enwan | qos_project [2017/12/15 11:40] – [8. [PO3] Analyzing QoS] carine | ||
---|---|---|---|
Line 237: | Line 237: | ||
* On the Client side: '' | * On the Client side: '' | ||
- | ==== VLC Tool ==== | + | ==== -.VLC Tool ==== |
Let us now analyze the VLC application. VLC media player is a a highly portable multimedia player for various audio, video, streaming protocol. | Let us now analyze the VLC application. VLC media player is a a highly portable multimedia player for various audio, video, streaming protocol. | ||
- | * On the Server side: we open VLC media player : Go to media --> stream --> we add the desired video --> Stream --> Next --> for the new destination we choose UDP legacy then we click on add --> we add the destination IP address 192.168.100.111 (client) and the port number 1234 --> next --> we uncheck the active transcoding --> next --> | + | * On the Server side: we open VLC media player : Go to media - stream - we add the desired video - Stream - Next - for the new destination we choose UDP legacy then we click on add - we add the destination IP address 192.168.100.111 (client) and the port number 1234 - next - we uncheck the active transcoding - next stream. |
- | * On the client side: we open VLC and then we click on play--> | + | * On the client side: we open VLC and then we click on play, go to network and specify the network |
===== -. [CO3] Shaping the Traffic | ===== -. [CO3] Shaping the Traffic | ||
- | We first tried to limit the bandwidth using the following command | + | We first tried to limit the bandwidth using the following command |
<code bash> tc qdisc add dev eth1 root handle 1: cbq avpkt 1000 bandwidth 8mbit </ | <code bash> tc qdisc add dev eth1 root handle 1: cbq avpkt 1000 bandwidth 8mbit </ | ||
- | On the Wan interface | + | On the Wan interface |
<code bash> tc qdisc add dev eth0 root tbf rate 8000kbit burst 10kb latency 50ms </ | <code bash> tc qdisc add dev eth0 root tbf rate 8000kbit burst 10kb latency 50ms </ | ||
Line 264: | Line 263: | ||
<code bash> tc qdisc del dev eth0 root </ | <code bash> tc qdisc del dev eth0 root </ | ||
+ | Exceeded : | ||
+ | We run flent with VLC and we noticed that the video wasn't affected because flent uses TCP. | ||
- | | + | ===== -. [PO2] Implementing QoS ===== |
+ | The QoS will be implemented on the outgoing interface (Wan) of the router TP-Link. | ||
+ | First, we have to check the existing configuration, | ||
+ | <code bash> tc qdisc ls </ | ||
+ | To delete the previous configurations we can use : | ||
+ | <code bash> tc qdisc del dev eth1 root </ | ||
+ | __** | ||
+ | Traffic classification and scheduling :**__ | ||
+ | The scheduler we will be using is the Hierarchical fair-service curve (HFSC). | ||
+ | We start by creating a common class for all types of traffic. The used commands for this are: | ||
+ | <code bash> tc qdisc add dev eth1 root handle 1: hfsc default 20 </ | ||
+ | <code bash> tc class add dev eth1 parent 1: classid 1:1 hfsc sc rate 8000kbit ul rate 8000kbit </ | ||
+ | Supposing we have two types of traffic: Video UDP associated with class 1:40 running on destination port 1234, and iperf UDP with class 1:50 running on destination port 5201. In the first case, the dedicated bandwidth is ((87/ | ||
+ | The following commands are used: | ||
+ | <code bash> tc class add dev eth1 parent 1:1 classid 1:40 hfsc ls rate 6960kbit ul rate 8000kbit </ | ||
+ | <code bash> tc class add dev eth1 parent 1:1 classid 1:50 hfsc ls rate 1040kbit ul rate 8000kbit </ | ||
+ | <code bash> iptables -t mangle -A POSTROUTING -o eth1 -p udp --dport 1234 -j CLASSIFY --set-class 1:40 </ | ||
+ | <code bash> iptables -t mangle -A POSTROUTING -o eth1 -p udp --dport 5201 -j CLASSIFY --set-class 1:50 </ | ||
+ | | ||
+ | To see the iptables commands excecuted on the router we can use: | ||
+ | <code bash> iptables -t mangle -L </ | ||
+ | ===== -. [PO3] Analyzing QoS ===== | ||
+ | In this section, we have to consider different congestion scenarios: The link between the two routers will have a bandwidth of 16 Mb/s, 8 Mb/s and 5 Mb/s. | ||
+ | __**1. 16Mb/s**__ | ||
+ | First, we have to create a common class 1:1 for all types of traffic, as before. | ||
+ | Then, the following commands are executed in order to create two classes: 1:20 for video udp traffic with a bandwidth of ((87*16000)/ | ||
+ | <code bash> tc class add dev eth1 parent 1:1 classid 1:20 hfsc ls rate 13920kbit ul rate 16000kbit </ | ||
+ | <code bash> tc class add dev eth1 parent 1:1 classid 1:30 hfsc ls rate 2080kbit ul rate 16000kbit </ | ||
+ | <code bash> iptables -t mangle -A POSTROUTING -o eth1 -p udp --dport 1234 -j CLASSIFY --set-class 1:20 </ | ||
+ | <code bash> iptables -t mangle -A POSTROUTING -o eth1 -p udp --dport 5201 -j CLASSIFY --set-class 1:30 </ | ||
+ | <code bash> iptables -t mangle -A POSTROUTING -o eth1 -p tcp --dport 5202 -j CLASSIFY --set-class 1:30 </ | ||
+ | We will be running three types of traffic: | ||
+ | * VLC video udp | ||
+ | * iperf udp traffic on destination port 5201 | ||
+ | * iperf tcp traffic on destination port 5202, using the following commands: | ||
+ | **On the server side:** | ||
+ | <code bash> iperf3 -s -p 5202 </ | ||
+ | **On the client side:** | ||
+ | <code bash> iperf3 -c 192.168.100.111 -P 3 -p 5202 -t 75 </ |
qos_project.txt · Last modified: 2021/08/28 09:58 by samer