- From: Andrea Detti <
>
- To:
- Subject: Laboratorio 14/10/2008
- Date: Tue, 14 Oct 2008 14:33:40 +0200
Testo di riferimento per Linux Trafic Control:
http://lartc.org/howto/
Manuali
http://linux.die.net/man/8/tc
http://linux.die.net/man/8/tc-htb
http://linux.die.net/man/8/tc-prio
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Ciao,
Andrea
--
---------------------------------------
Andrea Detti, PhD
Dip. Ingegneria Elettronica
Universita' di Roma "Tor Vergata"
Via del Politecnico 1, 00133 Roma, Italy
Tel.: +39-06-7259-7285
Fax : +39-06-7259-7435
email:
---------------------------------------
vstart PC1 --eth0=A -M 64
vstart PC2 --eth0=A -M 64
vstart PC3 --eth0=A -M 64
vstart PC4 --eth0=A -M 64
PC1:~# ifconfig eth0 192.168.0.1
PC2:~# ifconfig eth0 192.168.0.2
PC3:~# ifconfig eth0 192.168.0.3
PC4:~# ifconfig eth0 192.168.0.4
PC1:~# tc qdisc add dev eth0 root handle 1: htb default 1
PC1:~# tc class add dev eth0 parent 1: classid 1:1 htb rate 1Mbit ceil 1Mbit
PC1:~# tc qdisc add dev eth0 parent 1:1 handle 2: prio bands 3
PC1:~# tc filter add dev eth0 parent 2: protocol ip prio 1 u32 match ip tos
48 0xff flowid 2:1
PC1:~# tc filter add dev eth0 parent 2: protocol ip prio 1 u32 match ip tos
160 0xff flowid 2:2
PC1:~# tc filter add dev eth0 parent 2: protocol ip prio 1 u32 match ip tos 0
0xff flowid 2:3
--- Debug Qdisc ---
PC1:~# tc -s filter show dev eth0 parent 2:
PC1:~# tc -s class show dev eth0
PC1:~# tc -s qdisc show dev eth0
PC1:~# ping 192.168.0.2 -Q 48
PC1:~# tc -s class show dev eth0
--- Prova iperf (entrare nella cartella di iperf)
PC2:~# ./iperf -s -u -i 1
PC3:~# ./iperf -s -u -i 1
PC4:~# ./iperf -s -u -i 1
PC1:~# ./iperf -c 192.168.0.4 -u -S 48 -b 800k -t 120 &
PC1:~# ./iperf -c 192.168.0.3 -u -S 160 -b 800k -t 120 &
PC1:~# ./iperf -c 192.168.0.2 -u -S 0 -b 800k -t 120 &
- Laboratorio 14/10/2008, Andrea Detti
Archivio con motore MhonArc 2.6.16.