All of lore.kernel.org
 help / color / mirror / Atom feed
From: eth <eth@finsiel.ro>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Simple Beginner Question - allocating 64k
Date: Thu, 07 Mar 2002 08:05:30 +0000	[thread overview]
Message-ID: <marc-lartc-101548852311964@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101546392202113@msgid-missing>

Carl Spies wrote:

  >>have 4 pcs connected to a hub on eth1
  >the pc's are 192.168.0.11 and 22 and 33 and 44
  >
  >I want to allocate  4kb to 192.168.0.11
  >               and  4kb to 192.168.0.22
  >               and  8kb to 192.168.0.33
  >               and 32kb	to 192.168.0.44
  >
  >so this is a total of 48kb and the rest is used on the server 10.0.0.80
  >
  >Also - want to make sure that 192.168.0.11 never takes more than 4kb at
  >any time.
  >
  >No fancy stuff like separating http and smtp and things.
  >
  >What's the simple most elegant way of doing this on eth1.
  >
Here is an addapt of my script but you'll have to compile htb into the
kernel and iproute2; see also

http://luxik.cdi.cz/~devik/qos/htb/htbman.htm


qdisc->class_limit_48---class 1   4  Kb -> qdisc sfq
                                       \_class 2   4 Kb -> qdisc sfq
                                       \_class 3   8 Kb -> qdisc sfq
                                        \_class 4  32 Kb -> qdisc sfq

... tc filter to put IP in classes. It should go like this:

tc qdisc add dev eth1 root handle 1: htb default 10

tc class add dev eth1 parent 1: classid 1:1 htb rate 48kbit ceil 48kbit
burst 1k

tc class add dev eth1 parent 1:1 classid 1:10 htb rate 4kbit ceil 48kbit
burst 1k
tc class add dev eth1 parent 1:1 classid 1:11 htb rate 4kbit ceil 48kbit
burst 1k
tc class add dev eth1 parent 1:1 classid 1:12 htb rate 8kbit ceil 48kbit
burst 1k
tc class add dev eth1 parent 1:1 classid 1:14 htb rate 32kbit ceil
48kbit burst 1k

tc qdisc add dev eth1 parent 1:10 handle 20: sfq perturb 10
tc qdisc add dev eth1 parent 1:11 handle 30: sfq perturb 10
tc qdisc add dev eth1 parent 1:12 handle 40: sfq perturb 10
tc qdisc add dev eth1 parent 1:14 handle 50: sfq perturb 10



tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.0.11 flowid 1:10
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.0.22 flowid 1:11
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.0.33 flowid 1:12
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.0.44 flowid 1:13





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

      parent reply	other threads:[~2002-03-07  8:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-07  1:08 [LARTC] Simple Beginner Question - allocating 64k Carl Spies
2002-03-07  1:43 ` Carl Spies
2002-03-07  1:44 ` Greg Scott
2002-03-07  7:49 ` Stef Coene
2002-03-07  8:05 ` eth [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=marc-lartc-101548852311964@msgid-missing \
    --to=eth@finsiel.ro \
    --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.