All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] IMQ & HTB problem
@ 2002-04-20 18:31 Alin Nastac
  2002-04-21  1:33 ` Patrick McHardy
  0 siblings, 1 reply; 6+ messages in thread
From: Alin Nastac @ 2002-04-20 18:31 UTC (permalink / raw)
  To: lartc

Hi everybody,

I have a strange problem. I recently found IMQ dummy device and I was 
anxious to test this on my router. I have the following configuration:

iptables -t mangle -A PREROUTING -i eth0 -m mark --mark 0 -d $MY_NET -j 
IMQ --todev 0
iptables -t mangle -A POSTROUTING -o eth0 -m mark --mark 0 -s $MY_NET -j 
IMQ --todev 1

insmod imq

tc qdisc add dev imq0 root handle 1: htb default fff
tc qdisc add dev imq1 root handle 1: htb default fff

tc class add dev imq0 parent 1:0 classid 1:1 htb rate 192Kbit
...

tc filter add dev imq0 parent 1:0 protocol ip prio 100 u32 match ip src...
bla bla bla

ip link set imq0 up; ip link set imq1 up

The problem is that when I run this script, those packets that are 
routed via imq* (0 for in and 1 for out) are slowed down to ridiculous 
speeds (1kbit or less for a 64kbit class for eg.)

I read about some bugs that lies in IMQ code but I also read about 
crashes related to this bugs and this is not my case.

Could anyone help me pls? I must finish this script till monday. Could 
it be usage of u32 filters? But still I see that packets are getting to 
the right classes.

Thanks,
Alin Nastac

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

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

* Re: [LARTC] IMQ & HTB problem
  2002-04-20 18:31 [LARTC] IMQ & HTB problem Alin Nastac
@ 2002-04-21  1:33 ` Patrick McHardy
  0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2002-04-21  1:33 UTC (permalink / raw)
  To: lartc

Hi !

Alin Nastac wrote:
> Hi everybody,
> 
> I have a strange problem. I recently found IMQ dummy device and I was 
> anxious to test this on my router. I have the following configuration:
> 
> iptables -t mangle -A PREROUTING -i eth0 -m mark --mark 0 -d $MY_NET -j 
> IMQ --todev 0
> iptables -t mangle -A POSTROUTING -o eth0 -m mark --mark 0 -s $MY_NET -j 
> IMQ --todev 1
> 
> insmod imq
> 
> tc qdisc add dev imq0 root handle 1: htb default fff
> tc qdisc add dev imq1 root handle 1: htb default fff
> 
> tc class add dev imq0 parent 1:0 classid 1:1 htb rate 192Kbit
> ...
> 
> tc filter add dev imq0 parent 1:0 protocol ip prio 100 u32 match ip src...
> bla bla bla
> 
> ip link set imq0 up; ip link set imq1 up
> 
> The problem is that when I run this script, those packets that are 
> routed via imq* (0 for in and 1 for out) are slowed down to ridiculous 
> speeds (1kbit or less for a 64kbit class for eg.)

In fact, packets aren't routed via imq but only enqueued/dequeued to the 
attached qdiscs. Please post your entire script because the error is 
most probably in there..

> I read about some bugs that lies in IMQ code but I also read about 
> crashes related to this bugs and this is not my case.

Glad to here that, although the bug is still present .. i haven't found 
the time to debug it but i'll probably get to it this week.

Bye,
Patrick




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

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

* [LARTC] IMQ+HTB problem
@ 2003-04-15 12:29 hare ram
  2003-04-15 13:23 ` Stef Coene
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: hare ram @ 2003-04-15 12:29 UTC (permalink / raw)
  To: lartc

Hi all and tc Gururs


i have patched the IMQ and htb to kernel, but when i do egress filtering,
iam not able to see any traffic

and excusted the following the commands

modprobe imq numdevs=1

 tc qdisc add dev imq0 handle 1: root htb default 1
 tc class add dev imq0 parent 1: classid 1:1 htb rate 100kbit

 tc qdisc add dev imq0 parent 1:1 handle 10: htb default 1
 tc class add dev imq0 parent 10: classid 10:10 htb rate 100kbit
 tc qdisc add dev imq0 parent 10:10 handle 20: sfq

 iptables -t mangle -A POSTROUTING -p tcp --dport 80 -j IMQ

 ip link set imq0 up


when i see the Iptables Out Put

[root@bridge root]# iptables -xnvL -t mangle
Chain PREROUTING (policy ACCEPT 122928 packets, 16888665 bytes)
    pkts      bytes target     prot opt in     out     source
destination

Chain INPUT (policy ACCEPT 15068 packets, 1185569 bytes)
    pkts      bytes target     prot opt in     out     source
destination

Chain FORWARD (policy ACCEPT 116790 packets, 16553990 bytes)
    pkts      bytes target     prot opt in     out     source
destination

Chain OUTPUT (policy ACCEPT 4943 packets, 670996 bytes)
    pkts      bytes target     prot opt in     out     source
destination

Chain POSTROUTING (policy ACCEPT 121733 packets, 17224986 bytes)
    pkts      bytes target     prot opt in     out     source
destination


and also out put of tc

[root@bridge root]# tc -s -d qdisc show
qdisc sfq 20: dev imq0 limit 128p quantum 1500b flows 128/1024
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc htb 10: dev imq0 r2q 10 default 1 direct_packets_stat 0 ver 3.6
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc htb 1: dev imq0 r2q 10 default 1 direct_packets_stat 0 ver 3.6
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)


and ifconfig of imq device

imq0      Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:30
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


i dont see any trffic at all

what is could be the wrong

some expert coments will be helpful

hare



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

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

* Re: [LARTC] IMQ+HTB problem
  2003-04-15 12:29 [LARTC] IMQ+HTB problem hare ram
@ 2003-04-15 13:23 ` Stef Coene
  2003-04-15 13:57 ` hare ram
  2003-04-15 16:51 ` Stef Coene
  2 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2003-04-15 13:23 UTC (permalink / raw)
  To: lartc

> i have patched the IMQ and htb to kernel, but when i do egress filtering,
> iam not able to see any traffic
>
> and excusted the following the commands
>
> modprobe imq numdevs=1
>
>  tc qdisc add dev imq0 handle 1: root htb default 1
>  tc class add dev imq0 parent 1: classid 1:1 htb rate 100kbit
>
>  tc qdisc add dev imq0 parent 1:1 handle 10: htb default 1
>  tc class add dev imq0 parent 10: classid 10:10 htb rate 100kbit
>  tc qdisc add dev imq0 parent 10:10 handle 20: sfq
Never add a htb qdisc to a htb class.  It will only add extra delays.

>  iptables -t mangle -A POSTROUTING -p tcp --dport 80 -j IMQ
>
>  ip link set imq0 up
>
>
> when i see the Iptables Out Put
>
> [root@bridge root]# iptables -xnvL -t mangle
> Chain PREROUTING (policy ACCEPT 122928 packets, 16888665 bytes)
>     pkts      bytes target     prot opt in     out     source
> destination
>
> Chain INPUT (policy ACCEPT 15068 packets, 1185569 bytes)
>     pkts      bytes target     prot opt in     out     source
> destination
>
> Chain FORWARD (policy ACCEPT 116790 packets, 16553990 bytes)
>     pkts      bytes target     prot opt in     out     source
> destination
>
> Chain OUTPUT (policy ACCEPT 4943 packets, 670996 bytes)
>     pkts      bytes target     prot opt in     out     source
> destination
>
> Chain POSTROUTING (policy ACCEPT 121733 packets, 17224986 bytes)
>     pkts      bytes target     prot opt in     out     source
> destination
Euh.  Where is your iptables command ????

> and also out put of tc
>
> [root@bridge root]# tc -s -d qdisc show
> qdisc sfq 20: dev imq0 limit 128p quantum 1500b flows 128/1024
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> qdisc htb 10: dev imq0 r2q 10 default 1 direct_packets_stat 0 ver 3.6
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> qdisc htb 1: dev imq0 r2q 10 default 1 direct_packets_stat 0 ver 3.6
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
So nothing is queued in the imq device.  First, you have to get your iptables 
command working.  So packets are queued in the imq device.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

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

* Re: [LARTC] IMQ+HTB problem
  2003-04-15 12:29 [LARTC] IMQ+HTB problem hare ram
  2003-04-15 13:23 ` Stef Coene
@ 2003-04-15 13:57 ` hare ram
  2003-04-15 16:51 ` Stef Coene
  2 siblings, 0 replies; 6+ messages in thread
From: hare ram @ 2003-04-15 13:57 UTC (permalink / raw)
  To: lartc

Hi thanks for the quick reply
check the my questions and answers below in caps

----- Original Message -----
From: "Stef Coene" <stef.coene@docum.org>
To: "hare ram" <hareram@sol.net.in>; <lartc@mailman.ds9a.nl>
Sent: Tuesday, April 15, 2003 6:53 PM
Subject: Re: [LARTC] IMQ+HTB problem


> > i have patched the IMQ and htb to kernel, but when i do egress
filtering,
> > iam not able to see any traffic
> >
> > and excusted the following the commands
> >
> > modprobe imq numdevs=1
> >
> >  tc qdisc add dev imq0 handle 1: root htb default 1
> >  tc class add dev imq0 parent 1: classid 1:1 htb rate 100kbit
> >
> >  tc qdisc add dev imq0 parent 1:1 handle 10: htb default 1
> >  tc class add dev imq0 parent 10: classid 10:10 htb rate 100kbit
> >  tc qdisc add dev imq0 parent 10:10 handle 20: sfq
> Never add a htb qdisc to a htb class.  It will only add extra delays.
>
WHAT IS RECOMENDED
> >  iptables -t mangle -A POSTROUTING -p tcp --dport 80 -j IMQ
> >
> >  ip link set imq0 up
> >
> >
> > when i see the Iptables Out Put
> >
> > [root@bridge root]# iptables -xnvL -t mangle
> > Chain PREROUTING (policy ACCEPT 122928 packets, 16888665 bytes)
> >     pkts      bytes target     prot opt in     out     source
> > destination
> >
> > Chain INPUT (policy ACCEPT 15068 packets, 1185569 bytes)
> >     pkts      bytes target     prot opt in     out     source
> > destination
> >
> > Chain FORWARD (policy ACCEPT 116790 packets, 16553990 bytes)
> >     pkts      bytes target     prot opt in     out     source
> > destination
> >
> > Chain OUTPUT (policy ACCEPT 4943 packets, 670996 bytes)
> >     pkts      bytes target     prot opt in     out     source
> > destination
> >
> > Chain POSTROUTING (policy ACCEPT 121733 packets, 17224986 bytes)
> >     pkts      bytes target     prot opt in     out     source
> > destination
> Euh.  Where is your iptables command ????
>

YES IAM WONDERING WHERE IS THE RULE GONE, THIS IS WHAT MAIN PROBLEM, SEE
ABOVE I HAVE EXECUTED THE IPTABLE LINE
> > and also out put of tc
> >
> > [root@bridge root]# tc -s -d qdisc show
> > qdisc sfq 20: dev imq0 limit 128p quantum 1500b flows 128/1024
> >  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> > qdisc htb 10: dev imq0 r2q 10 default 1 direct_packets_stat 0 ver 3.6
> >  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> > qdisc htb 1: dev imq0 r2q 10 default 1 direct_packets_stat 0 ver 3.6
> >  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> So nothing is queued in the imq device.  First, you have to get your
iptables
> command working.  So packets are queued in the imq device.
>

IAM WONDERING, WHAT COULD BE THE WRONG,ANY SUGGESTIONS

> Stef
>
> --
>
> stef.coene@docum.org
>  "Using Linux as bandwidth manager"
>      http://www.docum.org/
>      #lartc @ irc.oftc.net
>
>

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

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

* Re: [LARTC] IMQ+HTB problem
  2003-04-15 12:29 [LARTC] IMQ+HTB problem hare ram
  2003-04-15 13:23 ` Stef Coene
  2003-04-15 13:57 ` hare ram
@ 2003-04-15 16:51 ` Stef Coene
  2 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2003-04-15 16:51 UTC (permalink / raw)
  To: lartc

> > Never add a htb qdisc to a htb class.  It will only add extra delays.
> WHAT IS RECOMENDED
Only use classes.  You don't need the qdiscs.

> > >  iptables -t mangle -A POSTROUTING -p tcp --dport 80 -j IMQ

> > > Chain POSTROUTING (policy ACCEPT 121733 packets, 17224986 bytes)
> > >     pkts      bytes target     prot opt in     out     source
> > > destination
> >
> > Euh.  Where is your iptables command ????
>
> YES IAM WONDERING WHERE IS THE RULE GONE, THIS IS WHAT MAIN PROBLEM, SEE
> ABOVE I HAVE EXECUTED THE IPTABLE LINE
I know.  
Are you sure you can execute the iptables command and you didn't had any 
errors?  If I do this on my box (I just did iptables -t mangle -A POSTROUTING 
-p tcp --dport 80) and get a list of the iptables rules, I can see the rule I 
added.  So it works.  Can you check it again ?

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

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

end of thread, other threads:[~2003-04-15 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-15 12:29 [LARTC] IMQ+HTB problem hare ram
2003-04-15 13:23 ` Stef Coene
2003-04-15 13:57 ` hare ram
2003-04-15 16:51 ` Stef Coene
  -- strict thread matches above, loose matches on Subject: below --
2002-04-20 18:31 [LARTC] IMQ & HTB problem Alin Nastac
2002-04-21  1:33 ` Patrick McHardy

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.