View previous topic :: View next topic |
Author |
Message |
tnt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1636820656404ed13d7d9ea.gif)
Joined: 27 Feb 2004 Posts: 1227
|
Posted: Tue Apr 11, 2006 7:24 pm Post subject: Intermediate Functional Block (IFB = x-IMQ) usage ? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
PBR n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Apr 2006 Posts: 13
|
Posted: Wed Apr 12, 2006 4:30 pm Post subject: |
|
|
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 ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
frido n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Apr 2006 Posts: 40
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tnt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1636820656404ed13d7d9ea.gif)
Joined: 27 Feb 2004 Posts: 1227
|
Posted: Thu Apr 20, 2006 7:18 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
frido n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Apr 2006 Posts: 40
|
Posted: Sat Apr 22, 2006 7:39 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tnt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1636820656404ed13d7d9ea.gif)
Joined: 27 Feb 2004 Posts: 1227
|
Posted: Sun Apr 23, 2006 2:36 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tnt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1636820656404ed13d7d9ea.gif)
Joined: 27 Feb 2004 Posts: 1227
|
Posted: Sun Apr 30, 2006 1:36 am Post subject: |
|
|
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. ![Sad :(](images/smiles/icon_sad.gif) _________________ gentoo user |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tnt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1636820656404ed13d7d9ea.gif)
Joined: 27 Feb 2004 Posts: 1227
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|