Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Bandwidth shaping help
Date: Thu, 30 Oct 2003 10:32:57 +0000	[thread overview]
Message-ID: <marc-lartc-106751002424700@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106746727722510@msgid-missing>

On Wednesday 29 October 2003 22:35, Ryan Vilim wrote:
> It seems I have quite a difficult (for me) bandwidth shaping problem.
> What I want is this;
>
> Port 80 and port 21 will share 30 kilobytes of the 50kilobytes upstream
> my ISP gives me, bittorrent will get 10 maximum (ports 6881-6890), and
> all other ports get the full 100 mbits.
>
> I want any of the other ports to be able to steal the bandwidth of the
> port 21 and port 80 as well as the bittorrent ports if they are not in
> use, however bittorrent, or port 21 or 80 cannot exceed thier bandwidth
> limitations.
>
> This is because I use my server as a samba server as well as a vnc
> server from within my network so I want as high a bandwidth as possible
> on those, however my HTTP server and FTP server and Bittorrent can't
> kill my internet connection for everyone else.
>
> My current configuration looks like
>
> tc qdisk add dev eth0 root handle 1: htb default 30
It's "tc qdisc ..."

> tc class add dev eth0 parent 1: classid 1:1 htb rate 95mbit burst 15k
> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 320kbit burst 15k
> tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1kbit ceil 90mbit
> burst 15k
> tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1kbit ceil 90mbit
> burst 15k
> tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
> tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
> tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10\
If eht0 is connected to the internet, the ceil should be your internet link.  
Not your NIC bandwidth.

> U32="tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32"
> $U32 match ip sport 80 0xffff flowid 1:10
> $U32 match ip sport 21 0xffff flowid 1:20
>
> I sort of fiddled with one of the configurations in the book to get
> this, also this does not include the bittorrent ports which is a
> requirement I thought of just recently.
>
> I need, first a way to implement the bandwidth restrictions described
> above, and second a way to remove my old configuration (if I can't just
> overwrite it)
/qos/bin/tc qdisc del dev eth0 root

Stef

-- 
stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

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

  reply	other threads:[~2003-10-30 10:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-29 21:35 [LARTC] Bandwidth shaping help Ryan Vilim
2003-10-30 10:32 ` Stef Coene [this message]
2003-10-30 14:34 ` Ryan Vilim
2003-10-30 18:41 ` Stef Coene

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=marc-lartc-106751002424700@msgid-missing \
    --to=stef.coene@docum.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox