All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Rovner" <Jan.Rovner@diadema.cz>
To: lartc@vger.kernel.org
Subject: [LARTC] Trivial newbie HTB problem
Date: Mon, 25 Aug 2003 10:50:08 +0000	[thread overview]
Message-ID: <marc-lartc-106180817612289@msgid-missing> (raw)

Hello,

I'm newbie to HTB and need to solve really simple problem:

I have an single IP internet connection @ 1024kbit attached to a linux 
box (2.4.21), doing NAT for clients at internal 192.168.1.x network.

I need to setup a simple traffic shaping, for a single PC 192.168.1.2
I wish to guarantee minimum rate of 768kbit, for others 32kbit.
Maximum rates must be always full speed (1024kbit) !

Can you please tell me what's wrong with that (wlan0 is the internal
iface),
because this does not work (192.168.1.2 does not get the guaranteed
bandwidth,
but only a 1/n of bandwidth for case that another n stations saturate
the line).

Thank you. My script follows.

tc qdisc del dev wlan0 root

#by default, all clients go through slow :30 class
tc qdisc add dev wlan0 root handle 1: htb default 30

tc class add dev wlan0 parent 1: classid 1:1 htb rate 1024kbit ceil
1024kbit

# i wish :10 class 768-1024, :30 class 32-1024
tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 768kbit ceil
1024kbit prio 0
tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 32kbit ceil
1024kbit prio 2

tc qdisc add dev wlan0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev wlan0 parent 1:30 handle 30: sfq perturb 10

# client 192.168.1.2 is privileged, should be in :10 class
tc filter add dev wlan0 protocol ip parent 1:0 prio 0 u32 match ip dst
192.168.1.2 flowid 1:10

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

             reply	other threads:[~2003-08-25 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-25 10:50 Jan Rovner [this message]
2003-08-25 12:27 ` [LARTC] Trivial newbie HTB problem 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-106180817612289@msgid-missing \
    --to=jan.rovner@diadema.cz \
    --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.