From: Rick Goh Siow Mong rickgoh@cyberway.com.sg
To: lartc@vger.kernel.org
Subject: [LARTC] Linux Traffic Control limited to only 1 split of classes??
Date: Sun, 04 Feb 2001 12:45:10 +0000 [thread overview]
Message-ID: <marc-lartc-98373940416968@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373940416967@msgid-missing>
<PRE>Hi all, problem solved.
Forgot to add the route. =)
Thank you Marian Jancar.
----- Original Message -----
From: "Rick Goh Siow Mong" <<A HREF="mailto:rickgoh@cyberway.com.sg">rickgoh@cyberway.com.sg</A>>
To: "lartc" <<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>>
Sent: Sunday, February 04, 2001 6:03 AM
Subject: [LARTC] Linux Traffic Control limited to only 1 split of classes??
><i> Hi all,
</I>><i> The script below works partially. Please help me figure out why.
</I>><i>
</I>><i> What happen is this:
</I>><i> 1. Split eth0 into 2 classes; Sales and Engine. --> depth 1
</I>><i> 2. Split further Sales into 2 classes; SalesMan and SalesManager. -->
</I>><i> depth2
</I>><i> 3. Run the script.
</I>><i> 4. TC to depth 1 Engine works. Limited bandwidth.
</I>><i> 5. TC to depth 2 Sales DOESN'T work. Gets all the bandwidth.
</I>><i>
</I>><i> Apparently, after further test, it shows that once I split more than once,
</I>><i> traffic control breaks down.
</I>><i> I hope you can help me figure out if my script is missing something... or
</I>><i> that is it a bug in the code itself??
</I>><i>
</I>><i> Regards,
</I>><i> Rick Goh.
</I>><i>
</I>><i> ************************************************
</I>><i> #!/bin/sh
</I>><i> #
</I>><i> # Startup script for Linux Traffic Control
</I>><i> #
</I>><i>
</I>><i> device="eth0"
</I>><i> total="1Mbit"
</I>><i> sales="500Kbit"
</I>><i> engine="500Kbit"
</I>><i> sales_man="100Kbit"
</I>><i> sales_manager="400Kbit"
</I>><i> ip_salesman="192.168.1.10"
</I>><i> ip_salesmanager="192.168.1.20"
</I>><i> ip_engine="192.168.1.30"
</I>><i>
</I>><i> #Del qdisc to eth0
</I>><i> tc qdisc del dev $device root handle 1:
</I>><i>
</I>><i> #Attach qdisc to eth0 and 2 different class; sales & engine --> depth 1
</I>><i> tc qdisc add dev $device root handle 1: cbq bandwidth $total avpkt 1000
</I>><i> tc class add dev $device parent 1:0 classid 1:1 cbq bandwidth $total \
</I>><i> rate $total allot 1514 weight 100Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> tc class add dev $device parent 1:1 classid 1:10 cbq bandwidth $total \
</I>><i> rate $sales allot 1514 weight 50Kbit prio 3 maxburst 20 avpkt 1000
</I>><i> bounded
</I>><i> tc class add dev $device parent 1:1 classid 1:20 cbq bandwidth $total \
</I>><i> rate $engine allot 1514 weight 50Kbit prio 7 maxburst 20 avpkt 1000
</I>><i> bounded
</I>><i>
</I>><i>
</I>><i> ###New qdisc for Sales --> depth 2
</I>><i> tc qdisc add dev $device parent 1:10 handle 10: cbq bandwidth $sales avpkt
</I>><i> 1000
</I>><i>
</I>><i> ###2 classes for Sales
</I>><i> tc class add dev $device parent 10:0 classid 10:1 cbq bandwidth $sales \
</I>><i> rate $sales allot 1514 weight 50Kbit prio 6 maxburst 20 avpkt 1000
</I>><i> tc class add dev $device parent 10:1 classid 10:2 cbq bandwidth $sales \
</I>><i> rate $sales_man allot 1514 weight 10Kbit prio 2 maxburst 20 avpkt 1000
</I>><i> tc class add dev $device parent 10:1 classid 10:3 cbq bandwidth $sales \
</I>><i> rate $sales_manager allot 1514 weight 40Kbit prio 1 maxburst 20 avpkt
</I>><i> 1000
</I>><i>
</I>><i>
</I>><i> #############FILTER############
</I>><i>
</I>><i> # Depth 1
</I>><i> tc filter add dev $device parent 1:0 protocol ip prio 25 u32 match \
</I>><i> ip dst $ip_engine flowid 1:20
</I>><i>
</I>><i> # Depth 2
</I>><i> tc filter add dev $device parent 10:0 protocol ip prio 25 u32 match \
</I>><i> ip dst $ip_salesman flowid 10:2
</I>><i> tc filter add dev $device parent 10:0 protocol ip prio 100 u32 match \
</I>><i> ip dst $ip_salesmanager flowid 10:3
</I>><i>
</I>><i>
</I>><i>
</I>><i>
</I>><i> _______________________________________________
</I>><i> LARTC mailing list / <A HREF="mailto:LARTC@mailman.ds9a.nl">LARTC@mailman.ds9a.nl</A>
</I>><i> <A HREF="http://mailman.ds9a.nl/mailman/listinfo/lartc">http://mailman.ds9a.nl/mailman/listinfo/lartc</A> HOWTO:
</I><A HREF="http://ds9a.nl/2.4Routing/">http://ds9a.nl/2.4Routing/</A>
</PRE>
prev parent reply other threads:[~2001-02-04 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-03 22:03 [LARTC] Linux Traffic Control limited to only 1 split of classes?? Rick
2001-02-04 12:45 ` Rick [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-98373940416968@msgid-missing \
--to=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