[linux] A zasa to HTB..zaopar otazok.

Lukas fogot na host.sk
Pátek Listopad 14 09:35:15 CET 2003


Zdar.
Takze mam  problem s nastavenim HTB.
Situacia: Distribucia Devil-Linux 1.0 
Kernel 2.4.22 grsec
Linka 512/192kbit/s
Linux rooter P75,32ram
2x combo sietvky:eth0-net , eth1-lan
Poprve neviem ani na ktorom zariadeni mam shapovat download.
Nikde sa nehovori ci na eth0 alebo eth1.

Nastavenia:
tc qdisc dev eth0 root handle 1:0 htb default 11
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 500kbit ceil 500kbit

tc class add dev eth0 parent 1:1 classid 1:11 htb rate 200kbit ceil 500kbit
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 200kbit ceil 500kbit

no a filtre som skusal 2 sposoby:

najprvklasicky u32:

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
   match ip src 192.168.0.1 flowid 1:11
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
   match ip src 192.168.0.2 flowid 1:12

neskor aj pomocou iptables

iptables -t mangle -F FORWARD
iptables -t mangle -A FORWARD -j MARK --set-mark 4
iptables -t mangle -A FORWARD -d 192.168.0.1 -j MARK --set-mark 1
iptables -t mangle -A FORWARD -d 192.168.0.2 -j MARK --set-mark 2

tc filter add dev eth0 parent 1:0 protocol ip handle 1 fw flowid 1:11
tc filter add dev eth0 parent 1:0 protocol ip handle 2 fw flowid 1:12
tc filter add dev eth0 parent 1:0 protocol ip handle 4 fw flowid 1:11


Bohuzial mi to vobec neshajpuje.

Pritom vo vypisoch pomocou 
tc qdisc show dev eth0 
tc class show dev eth0
tc filter show dev eth0

je vsetko v poriatku.
V com je problem?

Dakujem za kazdu radu.
Lukas










Další informace o konferenci linux