Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Intermediate Functional Block (IFB = x-IMQ) usage ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Tue Apr 11, 2006 7:24 pm    Post subject: Intermediate Functional Block (IFB = x-IMQ) usage ? Reply with quote

There is Intermediate Functional Block (IFB) that replaces Intermediate Queuing Machine (IMQ) in recent kernels.

Can someone tell me how to use new IFB?

I was able to bring up ifb0 device but I can't redirect traffic to it.
In old IMQ I've been using something like this:
Code:
iptables -t mangle -A PREROUTING -i eth2 -j IMQ --todev 0

but now it doesn't work.

Any ideas?
_________________
gentoo user
Back to top
View user's profile Send private message
PBR
n00b
n00b


Joined: 02 Apr 2006
Posts: 13

PostPosted: Wed Apr 12, 2006 4:30 pm    Post subject: Reply with quote

Use tc ???

I found in source code of drivers/net/ifb.c folowing comment:
Quote:
You need the tc action mirror or redirect to feed this device
packets.


Let us know if U will sucesfull. I have no time to test it but I will need it soon :)
Back to top
View user's profile Send private message
frido
n00b
n00b


Joined: 03 Apr 2006
Posts: 40

PostPosted: Thu Apr 20, 2006 4:06 pm    Post subject: Reply with quote

check this http://linux-net.osdl.org/index.php/IFB
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Thu Apr 20, 2006 7:18 pm    Post subject: Reply with quote

when I try example given there I get:
Code:
modprobe ifb

ifconfig ifb0 up

ifconfig
eth0      Link encap:Ethernet  HWaddr 00:15:F2:AC:F7:AC
          inet addr:10.0.9.66  Bcast:10.0.9.127  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2404385 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2203654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2592797554 (2472.6 Mb)  TX bytes:1974750383 (1883.2 Mb)
          Interrupt:217 Memory:db000000-0

ifb0      Link encap:Ethernet  HWaddr 4A:98:47:A7:2C:BB
          UP BROADCAST 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:32
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:17728 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17728 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3233642 (3.0 Mb)  TX bytes:3233642 (3.0 Mb)

lsmod
Module                  Size  Used by
xt_mark                 2240  0
xt_MARK                 2944  0
ifb                     4104  0
it87                   23268  0
hwmon_vid               2624  1 it87
i2c_isa                 4608  1 it87

tc filter add dev eth0 parent ffff: protocol ip prio 10 u32 \
> match u32 0 0 flowid 1:1 \
> action ipt -j MARK --set-mark 1 \
> action mirred egress redirect dev ifb0
/usr/local/lib/iptables/libipt_mark.so: cannot open shared object file: No such file or directory
 failed to find target MARK

bad action parsing
parse_action: bad value (11:ipt)!
Illegal "action"


what do I miss?
_________________
gentoo user
Back to top
View user's profile Send private message
frido
n00b
n00b


Joined: 03 Apr 2006
Posts: 40

PostPosted: Sat Apr 22, 2006 7:39 pm    Post subject: Reply with quote

Quote:

Code:

tc filter add dev eth0 parent ffff: protocol ip prio 10 u32 \
> match u32 0 0 flowid 1:1 \
> action ipt -j MARK --set-mark 1 \
> action mirred egress redirect dev ifb0
/usr/local/lib/iptables/libipt_mark.so: cannot open shared object file: No such file or directory
 failed to find target MARK

bad action parsing
parse_action: bad value (11:ipt)!
Illegal "action"



This is strange. Is your iproute2 installed by emerge ??
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Sun Apr 23, 2006 2:36 pm    Post subject: Reply with quote

frido wrote:
This is strange. Is your iproute2 installed by emerge ??

Yes, it is:
Code:
emerge -pv iproute2

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-apps/iproute2-2.6.15.20060110  -atm -berkdb -minimal 0 kB

Total size of downloads: 0 kB

_________________
gentoo user
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Sun Apr 30, 2006 1:36 am    Post subject: Reply with quote

I had to make symbolic link
Code:
/usr/local/lib/iptables -> /lib/iptables

to be able to use those example scripts.
It's
Code:
/usr/local/lib/iptables -> /lib64/iptables

on amd64 systems.

On x86 system everything works fine, but unfortunately on amd64 I've got hard-lock at this point:
Code:
manchester tc # ./script.bsh
tablename: mangle hook: NF_IP_PRE_ROUTING
        target: MARK set 0x1  index 0
Action 4 device ifb0 ifindex 5
     


Connection with that machine disappeared and I'll have to go there to reset it manualy. :(
_________________
gentoo user
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Sun Apr 30, 2006 9:42 pm    Post subject: Reply with quote

here is the (very sad) epilogue of whole story:

https://forums.gentoo.org/viewtopic-t-458545.html


:cry:
_________________
gentoo user
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum