[LARTC] IMQ

2003-03-23 Thread Yans van Horn
Hello

I have a server with a dsl connection on eth1 and local interface eth0.
Because of the NAT i cannot direct traffic to IMQ device in PREROUTING chain
but have to use INPUT and FORWARD. So i use rules.

iptables -t mangle -A INPUT -i eth1 -j IMQ --todev 0
iptables -t mangle -A FORWARD -i eth1 -j IMQ --todev 0

And now the strange thing: FORWARD traffic gets directed nicely to the IMQ,
but INPUT *doesn't* !

To be just sure i removed "FORWARD" line and left only the "INPUT" (other
mangle rules were removed)

Chain INPUT (policy ACCEPT 3511 packets, 2753307 bytes)
pkts  bytes target prot opt in out source
destination
 343   439847 IMQall  --  eth1   any anywhere
anywhere   IMQ: todev 0

But when i check IMQ0 using ifconfig:

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 see there is no traffic going through this device!

Anyone knows how can it be possible ?

--
best regards,
Marcin 'Yans' Bazarnik
[EMAIL PROTECTED]

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] HTB problem (yet another one?)

2002-08-21 Thread Yans van Horn

Hello

I have a small (maybe typical?) problem with HTB. Present configuration is:

Kernel: 2.4.20-pre4 (with HTB, IMQ)

endeavour:/var/log# tc -V
tc utility, iproute2-ss010824

Which should support HTB because writes help for it ;-)

endeavour:~# tc qdisc add dev imq0 root handle 1 htb ttt
What is "ttt"?
Usage: ... qdisc add ... htb [default N] [r2q N]
 default  number of class to which unclassified packets are sent {1}


endeavour:~# ip link show
1: lo:  mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0:  mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:50:ba:d4:9d:50 brd ff:ff:ff:ff:ff:ff
3: eth1:  mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:48:54:55:54:d1 brd ff:ff:ff:ff:ff:ff
4: eth2:  mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:a0:24:d5:ae:33 brd ff:ff:ff:ff:ff:ff
5: ppp0:  mtu 1656 qdisc pfifo_fast qlen 3
link/ppp
6: ppp1:  mtu 1656 qdisc pfifo_fast qlen 3
link/ppp
7: imq0:  mtu 1500 qdisc pfifo_fast qlen 30
link/void

I should have all the needed modules also:

endeavour:~# lsmod
Module  Size  Used byNot tainted
ipt_IMQ  760   1  (autoclean)
sch_htb18048   0  (autoclean) (unused)
imq 1864   1
cls_route   4088   0  (unused)
cls_u32 4540   0
cls_fw  2360   0  (unused)
sch_prio2368   0  (unused)
sch_sfq 3520   0  (unused)
sch_tbf 2432   0
sch_cbq11744   0
ipt_MARK 792  73  (autoclean)
iptable_mangle  2196   1  (autoclean)
ipt_REDIRECT 824   3  (autoclean)
ipt_nth 1280   2  (autoclean)
ipt_REJECT  2840   2  (autoclean)
iptable_filter  1672   1  (autoclean)
ppp_deflate 2904   2  (autoclean)
zlib_inflate   18436   0  (autoclean) [ppp_deflate]
zlib_deflate   17720   0  (autoclean) [ppp_deflate]
bsd_comp3992   0  (autoclean)
3c59x  24560   1
ip_nat_ftp  2864   0  (unused)
iptable_nat14040   2  [ipt_REDIRECT ip_nat_ftp]
ip_conntrack_ftp3760   1
ip_conntrack   16448   2  [ipt_REDIRECT ip_nat_ftp iptable_nat
ip_conntrack_ftp]
ip_tables  10552  10  [ipt_IMQ ipt_MARK iptable_mangle ipt_REDIRECT
ipt_nth ipt_REJECT iptable_filter iptable_nat]

-
And the PROBLEM:

When i try to add qdisc to the imq device.. a get:

endeavour:~# tc qdisc add dev imq0 root handle 1 htb default 20 r2q 10
RTNETLINK answers: Invalid argument
-

BTW: Adding CBQ qdisc to imq0 works fine... Any suggestions ?

--
regards,

Marcin 'Yans' Bazarnik
[EMAIL PROTECTED]

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/