[LARTC] connecting IMQ to different interfaces

Linux Advanced Routing and Traffic Control

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

 



Ok, I'm pretty new to this stuff, so I hope this question doesn't appear stupid:

How do I connect an IMQ to different network interfaces?

eg...say I want to control OUTGOING traffic normally on 3 different interfaces:

tc qdisc add dev "eth0" root handle 1: htb default 1
tc class add dev "eth0" parent 1: classid 1:1 htb rate 200kbit ceil 350kbit prio 2

tc qdisc add dev "eth1" root handle 1: htb default 1
tc class add dev "eth1" parent 1: classid 1:1 htb rate 200kbit ceil 350kbit prio 2

tc qdisc add dev "eth2" root handle 1: htb default 1
tc class add dev "eth2" parent 1: classid 1:1 htb rate 200kbit ceil 350kbit prio 2


now I want to control INCOMING traffic to the three different interfaces with IMQ:

tc qdisc add dev "imq0" root handle 1: htb default 1
tc class add dev "imq0" parent 1: classid 1:1 htb rate 2000kbit prio 3

iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0
ip link set "imq0" up

tc qdisc add dev "imq1" root handle 1: htb default 1
tc class add dev "imq1" parent 1: classid 1:1 htb rate 2000kbit prio 3

iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 1
ip link set "imq1" up

Now how do I apply it to the third interface? I've run out of imq's!
Thanks guys
craig


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