Re: info on IMQ and routing

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

 



В Чтв, 23/07/2009 в 12:51 +0200, Fabio Marcone пишет:
> Hi!
> I need to understand how are routed packets outgoing from a imq 
> interface, because I have a router with some eth interfaces and I need 
> to undestand:
> - if I have to set up a imq for each eth, or
> - if I can set up just one eth and then use tc to create some classes 
> and related filters.
> 
> What are pros and cons of these choices?
> 
> I'm googled around but without success.


In case of using IMQ things works as usual, except:

- you can direct traffic from many interfaces to one imq virtual device,
for example to direct incoming traffic to imq0 and outgoing to imq1:

iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0
iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0

iptables -t mangle -A POSTROUTING -o eth0 -j IMQ --todev 1
iptables -t mangle -A POSTROUTING -o eth1 -j IMQ --todev 1

- you can shape on imq (imq0 and imq1) device with tc just as usual
- after traffic has been shaped it's being reinjected back to the place
it has been taken for shaping (just after -t mangle, POSTROUTING or
PREROUTING).

The main purpose of IMQ is the ability to shape several interfaces by
one tc qdisc. So the is probably very less sense of setting up one imq
per one interface.

-- 
Покотиленко Костик <casper@xxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux