Skip to contentSkip to conversation

IMQ problem -- badly need help

LARTC Stef Coene 3 participants 5 messages Apr 17, 2003

lore
Share & tools
lore

Stef Coene

author
#0 lore raw
Quoted 22 lines · hare ram

Hi all Guru's

I have been try to work on this IMQ more than 4 weeks but i could not get any results
really and badly need to help to achive my setup

iam trying to achieve is up+down=total bandwidth, as per the user groups suggestion
i would like to use IMQ to make my setup to achive this

my setup is , RH 9.0 with patch bridge-nf
and patched IMQ with iptables 1.2.8 and POM also done HTB also patched with latest ip route

my bridge is running fine, iam able to use transparent bridge, working that also

laptop---switch--eth1(bridge)eht0--switch--Router--internet

next i have executed small example

Quoted 13 lines

iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
----
" when i executed above line i got this message
[root@bridge root]# iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
iptables: target `IMQ' v1.2.6a (I'm v1.2.8).
----
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 20 -m state --state ESTABLISHED -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 80 -m state --state ESTABLISHED -j MARK --set-mark 2
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 25 -m state --state ESTABLISHED -j MARK --set-mark 3

This is your problem. I think the iptables rule is not added. But don't ask me why. Maybe you use the wrong iptables version? I don't know.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw

Hi all Guru's

I have been try to work on this IMQ more than 4 weeks but i could not get any results
really and badly need to help to achive my setup

iam trying to achieve is up+down=total bandwidth, as per the user groups suggestion
i would like to use IMQ to make my setup to achive this

my setup is , RH 9.0 with patch bridge-nf
and patched IMQ with iptables 1.2.8 and POM also done HTB also patched with latest ip route

my bridge is running fine, iam able to use transparent bridge, working that also

laptop---switch--eth1(bridge)eht0--switch--Router--internet

next i have executed small example

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 64kbit

tc qdisc add dev imq0 parent 1:1 handle 10: htb default 5
tc class add dev imq0 parent 10: classid 10:1 htb rate 12kbit burst 16kbit prio 3
tc class add dev imq0 parent 10: classid 10:2 htb rate 28kbit burst 16kbit prio 2
tc class add dev imq0 parent 10: classid 10:3 htb rate 16kbit burst 16kbit prio 1
tc class add dev imq0 parent 10: classid 10:5 htb rate 8kbit prio 4

tc qdisc add dev imq0 parent 10:1 handle 21:0 sfq
tc qdisc add dev imq0 parent 10:2 handle 22:0 sfq
tc qdisc add dev imq0 parent 10:3 handle 23:0 sfq
tc qdisc add dev imq0 parent 10:5 handle 24:0 sfq

tc filter add dev imq0 protocol ip pref 1 parent 10: handle 1 fw classid 10:1
tc filter add dev imq0 protocol ip pref 2 parent 10: handle 2 fw classid 10:2
tc filter add dev imq0 protocol ip pref 3 parent 10: handle 3 fw classid 10:3

iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
----
" when i executed above line i got this message
[root@bridge root]# iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
iptables: target `IMQ' v1.2.6a (I'm v1.2.8).
----

iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 20 -m state --state ESTABLISHED -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 80 -m state --state ESTABLISHED -j MARK --set-mark 2
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 25 -m state --state ESTABLISHED -j MARK --set-mark 3

ip link set imq0 up

iam able to see the packet when i try to browse using my laptop to yahoo.com see below

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

       0        0 MARK       tcp  --  eth1   *       0.0.0.0/0
0.0.0.0/0          tcp dpt:20 state ESTABLISHED MARK set 0x1
      42     5053 MARK       tcp  --  eth1   *       0.0.0.0/0
0.0.0.0/0          tcp dpt:80 state ESTABLISHED MARK set 0x2
       0        0 MARK       tcp  --  eth1   *       0.0.0.0/0

0.0.0.0/0 tcp dpt:25 state ESTABLISHED MARK set 0x3

but iam not able to see any traffic on imq0, see the out put below

br0 Link encap:Ethernet HWaddr 00:00:00:00:CB:3B

          inet addr:202.x.x.7  Bcast:202.x.x.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16647 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1040336 (1015.9 Kb)  TX bytes:402909 (393.4 Kb)

eth0 Link encap:Ethernet HWaddr 00:00:x:x:x:3B

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18992 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4908 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1 txqueuelen:100
          RX bytes:1759678 (1.6 Mb)  TX bytes:605918 (591.7 Kb)
          Interrupt:15 Base address:0x3000

eth1 Link encap:Ethernet HWaddr 00:80:48:x:x:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2773 errors:0 dropped:0 overruns:0 frame:0 TX packets:16615 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100
RX bytes:202939 (198.1 Kb) TX bytes:1590493 (1.5 Mb) Interrupt:11 Base address:0xc800

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)

when i take the TC out out

[root@bridge root]# tc -s class ls dev imq0
class htb 10:1 root leaf 21: prio 3 rate 12Kbit ceil 12Kbit burst 2Kb cburst 1614b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 1092266 ctokens: 861333

class htb 10:2 root leaf 22: prio 2 rate 28Kbit ceil 28Kbit burst 2Kb cburst 1634b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 468113 ctokens: 373714

class htb 10:3 root leaf 23: prio 1 rate 16Kbit ceil 16Kbit burst 2Kb cburst 1619b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 819200 ctokens: 647999

class htb 10:5 root leaf 24: prio 4 rate 8Kbit ceil 8Kbit burst 1609b cburst 1609b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 1287999 ctokens: 1287999

class htb 1:1 root leaf 10: prio 0 rate 64Kbit ceil 64Kbit burst 1680b cburst 1680b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 168099 ctokens: 168099

all are 0 bytes

iam not sure what is wrong, any expert coment will be appriciate

hare

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Stef Coene

Do you thing its iptables problem
even i have cheked with iptables 1.2.7a
still iam not succeeded

when i make rules with out IMQ, iam able to see all the traffic even postrouting and prerouting

really confusing this,

hare
----- Original Message -----
From: "Stef Coene" <[email protected]>
To: "hare ram" <[email protected]>; <[email protected]>
Sent: Thursday, April 17, 2003 3:17 PM
Subject: Re: [LARTC] IMQ problem -- badly need help

Quoted 4 lines · hare ram
Quoted 3 lines

Hi all Guru's

I have been try to work on this IMQ more than 4 weeks but i could not

get

Quoted 7 lines
Quoted 7 lines

any results
really and badly need to help to achive my setup

iam trying to achieve is up+down=total bandwidth, as per the user groups suggestion
i would like to use IMQ to make my setup to achive this

Quoted 5 lines
Quoted 5 lines

my setup is , RH 9.0 with patch bridge-nf
and patched IMQ with iptables 1.2.8 and POM also done HTB also patched with latest ip route

my bridge is running fine, iam able to use transparent bridge, working

that

Quoted 11 lines
Quoted 11 lines

also

laptop---switch--eth1(bridge)eht0--switch--Router--internet

next i have executed small example

iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
----
" when i executed above line i got this message [root@bridge root]# iptables -t mangle -A PREROUTING -i eth1 -j

IMQ --todev

Quoted 4 lines
Quoted 4 lines

0
iptables: target `IMQ' v1.2.6a (I'm v1.2.8).
----
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 20 -m

state --state

Quoted 2 lines
Quoted 2 lines

ESTABLISHED -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 80 -m

state --state

Quoted 2 lines
Quoted 2 lines

ESTABLISHED -j MARK --set-mark 2
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 25 -m

state --state

Quoted 3 lines
Quoted 1 line

ESTABLISHED -j MARK --set-mark 3

This is your problem. I think the iptables rule is not added. But don't

ask

Quoted 12 lines

me why. Maybe you use the wrong iptables version? I don't know.

Stef

--

[email protected]
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

author
#3 lore raw
In reply to Stef Coene
Quoted 3 lines · hare ram

Do you thing its iptables problem
even i have cheked with iptables 1.2.7a
still iam not succeeded

Mhh.

Quoted 4 lines

when i make rules with out IMQ, iam able to see all the traffic even postrouting and prerouting

really confusing this,

I know there are members of this list using imq. Maybe they can help? Anyone? Hallo?

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/