LAboratorio 15.10.2010


Cronologico Percorso di conversazione 
  • From: Andrea Detti < >
  • To:
  • Subject: LAboratorio 15.10.2010
  • Date: Fri, 15 Oct 2010 14:39:07 +0200
  • Organization: University of Rome Tor Vergata


-- 
---------------------------------------
 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
 Mobile: +39-320-4391909
 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

---------- filtro arp
PC1:~# tc filter add dev eth0 parent 2: protocol 0x0003 prio 1 u32 match u16 
0x0806 0xffff at -2 flowid 2:1

PC1:~# tc filter add dev eth0 parent 2: protocol ip prio 2 u32 match ip tos 
48 0xff flowid 2:1
PC1:~# tc filter add dev eth0 parent 2: protocol ip prio 2 u32 match ip tos 
160 0xff flowid 2:2
PC1:~# tc filter del dev eth0 parent 2: protocol ip prio 3 u32 match ip tos 0 
0x00 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:~# arping 192.168.0.2
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 &



---- scheduler HTB  3 classi (0.5M, 0.35M, 0.15M)
PC1:/hosthome# tc qdisc del dev eth0 parent root
PC1:/hosthome# tc qdisc add dev eth0 parent root handle 1: htb default 1 
PC1:/hosthome# tc class add dev eth0 parent 1: classid 1:1 htb rate 1Mbit 
ceil 1Mbit
PC1:/hosthome# tc class add dev eth0 parent 1:1 classid 1:2 htb rate 0.5Mbit 
ceil 1Mbit
PC1:/hosthome# tc class add dev eth0 parent 1:1 classid 1:3 htb rate 0.35Mbit 
ceil 1Mbit
PC1:/hosthome# tc class add dev eth0 parent 1:1 classid 1:4 htb rate 0.15Mbit 
ceil 1Mbit
PC1:/hosthome# tc filter add dev eth0 parent 1: protocol 0x0003 prio 1 u32 
match u16 0x0806 0xffff at -2 flowid 1:2
PC1:/hosthome# tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match 
ip tos 48 0xff flowid 1:2
PC1:/hosthome# tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match 
ip tos 160 0xff flowid 1:3
PC1:/hosthome# tc filter add dev eth0 parent 1: protocol ip prio 3 u32 match 
ip tos 0 0x00 flowid 1:4
PC1:/hosthome# ./iperf -c 192.168.0.4 -u -b 0.8M -S 48 -t 360 & 
PC1:/hosthome# ./iperf -c 192.168.0.3 -u -b 0.8M -S 160 -t 360 & 
PC1:/hosthome# ./iperf -c 192.168.0.2 -u -b 0.8M -S 0 -t 360 & 






  • LAboratorio 15.10.2010, Andrea Detti

Archivio con motore MhonArc 2.6.16.

§