wikiroute

networking recipes

User Tools

Site Tools


qos_project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
qos_project [2017/12/07 14:42] – [6. [CO3] Shaping the Traffic] enwanqos_project [2017/12/15 10:59] – [7. [PO2] Implementing QoS] romy
Line 242: Line 242:
  
   * 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 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 go to network and specify the network URL : udp://@:1234 and finally we click on play.  +  * On the client side: we open VLC and then we click on playgo to network and specify the network url''udp:\\@:1234'' and finally we click on play. 
- +
 ===== -. [CO3] Shaping the Traffic  ===== ===== -. [CO3] Shaping the Traffic  =====
    
Line 268: Line 266:
  
 We run flent with VLC and we noticed that the video wasn't affected because flent uses TCP. 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, on the router by typing the following command : 
 +
 +<code bash> tc qdisc ls </code>
 +
 +To delete the previous configurations we can use : 
 +
 +<code bash> tc qdisc del dev eth1 root </code>
 +__**
 +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>
 +<code bash> tc class add dev eth1 parent 1: classid 1:1 hfsc sc rate 8000kbit ul rate 8000kbit </code>
 +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/100)*8000)= 6960 Kbit and in the second case it's 1040 Kbit.
 +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>
 +<code bash> tc class add dev eth1 parent 1:1 classid 1:50 hfsc ls rate 1040kbit ul rate 8000kbit </code>
 +<code bash> iptables -t mangle -A POSTROUTING -o eth1 -p udp --dport 1234 -j CLASSIFY --set-class 1:40 </code>
 +<code bash> iptables -t mangle -A POSTROUTING -o eth1 -p udp --dport 5201 -j CLASSIFY --set-class 1:50 </code>
 +  
 +To see the iptables commands excecuted on the router we can use:
 +
 +<code bash> iptables -t mangle -L </code>
 + 
qos_project.txt · Last modified: 2021/08/28 09:58 by samer