htb ratelimite a single source IP
Okay, I'm having a complete brainfart here, I apologize for the stupidity of the question. Just a bit tired.
I have a customer on a shared box, who I gave a dedicated IP to. I also have a router in between our uplink and him, and I need to apply a ratelimit (via htb) on his IP to 10mbit/sec. I'd also like to do some fair queuing just so each connection gets an equal amount of bandwidth if it wants it (trying to stuff 35Mbit of big downloads into 10Mbit.. it's not going to be pretty).
Unfortunately I cannot seem to figure out how to just ratelimit based on the source IP, rather than the interface itself. Obviously ratelimiting our GigE interface to 10meg/sec globally for all customers would be a Very Bad(tm) thing to do. ;)
I know other folk do this, so even just example scripts will give me all I need to get me jumpstarted.
Thanks much,
Phil Doroff
Five Elements, Inc.
[email protected]
ICQ: 25285313
(763) 595-9479
Quoted 10 lines · Phil Doroff
Okay, I'm having a complete brainfart here, I apologize for the stupidity of the question. Just a bit tired.
I have a customer on a shared box, who I gave a dedicated IP to. I also have a router in between our uplink and him, and I need to apply a ratelimit (via htb) on his IP to 10mbit/sec. I'd also like to do some fair queuing just so each connection gets an equal amount of bandwidth if it wants it (trying to stuff 35Mbit of big downloads into 10Mbit.. it's not going to be pretty).
Quoted 7 lines
Unfortunately I cannot seem to figure out how to just ratelimit based on the source IP, rather than the interface itself. Obviously ratelimiting our GigE interface to 10meg/sec globally for all customers would be a Very Bad(tm) thing to do. ;)
I know other folk do this, so even just example scripts will give me all I need to get me jumpstarted.
I have some scripts/docs on www.docum.org.
Some tips : you can only shape outgoing traffic with htb (there is a imq device that you can be sued to use htb for incoming traffic). For the htb setup, create 1 parent class of 1gigabit, 2 child classes : 10mbit for you custumor, 990mbit for the other traffic. You can get some fairness if you add sfq qdisc to the classes.
I hope this help.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/