Skip to contentSkip to conversation

How to limit per tcp session ?

LARTC Rio Martin 4 participants 8 messages Jun 16, 2004 – Jun 18, 2004

lore
Share & tools
lore

Rio Martin

author
#0 lore raw

Dear folks,
I ve fully read lartc.txt document to make sure my question still unexplained in that document. I want to limit per tcp session, how to do that with HTB or CBQ ?

Inside lartc.txt, there is an example for full NAT QoS solution, but thats not what i meant.

Thanks..

Regards,
Rio Martin.
--

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 9 lines · Rio Martin

Dear folks,
I ve fully read lartc.txt document to make sure my question still unexplained in that document. I want to limit per tcp session, how to do that with HTB or CBQ ?

Inside lartc.txt, there is an example for full NAT QoS solution, but thats not what i meant.

Yes, I would be interested to hear any ideas on how to do this. Think of running a hosted ASP type box where people can connect from anywhere, but you want to limit each to (say) a max of 5Kbyte/s, perhaps with some burstable excess, but that's optional.

Ed W
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Rio Martin

I've been told previously that this was not possible for the current setup (though I'd be happy to be corrected now). I was wondering how one would go about funding such an effort to be added to the current tc? I've heard from several people who would be interested, and it seems that it should be feasible to add to the current tc programs (though I admit ignorance in the simplicity).

If there are any kernel/tc developers reading, I'd be interested in finding out what it would take to have this added (as apparently would others).

Thanks,

Bill

Quoted 22 lines · Ed Wildgoose
Quoted 9 lines · Rio Martin

Dear folks,
I ve fully read lartc.txt document to make sure my question still unexplained in that document. I want to limit per tcp session, how to do that with HTB or CBQ ?

Inside lartc.txt, there is an example for full NAT QoS solution, but thats not what i meant.

Yes, I would be interested to hear any ideas on how to do this. Think of running a hosted ASP type box where people can connect from anywhere, but you want to limit each to (say) a max of 5Kbyte/s, perhaps with some burstable excess, but that's optional.

Ed W
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Signature · 6 lines
"If you do not understand, or cannot read, all directions, cautions and
warnings, do not use this product."
  -- drain cleaner warning label
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
author
#3 lore raw
In reply to Rio Martin
Quoted 11 lines · Bill Denney

I've been told previously that this was not possible for the current setup (though I'd be happy to be corrected now). I was wondering how one would go about funding such an effort to be added to the current tc? I've heard from several people who would be interested, and it seems that it should be feasible to add to the current tc programs (though I admit ignorance in the simplicity).
If there are any kernel/tc developers reading, I'd be interested in finding out what it would take to have this added (as apparently would others).
Thanks,
Bill

I'm so surprised with all reply from the list. I thought someone has figured it out how :))

Okay, then let me describe whats on my mind to help develope this project (if someone dare to start make a project)

The idea perhaps like this:
Let say i'm goin to download some graphics from www.lartc.org. The first session i opened my browser, created connection localhost:3101 --> www.lartc.org:80, the 2nd, localhost:3102 --> www.lartc.org:80, and so on. So as you could see, this is the key. Source port, not Destination port. Every time you open new window of your browser and connect to some host, they create other originating port which is completely different from the 1st.

If i am crazy enough, then i'll create script to write and put Originating port of some host or network from 1 until 65535 into qdisc. But i dont think this is a good solution for this and i dont think there is no side effect for this.

I think, i'll let developers figure it out.
Thanks once again.

Regards,.
Rio Martin.
--
IT Engineer of ITENAS.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#4 lore raw
In reply to Rio Martin
Quoted 4 lines

Okay, then let me describe whats on my mind to help develope this project (if someone dare to start make a project)

Quoted 9 lines

The idea perhaps like this:
Let say i'm goin to download some graphics from www.lartc.org. The first session i opened my browser, created connection localhost:3101 --> www.lartc.org:80, the 2nd, localhost:3102 --> www.lartc.org:80, and so on. So as you could see, this is the key. Source port, not Destination port. Every time you open new window of your browser and connect to some host, they create other originating port which is completely different from the 1st.

Hmm, I think the ESFQ module *might* be able to do a little of what you ask if you hash on port? Worth a look anyway. In fact you might even be able to tweak the code to hash on something different?

Ed W
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#5 lore raw
In reply to Rio Martin
Quoted 6 lines · Rio Martin

I'm so surprised with all reply from the list. I thought someone has figured it out how :))

Okay, then let me describe whats on my mind to help develope this project (if someone dare to start make a project)

Quoted 7 lines

The idea perhaps like this:
Let say i'm goin to download some graphics from www.lartc.org. The first session i opened my browser, created connection localhost:3101 --> www.lartc.org:80, the 2nd, localhost:3102 --> www.lartc.org:80, and so on. So as you could see, this is the key. Source port, not Destination port. Every time you open new window of your browser and connect to some host, they create other originating port which is completely different from the 1st.

How many concurrent tcp connections per page depends on the browser and server settings - both tweakable, so you would get different speeds depending on site/browser combination.

Why do you need to do per tcp? There may be a better way to solve your problem.

Andy.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#6 lore raw
In reply to Rio Martin
Quoted 16 lines · Ed Wildgoose
Quoted 4 lines

Okay, then let me describe whats on my mind to help develope this project (if someone dare to start make a project)

Quoted 11 lines

The idea perhaps like this:
Let say i'm goin to download some graphics from www.lartc.org. The first session i opened my browser, created connection localhost:3101 --> www.lartc.org:80, the 2nd, localhost:3102 --> www.lartc.org:80, and so on.
So as you could see, this is the key. Source port, not Destination port. Every time you open new window of your browser and connect to some host, they create other originating port which is completely different from the 1st.

Quoted 3 lines

Hmm, I think the ESFQ module *might* be able to do a little of what you ask if you hash on port? Worth a look anyway. In fact you might even be able to tweak the code to hash on something different?

You could probably do the hash bit, but (e)sfq doesn't rate limit, so rate per tcp would vary with the number of connections.

Andy.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#7 lore raw
In reply to Rio Martin
Quoted 8 lines · Andy Furniss

How many concurrent tcp connections per page depends on the browser and server settings - both tweakable, so you would get different speeds depending on site/browser combination.

Why do you need to do per tcp? There may be a better way to solve your problem.

Andy.

My reason is not web traffic; it's citrix. I know that each user will have one port open between their computer and the server. I want what he's wanting (rate limiting per session) for that. I think that he wants something similar (since he mentioned interest as an ASP), but he was just using an easier to visualize example.

Bill

Signature · 7 lines
"The tax which will be paid for the purpose of education is not more than
the thousandth part of what will be paid to kings, priests and nobles who
will rise up among us if we leave the people in ignorance."
  -- Thomas Jefferson
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/