IMQ+HTB problem
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 / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines
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
Quoted 8 lines
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.
Quoted 20 lines
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
destinationChain INPUT (policy ACCEPT 15068 packets, 1185569 bytes)
pkts bytes target prot opt in out source
destinationChain FORWARD (policy ACCEPT 116790 packets, 16553990 bytes)
pkts bytes target prot opt in out source
destination
Quoted 7 lines
Chain OUTPUT (policy ACCEPT 4943 packets, 670996 bytes)
pkts bytes target prot opt in out source
destinationChain POSTROUTING (policy ACCEPT 121733 packets, 17224986 bytes)
pkts bytes target prot opt in out source
destination
Euh. Where is your iptables command ????
Quoted 9 lines
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 1direct_packets_stat0 ver 3.6
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc htb 1: dev imq0 r2q 10 default 1direct_packets_stat0 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
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/
Hi thanks for the quick reply
check the my questions and answers below in caps
----- Original Message -----
From: "Stef Coene" <[email protected]>
To: "hare ram" <[email protected]>; <[email protected]>
Sent: Tuesday, April 15, 2003 6:53 PM
Subject: Re: [LARTC] IMQ+HTB problem
Quoted 1 line
Quoted 1 line
i have patched the IMQ and htb to kernel, but when i do egress
filtering,
Quoted 6 lines
Quoted 6 lines
iam not able to see any traffic
and excusted the following the commands
modprobe imq numdevs=1
Quoted 8 lines
Quoted 6 lines
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
Quoted 20 lines
Quoted 20 lines
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
destinationChain INPUT (policy ACCEPT 15068 packets, 1185569 bytes)
pkts bytes target prot opt in out source
destinationChain FORWARD (policy ACCEPT 116790 packets, 16553990 bytes)
pkts bytes target prot opt in out source
destination
Quoted 9 lines
Quoted 7 lines
Chain OUTPUT (policy ACCEPT 4943 packets, 670996 bytes)
pkts bytes target prot opt in out source
destinationChain POSTROUTING (policy ACCEPT 121733 packets, 17224986 bytes)
pkts bytes target prot opt in out source
destinationEuh. 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
Quoted 10 lines
Quoted 9 lines
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 1direct_packets_stat0 ver 3.6
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc htb 1: dev imq0 r2q 10 default 1direct_packets_stat0 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
Quoted 2 lines
command working. So packets are queued in the imq device.
IAM WONDERING, WHAT COULD BE THE WRONG,ANY SUGGESTIONS
Quoted 10 lines
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/
Quoted 2 lines
Quoted 1 line
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.
Quoted 10 lines
Quoted 7 lines
Quoted 5 lines
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
destinationEuh. 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
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/