info on IMQ and routing
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.
thanks in advance,
Fabio
В Чтв, 23/07/2009 в 12:51 +0200, Fabio Marcone пишет:
Quoted 11 lines
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.
Signature · 1 line
Покотиленко Костик <[email protected]>