Witam,
Mam router na Linuxie (Debian etch 4.0, 2.6) i chciałbym profesjonalniej podzielić moje łącze.
Mam firewall-a na iptables, udostępniam internet innym komputerom.
Skompilowałem iproute2 (make, make install).
Następnie zabrałem sie za przycinanie pasma:
eth0 - lan
eth1 - internet
192.168.0.1 - router/serwer
tc qdisc del root dev eth0
tc qdisc add dev eth0 root handle 1:0 htb
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 95000kbit ceil 95000kbit
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 970kbit ceil 970kbit
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 94000kbit ceil 94000kbit
tc class add dev eth0 parent 1:2 classid 1:4 htb rate 500kbit ceil 970kbit
tc class add dev eth0 parent 1:2 classid 1:5 htb rate 200kbit ceil 970kbit
tc filter add dev eth0 protocol ip parent 1:0 u32 match ip src 192.168.0.1 flowid 1:3
tc filter add dev eth0 protocol ip parent 1:0 u32 match ip src 192.168.0.2 flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 u32 match ip src 192.168.0.3 flowid 1:5
tc qdisc add dev eth0 parent 1:3 handle 3:0 sfq perturb 10
tc qdisc add dev eth0 parent 1:4 handle 4:0 sfq perturb 10
tc qdisc add dev eth0 parent 1:5 handle 5:0 sfq perturb 10
Niestety nie spełnia to moich oczekiwań.
Chciałbym, zarezerwować pozostały rate (download) z głównej kolejki 270kbit dla serwera (mam kilka usług), poztym zarezerwować prawie cały (80% rate uploadu) upload dla niego, a gdy serwer nie korzysa z uploadu to kierować z ograniczeniem na komputery lokalne w sieci LAN. Czyli komputery w LAN-ie zawsze będa miały 20% uploadu, a więcej to tylko wtedy kiedy serwer nie będzie korzystał.
Prosiłbym o wyrozumiałość, z Linuxem dopiero miesiąc mam do czynienia.