All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Furniss <andy.furniss@dsl.pipex.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Shaping by IP's
Date: Sat, 25 Feb 2006 14:34:43 +0000	[thread overview]
Message-ID: <44006B03.2070400@dsl.pipex.com> (raw)
In-Reply-To: <20060221141135.9F35961D6B@wind.delfi.lt>

Laimis wrote:
> If in one time 3 IP adresses using internet. TC script:
> 
> DEV=eth0 # LAN
> SERVER_IP\x192.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?

You need to back off from your line rates. For ingress so you can shape 
at all and for egress to allow for overheads (you can get patches for 
dsl overheads).

Quantum should be 1514 as you shape on eth and sfq is really meant for 
bulk traffic. It would be better to mark say small tcp and udp and give 
them priority with the rest going to sfq. I would also limit the length 
of the sfqs default of 128 is far too long for shaping at these rates - 
you want to drop packets especially for ingress.

Perturb causes packet reordering so it's best set higher than 6 - I use 20.

Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

      reply	other threads:[~2006-02-25 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 14:11 [LARTC] Shaping by IP's Laimis
2006-02-25 14:34 ` Andy Furniss [this message]

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=44006B03.2070400@dsl.pipex.com \
    --to=andy.furniss@dsl.pipex.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.