All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sumit Pandya" <sumit@elitecore.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Shapping with hierarchical parent-child
Date: Thu, 11 Apr 2002 16:48:31 +0000	[thread overview]
Message-ID: <marc-lartc-101854257530401@msgid-missing> (raw)

Hi All,
	I’m trying to implementing traffic shapping through HTB. My goal is to
implement it in hierarchical manner. We have 3 departments in office; namely
Web, admin, and software. My problem is to regarding parent child
relationship.


/sbin/tc  qdisc del dev imq root

# Create a root Q discipline
/sbin/tc  qdisc add dev imq root handle 1: htb default 1003

#####################################################################
# Create a Q discipline with 64 KBytes as a pipe for servers
# 192.9.203.82 & 192.9.203.65 into Web
# This should work in way that both IPs combined shud not get more than
# 64kbps ???
#####################################################################
/sbin/tc  class add dev imq parent 1:0 classid 1:1 htb rate 64kbps


#####################################################################
# Now allow 192.9.203.65 and 192.9.203.82 to 48kbps individually
# if the link is not used by the other but as defined above they
# should not combined exceed 64kbps ???
###################################################################
/sbin/tc  class add dev imq parent 1:1 classid 1:1001 htb rate 48kbps
/sbin/tc  class add dev imq parent 1:1 classid 1:1002 htb rate 48kbps
/sbin/tc  class add dev imq parent 1:1 classid 1:1003 htb rate 24kbps

/sbin/tc  qdisc add dev imq parent 1:1001 handle 1001: sfq perturb 10
/sbin/tc  qdisc add dev imq parent 1:1002 handle 1002: sfq perturb 10
/sbin/tc  qdisc add dev imq parent 1:1003 handle 1003: sfq perturb 10

#####################################################################
# Apply the filters where dest is the IPs 192.9.203.82 & 192.9.203.65
#####################################################################
/sbin/tc  filter add dev imq protocol ip parent 1:0 prio 1 \
u32 match ip dst 192.9.203.82 flowid 1:1001
/sbin/tc  filter add dev imq protocol ip parent 1:0 prio 1 \
u32 match ip dst 192.9.203.65 flowid 1:1002


-----------   End of small scripting setup  --------------
The results got are not as those expected. The IPs combined go above 64kbps
with each individually getting 48kbps at the same time. From where did it
get more then 64kbps?
Thanks for replies.
-- Sumit


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

                 reply	other threads:[~2002-04-11 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-101854257530401@msgid-missing \
    --to=sumit@elitecore.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.