Avvio:
vstart pc11 --eth0=lan0 -M64
vstart gw12 --eth0=lan0 --eth1=lan1 -M64
vstart pc12 --eth0=lan1 -M64
vstart pc22 --eth0=lan1 -M64


GW12:
ifconfig eth0 160.80.85.100
ifconfig eth1 160.81.85.100

tc qdisc add dev eth1 root handle 1: htb default 1
tc class add dev eth1 parent 1: classid 1:1 htb rate 2Mbit ceil 2Mbit
tc qdisc add dev eth1 parent 1:1 handle 2: prio bands 3
tc qdisc add dev eth1 parent 2:1 handle 3: tbf rate 1Mbit latency 20ms burst 5kb

tc qdisc add dev eth1 parent 2:2 handle 4: htb
tc class add dev eth1 parent 4: classid 4:1 htb rate 2Mbit ceil 2Mbit
tc class add dev eth1 parent 4:1 classid 4:2 htb rate 500Kbit ceil 2Mbit
tc class add dev eth1 parent 4:1 classid 4:3 htb rate 300Kbit ceil 2Mbit
tc class add dev eth1 parent 4:1 classid 4:4 htb rate 200Kbit ceil 2Mbit

tc filter add dev eth1 parent 2: protocol ip prio 1 u32 match ip tos 48 0xff flowid 2:1
tc filter add dev eth1 parent 2: protocol 0x0003 prio 2 u32 match u8 0x0 0x0 flowid 2:2

tc filter add dev eth1 parent 4: protocol ip prio 1 u32 match ip tos 160 0xff flowid 4:2
tc filter add dev eth1 parent 4: protocol ip prio 1 u32 match ip tos 0 0xff flowid 4:3
tc filter add dev eth1 parent 4: protocol 0x0003 prio 2 u32 match u8 0x0 0x0 flowid 4:4
