Re: Shape own router

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Salatiel Filho wrote:

Where can i read about IFB ? I try to google but i can not find too
much info. maybe i am looking for the wrong words.  Maybe this is the
solution, cause i would like to put both local traffic and forwarded
traffic in the same htb queue.

It's quite new, it was designed as a replacement for imq, but doesn't
quite do everything it can.

Here's howto send all ip incoming on eth0 to ifb - it's called
intermediate functional block in kernel config.

IP=/sbin/ip
TC=/sbin/tc

$TC qdisc del dev ifb0 root &>/dev/null
$TC qdisc del dev eth0 ingress &>/dev/null
$IP link set ifb0 down &>/dev/null

if [ "$1" = "stop" ]
then
        echo "stopping"
        exit
fi

modprobe ifb
$TC qdisc add dev eth0 ingress
$IP link set ifb0 up

tc filter add dev eth0 parent ffff: \
protocol ip prio 10 u32 match u32 0 0 \
flowid 1:0 \
action mirred egress redirect dev ifb0

Then just add tc rules on ifb like any other device.




If you really need imq you will need to check first imq option in kernel
config is set to A.

If i put after NAT in prerouting , how can i shape upload by IP ?

I use iptables to mark unnatted addresses then shape on the real
interface using the marks with a filter to catch the rest (ie traffic
from shaping box to wan)

If you use IMQ then it's postrouting for egress - so you can use the
second option to choose whether it hooks before/after NAT.
ie. AB would hook after prerouting (de)nat but before postrouting nat.


Andy.

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux