Skip to contentSkip to conversation

iptables IMQ command problem

DISCUSSION Diego Cabrero 1 participant 2 messages Nov 24, 2005 – Nov 28, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi everybody,
Here is my situation:
First of all, i need control over the downlink bandwith, so i patched kernel (2.4.28), iptables (1.2.11) so that i get IMQ support (imq0 and imq1), but when i run the traffic control script i've got an error on this line:

iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0

The error report is:
iptables v1.2.11: Unknown arg `--todev'
Try `iptables -h' or 'iptables --help' for more information. RTNETLINK answers: Invalid argument
RTNETLINK answers: No such file or directory RTNETLINK answers: No such file or directory

I've tried a lot of things like change the file's ".IMQ-test" mode , check if todev variable exist (it does), don't know what could be next, i'd appreciate some help.

Thanks.

#1 lore raw

Controling Inbound and Outbound traffic simultaneusly.

Hi,

I'm Running two independent traffic applications between two computers conected point to point each other, at the same time each of these applications are generating trafficin one direction so i have two independent traffics traveling througth the same channel.

Figure:

               eth1, PC1 ---------app1-----------> eth1, PC2
                               <--------app2------------

My problem is that i am trying to control the whole inbound and outbound traffic through PC1 (by using IMQ for ingress) but it seems like they are connected somehow.

This is the script i am using:
---------------------------
Inbound control commands:
tc qdisc add dev imq0 root handle 1: htb
tc class add dev imq0 parent 1: classid 1:1 htb rate
${INBOUND}kbps ceil ${INBOUND}kbps
iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 1 tc filter add dev imq0 protocol ip parent 1:0 handle 1 fw
flowid 1:1

           iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0

Outbound control commands:
tc qdisc add dev eth1 root handle 2: htb
tc class add dev eth1 parent 2: classid 2:1 htb rate
${OUTBOUND}kbps ceil ${OUTBOUND}kbps
tc filter add dev eth1 protocol ip parent 2:0 prio 3 u32
match ip dst 0.0.0.0/0 flowid 2:1

Any ideas?

Thanks!!