From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Correa Date: Mon, 05 Apr 2004 15:58:08 +0000 Subject: Re: [LARTC] IMQ & NAT Message-Id: <40718210.7030705@pobox.com> List-Id: References: <1081120183.994.18.camel@snowball> In-Reply-To: <1081120183.994.18.camel@snowball> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi Joan, can you please tell us what version of kernel and iptables are=20 you using? Are you using Patrick McHardy's / www.linuximq.net original IMQ=20 implementation? tks Andre Correa www.linuximq.net Joan Fuster Monz=F3 wrote: > Hi all, my IMQ device works OK (thanks to Andy Furniss), but now I've > problems to attach the traffic in the qdisc's. This is my conf: >=20 > ----------------------------------------------------------------------- > INET > | > |eth0 300Kbps > ROUTER (NAT) > |eth1 > | > LAN > ----------------------------------------------------------------------- >=20 > MAX00 >=20 > tc qdisc add dev imq0 root handle 1: htb default 13 > = =20 > tc class add dev imq0 parent 1: classid 1:1 htb rate ${MAX}kbit ceil > ${MAX}kbit > = =20 > tc class add dev imq0 parent 1:1 classid 1:10 htb rate 60kbit ceil > ${MAX}kbit prio 0 > tc class add dev imq0 parent 1:1 classid 1:11 htb rate 40kbit ceil > ${MAX}kbit prio 1 > tc class add dev imq0 parent 1:1 classid 1:12 htb rate 100kbit ceil > ${MAX}kbit prio 2 > tc class add dev imq0 parent 1:1 classid 1:13 htb rate 100kbit ceil > ${MAX}kbit prio 3 > = =20 > tc qdisc add dev imq0 parent 1:10 handle 100: sfq > tc qdisc add dev imq0 parent 1:11 handle 110: sfq > tc qdisc add dev imq0 parent 1:12 handle 120: sfq > tc qdisc add dev imq0 parent 1:13 handle 130: sfq > = =20 > tc filter add dev imq0 parent 1:0 protocol ip prio 1 handle 1 fw classid > 1:10 > tc filter add dev imq0 parent 1:0 protocol ip prio 2 handle 2 fw classid > 1:11 > tc filter add dev imq0 parent 1:0 protocol ip prio 3 handle 3 fw classid > 1:12 > tc filter add dev imq0 parent 1:0 protocol ip prio 4 handle 4 fw classid > 1:13 >=20 > ip link set imq0 up >=20 > iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0 > = =20 > #ICMP = =20 > iptables -t mangle -A PREROUTING -i eth0 -p icmp -j MARK --set-mark 1 > iptables -t mangle -A PREROUTING -i eth0 -p icmp -j RETURN > = =20 > #SSH = =20 > iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 22 -j MARK > --set-mark 1 > iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 22 -j RETURN >=20 > ... > ------------------------------------------------------------------------ >=20 > I've patched the IMQ with the imq-nat patch, but all traffic goes to > 1:13 >=20 > #tc -s class show dev imq0 > ------------------------------------------------------------------------- > ... >=20 > class htb 1:13 parent 1:1 leaf 130: prio 3 rate 100Kbit ceil 300Kbit > burst 1727b cburst 1983b > Sent 8981846847 bytes 18055130 pkts (dropped 99, overlimits 0) > lended: 8947767 borrowed: 9107363 giants: 0 > tokens: 136320 ctokens: 52265 > =20 > class htb 1:12 parent 1:1 leaf 120: prio 2 rate 100Kbit ceil 300Kbit > burst 1727b cburst 1983b > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 138240 ctokens: 52905 >=20 > -------------------------------------------------------------------------= -- >=20 > What happens?? I'm newbie in IMQ... Sorry for the long text ;) Thanks > for the help!! >=20 > Joan _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/