All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Problen in cbq , fw
@ 2003-07-16 11:49 pawan  gupta
  2003-07-16 13:49 ` Trevor Warren
  0 siblings, 1 reply; 2+ messages in thread
From: pawan  gupta @ 2003-07-16 11:49 UTC (permalink / raw)
  To: lartc

Hi,

In my LAN Iam trying to make following setup:

- All the traffic generated by 10.0.2.1 should go to 10.0.2.11, 
If
the destination of this traffic is internet than it should be
placed on its interface eth1. Outgoing traffic on eth1 should be
shaped.For this I am using fw filters and cbq.
                                            _______

10.0.2.1   ------->  10.0.2.11(eth0 )----|    A    |-----
10.0.2.22(eth1)
                                          -----------

On machine "A" , I run following commands:

## mark all the traffic coming from 10.0.2.1 by 1 ##
iptables -t mangle -A PREROUTING -i eth0  -s 10.0.2.1 -j MARK
--set-mark 1

## add route for traffic destined to internet ##
add route $Internet_Address dev eth1

## Configure following policy ##

                          1:0 (10Mbit)
                            |
                          1:1 (10 Mbit)
                        /      \
                   1:2        1:3 (110Kbit)
             (100Kbit,
              bounded)

## add queuing discipline and classes to eth1 ##
1. tc qdisc del dev eth1 root cbq bandwidth 10Mbit avpkt 1000
2. tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10Mbit
avpkt 1000
3. tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
10Mbit rate 10Mbit allot 1514 avpkt 1000 weight 1Mbit
4. tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth
10Mbit rate 100Kbit allot 1514 avpkt 1000 weight 10Kbit bounded
5. tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth
10Mbit rate 110Kbit allot 1514 avpkt 1000 weight 11Kbit
6. tc filter add dev eth1 protocol ip parent 1:0 prio 1 handle 1
fw classid 1:2

Now when I run=>  tc -s class show dev eth1 parent 1:0
I get:

class cbq 1: root rate 10Mbit (bounded,isolated) prio
no-transmit
  Sent 42 bytes 1 pkts (dropped 0, overlimits 0)
   borrowed 0 overactions 0 avgidle 624 undertime 0
class cbq 1:1 parent 1: rate 10Mbit prio no-transmit
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
   borrowed 0 overactions 0 avgidle 0 undertime 0
class cbq 1:2 parent 1:1 rate 100Kbit (bounded) prio no-transmit
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
   borrowed 0 overactions 0 avgidle 0 undertime 0
class cbq 1:3 parent 1:1 rate 110Kbit prio no-transmit
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
   borrowed 0 overactions 0 avgidle 0 undertime 0

Now irrespective of the amount of traffic generated by 10.0.2.1,
the sent bytes in class cbq 1:
remains 42 also no traffic is categorized for class 1:2 why????

Please help me...

thanx..

Pawan


___________________________________________________
Click below to experience Sooraj R Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
  & Kareena http://www.mpkdh.com

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] Problen in cbq , fw
  2003-07-16 11:49 [LARTC] Problen in cbq , fw pawan  gupta
@ 2003-07-16 13:49 ` Trevor Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Trevor Warren @ 2003-07-16 13:49 UTC (permalink / raw)
  To: lartc

Pawanji,

 Aapka yeh config tho thik hai. This config seems to be perfectly fine,
why don't you try htb + u32 and see the comparitive results you get.

 This isn't a solution to your problem though. Setting up the same is a
breeze and it does the job more than well.

Trevor

On Wed, 2003-07-16 at 17:19, pawan gupta wrote:
> Hi,
> 
> In my LAN Iam trying to make following setup:
> 
> - All the traffic generated by 10.0.2.1 should go to 10.0.2.11, 
> If
> the destination of this traffic is internet than it should be
> placed on its interface eth1. Outgoing traffic on eth1 should be
> shaped.For this I am using fw filters and cbq.
>                                             _______
> 
> 10.0.2.1   ------->  10.0.2.11(eth0 )----|    A    |-----
> 10.0.2.22(eth1)
>                                           -----------
> 
> On machine "A" , I run following commands:
> 
> ## mark all the traffic coming from 10.0.2.1 by 1 ##
> iptables -t mangle -A PREROUTING -i eth0  -s 10.0.2.1 -j MARK
> --set-mark 1
> 
> ## add route for traffic destined to internet ##
> add route $Internet_Address dev eth1
> 
> ## Configure following policy ##
> 
>                           1:0 (10Mbit)
>                             |
>                           1:1 (10 Mbit)
>                         /      \
>                    1:2        1:3 (110Kbit)
>              (100Kbit,
>               bounded)
> 
> ## add queuing discipline and classes to eth1 ##
> 1. tc qdisc del dev eth1 root cbq bandwidth 10Mbit avpkt 1000
> 2. tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10Mbit
> avpkt 1000
> 3. tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
> 10Mbit rate 10Mbit allot 1514 avpkt 1000 weight 1Mbit
> 4. tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth
> 10Mbit rate 100Kbit allot 1514 avpkt 1000 weight 10Kbit bounded
> 5. tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth
> 10Mbit rate 110Kbit allot 1514 avpkt 1000 weight 11Kbit
> 6. tc filter add dev eth1 protocol ip parent 1:0 prio 1 handle 1
> fw classid 1:2
> 
> Now when I run=>  tc -s class show dev eth1 parent 1:0
> I get:
> 
> class cbq 1: root rate 10Mbit (bounded,isolated) prio
> no-transmit
>   Sent 42 bytes 1 pkts (dropped 0, overlimits 0)
>    borrowed 0 overactions 0 avgidle 624 undertime 0
> class cbq 1:1 parent 1: rate 10Mbit prio no-transmit
>   Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>    borrowed 0 overactions 0 avgidle 0 undertime 0
> class cbq 1:2 parent 1:1 rate 100Kbit (bounded) prio no-transmit
>   Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>    borrowed 0 overactions 0 avgidle 0 undertime 0
> class cbq 1:3 parent 1:1 rate 110Kbit prio no-transmit
>   Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>    borrowed 0 overactions 0 avgidle 0 undertime 0
> 
> Now irrespective of the amount of traffic generated by 10.0.2.1,
> the sent bytes in class cbq 1:
> remains 42 also no traffic is categorized for class 1:2 why????
> 
> Please help me...
> 
> thanx..
> 
> Pawan
> 
> 
> ___________________________________________________
> Click below to experience Sooraj R Barjatya's latest offering
> 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
>   & Kareena http://www.mpkdh.com
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
-- 
( >-        LINUX, It's all about CHOICE      -< )
/~\    __        twarren@redhat.com       __   /~\
|  \) /  Pre Sales Consultant - Red Hat     \ (/ |
|_|_  \    9820349221(M) | 22881326(O)      / _|_|
       \___________________________________/

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-16 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16 11:49 [LARTC] Problen in cbq , fw pawan  gupta
2003-07-16 13:49 ` Trevor Warren

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.