OpenWrt Forum Archive

Topic: whiterussian_rc4 + imq

The content of this topic has been archived on 11 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello

As I understand, rc4 suportrs imq. But I can't  make it work sad

I do next:
1. Install firmware http://downloads.openwrt.org/whiterussi … -jffs2.bin
2. Make settings for interfaces
3. Install packets
ipkg install http://downloads.openwrt.org/whiterussi … mipsel.ipk
ipkg install http://downloads.openwrt.org/whiterussi … mipsel.ipk
ipkg install http://downloads.openwrt.org/whiterussi … mipsel.ipk
4.
/sbin/insmod sch_htb.o
/sbin/insmod sch_sfq.o
/sbin/insmod cls_u32.o
/sbin/insmod imq.o
/sbin/insmod sch_prio.o
5.
tc qdisc add dev imq0 root handle 1: htb default 20
tc class add dev imq0 parent 1: classid 1:1 htb rate 2mbit burst 15k
tc class add dev imq0 parent 1:1 classid 1:10 htb rate 64kbit
tc class add dev imq0 parent 1:1 classid 1:20 htb rate 32kbit
tc qdisc add dev imq0 parent 1:10 handle 10: sfq
tc qdisc add dev imq0 parent 1:20 handle 20: sfq
tc filter add dev imq0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.0/32 flowid 1:10
tc filter add dev imq0 parent 1:0 protocol ip prio 1 u32 match ip src 192.168.1.0/32 flowid 1:10

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

On this step I catch error:
iptables v1.3.3: Unknown arg `--todev'
Try `iptables -h' or 'iptables --help' for more information.

I've seen iptables sources, they have patch for imq. Why it doesn't understand argument? Can anyone tell me where is my mistake?
Thank you!

I can't believe it why everyone like to use their own QoS script. I would recommend to use nbd's qos-scripts package. It was easily configured within minutes and it works exelent.

If you like to try it, please look at 3.3. How do I configure QoS aka traffic shaping in OpenWrt?.

(Last edited by olli on 26 Dec 2005, 13:30)

"iptables v1.3.3: Unknown arg `--todev'"

This is due to bugs in WhiteRussian RC4, the neccassary iptable-modules don't get installed. Try something like the following patch, but correct the line-wrapping before applying. (Or even better, apply the neccassary changes manually. Is it somehow possible to attach files in this forum, to avoid garbling patches because of line-wrapping?)

Index: iptables/ipkg/iptables-mod-imq.control
===================================================================
--- iptables/ipkg/iptables-mod-imq.control      (Revision 0)
+++ iptables/ipkg/iptables-mod-imq.control      (Revision 0)
@@ -0,0 +1,5 @@
+Package: iptables-mod-imq
+Priority: optional
+Section: net
+Depends: kmod-imq
+Description: Iptables (IPv4) extensions for Intermediate Queuing Device QoS-support

Index: iptables/Config.in
===================================================================
--- iptables/Config.in  (Revision 194)
+++ iptables/Config.in  (Arbeitskopie)
@@ -17,6 +17,7 @@
        select BR2_PACKAGE_IPTABLES_MOD_IPOPT
        select BR2_PACKAGE_IPTABLES_MOD_IPSEC
        select BR2_PACKAGE_IPTABLES_MOD_NAT
+       select BR2_PACKAGE_IPTABLES_MOD_IMQ
        select BR2_PACKAGE_IPTABLES_MOD_ULOG
        help
          Extra Iptables extensions for IPv4 firewalling (meta-package)
@@ -69,6 +70,14 @@
        help
          Iptables (IPv4) extensions for different NAT targets

+config BR2_PACKAGE_IPTABLES_MOD_IMQ
+       tristate "iptables-mod-imq - Iptables extensions for Intermediate Queuing Device QoS-support"
+       default m if CONFIG_DEVEL
+       depends BR2_PACKAGE_IPTABLES
+       select BR2_PACKAGE_KMOD_IMQ
+       help
+         Iptables (IPv4) extensions for Intermediate Queuing Device QoS-support
+
config BR2_PACKAGE_IPTABLES_MOD_ULOG
        tristate "iptables-mod-ulog - Iptables extensions for user-space packet logging"
        default m if CONFIG_DEVEL
Index: iptables/Makefile
===================================================================
--- iptables/Makefile   (Revision 194)
+++ iptables/Makefile   (Arbeitskopie)
@@ -42,7 +42,7 @@
$(eval $(call PKG_template,IPTABLES_MOD_CONNTRACK,iptables-mod-conntrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,IPTABLES_MOD_EXTRA,iptables-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,IPTABLES_MOD_FILTER,iptables-mod-filter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_template,IPTABLES_MOD_IMQ,iptables-mod-img,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,IPTABLES_MOD_IMQ,iptables-mod-imq,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,IPTABLES_MOD_IPOPT,iptables-mod-ipopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,IPTABLES_MOD_IPSEC,iptables-mod-ipsec,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,IPTABLES_MOD_NAT,iptables-mod-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
@@ -70,7 +70,7 @@
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all install install-devel
        touch $@
-
+
$(IPKG_IPTABLES):
        install -d -m0755 $(IDIR_IPTABLES)/usr/sbin
        cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/

olli wrote:

I can't believe it why everyone like to use their own QoS script. I would recommend to use nbd's qos-scripts package.

I read nbd scripts, tried his package and works excelent! The problem is that is intended to a specific use that doesn't fit the needs of our network, that's why I don't use it smile

libipt_imq.so is missing in RC4, so there's no way to send traffic from pre/postrouting to IMQ devices.

Regards

Wallace

Neeeeeeeeeeeeeeevermind, lmao

(Last edited by cpu1333mhz on 4 Jan 2006, 08:45)

The discussion might have continued from here.