All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raghuveer K <rvk@gsecone.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Please check my CBQ Rules.
Date: Mon, 27 Oct 2003 06:45:03 +0000	[thread overview]
Message-ID: <marc-lartc-106723865724516@msgid-missing> (raw)

Hi Stef,

Iam stucked as my traffic control is not working, I just tried first 
with incoming traffic shaping, below is the test setup and rules 
applied. Your valuable suggestion will surely help me and make it right.

Traffic Control is not taking place after applying the below rules. Here 
follows the test setup:-
1. The linux m/c 's eth0(100Mbits, WAN) is connected to 128 Kbits ADSL 
and eth1 to the LAN.
2.  I tried doing traffic control for incoming(at eth1).
3.  In LAN, I connected 3 m/c's(all linux).
4.  The ISP rate  taken is 97% of 128Kbits.
5.  Bandwidth Monitoring is done by using IPTraf on each LAN m/c's.

Here are the rules Iam applying to control incoming traffic at LAN
interface(eth1) for LAN users.
Here actual Isp rate = 128Kbit, rate taken = 97% of 128Kbit, eth1 ip is
192.168.5.1

/* root qdisc */
tc qdisc add dev eth1 root handle 1: cbq bandwidth 100Mbit avpkt 1000 cell
8

/* Parent Class */
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
124Kbit weight 12Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
bounded
/* Whether should I place the below filter for Parent class..???
tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip src
0/0 match ip dst 0/0 classid 1:1
*/

/* Child Classes */

/* 1st LAN user<192.168.5.2> = 37Kbit */
tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate
37Kbit weight 3Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src
0/0 match ip dst 192.168.5.2 classid 1:2

/* 2nd LAN user<192.168.5.3> = 24Kbit */
tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 100Mbit rate
24Kbit weight 2Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src
0/0 match ip dst 192.168.5.3 classid 1:3

/* 3rd LAN user<192.168.5.4> = 12Kbit */
tc class add dev eth1 parent 1:1 classid 1:4 cbq bandwidth 100Mbit rate
12Kbit weight 1Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src
0/0 match ip dst 192.168.5.4 classid 1:4

/* Default : Rest/Other traffic = 51Kbit*/
tc class add dev eth1 parent 1:1 classid 1:5 cbq bandwidth 100Mbit rate
51Kbit weight 5Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src
0/0 match ip dst 0/0 classid 1:5

I have few observations and queries, as follows:--
1.In my test setup the ISP rate is fluctuating in the range of 21Kbits 
to 131 Kbits for 128Kbits ADSL.
2. I have not added any filter for the parent class. Is it required...? 
What happens if I add...?
3. Is "iptraf " tool OK for monitoring the distribution of bandwidth on 
each LAN m/c.
4. In case, if I shape outgoing traffic on eth0 interface, whether shall 
I take outgoing and incoming ISP rate's in 30:70 ratio, i.e 30% if 
128Kbits for
    outgoing Qdisc(eth0) and 70% for incoming Qdisc(eth1). As 128 Kbits 
rate being asyncronous(ADSL).

Can you pls guide me where amI going wrong..?

Regards
-Raghu



Raghuveer K wrote:

> Stef Coene wrote:
>
>> On Tuesday 23 September 2003 07:56, Raghuveer wrote:
>>  
>>
>>> Here are the rules Iam applying to control outgoing traffic at 
>>> WAN(eth0)
>>> interface for public hosted services.
>>> Here actual Isp rate = 512Kbit, rate taken = 97% of 512Kbit, eth0 ip is
>>> 192.168.1.2
>>>
>>> tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit avpkt 
>>> 1000 cell
>>> 8 tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit 
>>> rate
>>> 497Kbit weight 49Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
>>> bounded
>>> /* Hosted http server bandwidth = 64Kbit */
>>> tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate
>>> 64Kbit weight 6Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
>>> tc filter add dev eth0 parent 1:1 protocol ip prio 3 u32 match ip src
>>> 192.168.1.2 match ip sport 80 0xffff classid 1:2
>>>
>>> /* Hosted ftp server bandwidth = 64Kbit */
>>> tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 100Mbit rate
>>> 64Kbit weight 6Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
>>> tc filter add dev eth0 parent 1:1 protocol ip prio 3 u32 match ip src
>>> 192.168.1.2 match ip sport 21 0xffff classid 1:3
>>>
>>> /* Default : Rest/Other traffic */
>>> tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 100Mbit rate
>>> 369Kbit weight 40Kbit prio 3 allot 1514 cell 8 maxburst 10  avpkt 1000
>>> /* Here I want replace the below rule with a simple rule based only on
>>> port i.e by using some default port other than 80, 21 as sport, which
>>> according to your last mail is not possible, hence pls check whether 
>>> the
>>> below rule will do for remaining traffic */
>>> tc filter add dev eth0 parent 1:1 protocol ip prio 3 u32 match ip src
>>> 0/0 match ip dst 0/0 classid 1:4
>>>
>>> Pls let me know whether the above rules are framed correctly or can be
>>> done in a better way.
>>>   
>>
>> I can't do it better then you did :)
>>  
>>
> Stef,
> Traffic Control is not taking place after applying the above rules. 
> Here follows the test setup:-
> 1. The linux m/c 's eth0(100Mbits, WAN) is connected to 128 Kbits ADSL 
> and eth1 to the LAN.
> 2.  I tried doing traffic control for incoming(at eth1) and 
> outgoing(at eth0) traffic using CBQ(above rules).
> 3.  In LAN, I connected 3 m/c's(all linux).
> 4.  The ISP rate  taken is 97% of 128Kbits.
> 5.  Bandwidth Monitoring is done by using IPTraf on each LAN m/c's.
>
> I have few observations and queries, as follows:--
> 1. Here the ISP rate is fluctuating in the range of 21Kbits to 131 
> Kbits for 128Kbits ADSL.
> 2. I have not added any filter for the parent class. Is it 
> required...? What happens if I add...?
> 3. Is "iptraf " tool OK for monitoring the distribution of bandwidth 
> on each LAN m/c.
> 4. Whether shall I take outgoing and incoming ISP rate's in 30:70 
> ratio, i.e 30% if 128Kbits for outgoing Qdisc(eth0) and 70% for incoming
>    Qdisc(eth1). As 128 Kbits rate being asyncronous(ADSL).
>
> Can you pls guide me where amI going wrong..?
>
> Regards
> -Raghu
>
>> Stef
>>
>>  
>>
>
>


-- 
****** This email is confidential and is intended for the original recipient(s)
only. If you have erroneously received this mail, please delete it immediately
and notify the sender. Unauthorized copying, disclosure or distribution of the
material in this mail is prohibited. Views expressed in this mail are those of
the individual sender and do not bind Gsec1 Limited. or its subsidiary, unless
the sender has done so expressly with due authority of Gsec1.******
 


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

                 reply	other threads:[~2003-10-27  6:45 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-106723865724516@msgid-missing \
    --to=rvk@gsecone.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.