All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolaj Fogh <nfogh@vectory.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] help on ADSL shaping
Date: Mon, 02 Aug 2004 13:22:18 +0000	[thread overview]
Message-ID: <410E400A.2010309@vectory.com> (raw)
In-Reply-To: <3818.80.160.199.114.1091399239.squirrel@webmail1.b-one.nu>

jakob@simon-gaarde.dk wrote:

>>jakob@simon-gaarde.dk wrote:
>>
>>    
>>
>>>Hi
>>>I have read the howto on qdisc's a few times but I cant figure out how to
>>>use the shaping capabilities to serve my needs. In the village whera I
>>>live we have created a wireless local network consisting of 10 houses.
>>>One
>>>of these houses has an ADSL connection and services this connection to
>>>the
>>>other houses. To gain access to the network a member must have an
>>>accesspoint in client mode, the idea is that if each house has to use a
>>>certain accesspoint (with a specific known ip address) to access the
>>>router then it must be possible to shape the traffic so no single house
>>>can dominate the out (and thus the incomming) traffic.
>>>
>>>The configuration:
>>>
>>>House with ADSL:                    A client house:
>>>                       ((o))       ((0))
>>>                         |           |        (Known ip)
>>>------------  eth0   ----|           |----     --------
>>>|Linux router|-------| AP |           | AP |---| router |
>>>| SuSE 8.2   |        ----             ----     --------
>>>------------                                    |     |
>>>     |                                     ------    ------
>>>eth1 |                                    | PC 1 |  | PC 2 |
>>>     |                                     ------    ------
>>> __--__--__
>>>| Internet |
>>> ----------
>>>
>>>One house might need to connect 1 PC another house 3, but I need to be
>>>sure that one house doesn't swallow the whole bandwidth. Is this
>>>possible?
>>>
>>>Best Regards
>>>Jakob Simon-Gaarde
>>>
>>>
>>>_______________________________________________
>>>LARTC mailing list / LARTC@mailman.ds9a.nl
>>>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>>>
>>>
>>>      
>>>
>>Hi,
>>
>>You can use the tc program, and htb qdiscs to ensure that people are
>>guaranteed some bandwidth, so that one host cannot dominate the
>>network.As it is the Internet link that is the weak point, you need to
>>shape at the gateway.
>>
>>I am currently working on a script that deals out the bandwidth evenly
>>amongst hosts, so that when only one host uses the link, it gets full
>>speed, but if two are on it is 50/50, and so on. I hope to have it
>>finished in a month or so. Maybe you can use that
>>
>>Also, if it is p2p traffic you are worried about, you could try the
>>p2pshaper. I posted a link in a earlier post.
>>
>>    
>>
>That sounds very cool (and fair :) ) how do you plan to detect how many
>hosts are using the gateway? idle traffic or ping-like check? Some clients
>may have a hardware router on the other end so it is allways on-line
>though maybe being idle for hours.
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>  
>
At first I was thinking of making a patch to the linux kernel. That 
would be the "right" way of doing it. But it also requires people to 
patch kernels, and I'm not that much into kernel hacking at the moment.

So actually, I just create a huge HTB tree and make rules for each host 
(hosts should be in the 192.168.0.1 - 192.168.0.255 range) that puts 
them into priorities according to how fast they are downloading. Fastest 
downloaders gets least priority. If I am not mistaken, this will make 
the bandwidth split very fair, because each host will be ensured at 
least their fraction of the bandwidth, while the others can borrow if 
you dont use your share. It might seem a bit cruel to make about 8 rules 
for each of the 255 hosts, but if it just works, it might not be so big 
a problem. AFAIK, most routers are doing nothing anyway, and can spare 
the extra cpu-cycles. And maybe it can be made smarter by using massive 
filtering. I will include some more documentation when I have completed 
the script.

cheers,
  Nikolaj Fogh
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2004-08-02 13:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-01 22:27 [LARTC] help on ADSL shaping jakob
2004-08-02  0:54 ` Nikolaj Fogh
2004-08-02  9:38 ` jakob
2004-08-02 13:22 ` Nikolaj Fogh [this message]
2004-08-02 14:02 ` Andreas Klauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=410E400A.2010309@vectory.com \
    --to=nfogh@vectory.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.