Shaping by IP's

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If in one time 3 IP adresses using internet. TC script:

DEV=eth0 # LAN
SERVER_IP=192.168.1.2 # eth0 ip address
tc qdisc add dev $DEV root handle 1: htb default 255
tc class add dev $DEV parent 1: classid 1:1 htb rate 384Kbit quantum 
1500

tc class add dev $DEV parent 1:1 classid 1:20 htb rate 128Kbit ceil 
384Kbit prio 0 quantum 1500
tc class add dev $DEV parent 1:1 classid 1:21 htb rate 128Kbit ceil 
384Kbit prio 0 quantum 1500
tc class add dev $DEV parent 1:1 classid 1:22 htb rate 128Kbit ceil 
384Kbit prio 0 quantum 1500

tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 6
tc qdisc add dev $DEV parent 1:21 handle 21: sfq perturb 6
tc qdisc add dev $DEV parent 1:22 handle 22: sfq perturb 6

tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 20 fw 
flowid 1:20
tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 21 fw 
flowid 1:21
tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 22 fw 
flowid 1:22

iptables -t mangle -I POSTROUTING -o $DEV -s ! $SERVER_IP -d 192.168.
1.20 -j MARK --set-mark 20
iptables -t mangle -I POSTROUTING -o $DEV -s ! $SERVER_IP -d 192.168.
1.21 -j MARK --set-mark 21
iptables -t mangle -I POSTROUTING -o $DEV -s ! $SERVER_IP -d 192.168.
1.22 -j MARK --set-mark 22


If we swiched on 2 PC's (192.168.1.20 & 192.168.1.21) many p2p 
programs, FTP with many conections, and on 3d PC
(192.168.1.22) FTP downloading with one conection. then 3d PC getin 
less than 128kbit. If i want that all 3 PC's get
NOT LESS than 128kbit, what should I do with my script?

If I could solve this BIG problem, than I could use it with my 
IPShaping script and user at night, when flow is free, he could get
all internet speed.
<--------------------===================================-------------------->
           DELFI mail pašto sistema http://www.mail.lt
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux