tc and virtual interfaces
Hi all,
I need to add traffic shaping in a linux router (debian) and I need to understand tc behaviour with virtual interfaces.
Examples:
I have eth0 and eth0:0, if I set a limit on eth0 datarate, is also eth0:0 involved? ...or...
If I have a tunnel OpenVPN (tun0) on eth0, how is managed data rate limit?
Thanks in advance,
Fabio (I hope this post is not OT)
Hello,
Quoted 5 lines · Fabio Marcone
Hi all,
I need to add traffic shaping in a linux router (debian) and I need to understand tc behaviour with virtual interfaces.Examples:
I have eth0 and eth0:0, if I set a limit on eth0 datarate, is also eth0:0 involved?
eth0:0 is not an interface, it is an IPv4 alias on eth0. The real and only interface here is eth0.
Quoted 2 lines
...or...
If I have a tunnel OpenVPN (tun0) on eth0, how is managed data rate limit?
tun0 is an interface on its own. However, if encapsulating traffic happens to go through eth0, it will be affected by traffic shaping just as any other traffic going through eth0.
thanks for your reply,
Quoted 2 lines
eth0:0 is not an interface, it is an IPv4 alias on eth0. The real and only interface here is eth0.
ok, so I can't set up a queue on it, isn't it?
Quoted 2 lines
tun0 is an interface on its own. However, if encapsulating traffic happens to go through eth0, it will be affected by traffic shaping just as any other traffic going through eth0.
ok, and I can limit datarate on tun0 and on eth0 ? the first is applied only on vpn packets and the last on all eth0 outgoinig traffic I think...
thanks,
Fabio
The traffic shapping must be applied to the physical interface ( eth0 in this case).
Jorge Dávila.
Quoted 23 lines · Fabio Marcone
thanks for your reply,
Quoted 3 lines
eth0:0 is not an interface, it is an IPv4 alias on eth0. The real and only interface here is eth0.
ok, so I can't set up a queue on it, isn't it?
Quoted 4 lines
tun0 is an interface on its own. However, if encapsulating traffic happens to go through eth0, it will be affected by traffic shaping just as any other traffic going through eth0.
ok, and I can limit datarate on tun0 and on eth0 ? the first is applied only on vpn packets and the last on all eth0 outgoinig traffic I think...
thanks,
Fabio
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
Jorge Isaac Dávila López +505 8430 5462 [email protected] --- Esta tierra es Linux. En las noches calladas puede escucharse a las máquinas Windows re-iniciándose...
Quoted 4 lines
The traffic shapping must be applied to the physical interface ( eth0 in this case).
Jorge Dávila.
I have some king of setup with ifaces alias, and do shaping based on IP's instead of the iface to be able to control that
2009/7/10 Jorge Dávila <[email protected]>:
Quoted 2 lines
The traffic shapping must be applied to the physical interface ( eth0 in this case).
It is not exactly correct. AFAIK you can bind traffic shaping to bridged interface, imq or ifb. Maybe even more I am not aware of.
But I dont know if it will help in this case.
Karel
Good morning,
AFAIK iptables does not allow rules applied to eth0:x, the rules must be applied to the physical interface ( eth0 ).
My suggestion for you is apply traffic shapping to the physical interface and create rules in table mangle of iptables to identify the traffic.
By example, create a class with tc to limit the ipsec traffic going through the ipsec interface and other class for the traffic going through the tun devices.
Then, using filters created with tc or by rules in the mangle table, you can identify the traffic, set the class.
The scenary will be a little bit more complicated if you want filter traffic going through the tunnels both I think that can be acomplished but this will be added unnecesary complexity to the environment.
Jorge Dávila.
Quoted 17 lines · Fabio Marcone
Hi all,
I need to add traffic shaping in a linux router (debian) and I need to understand tc behaviour with virtual interfaces.Examples:
I have eth0 and eth0:0, if I set a limit on eth0 datarate, is also eth0:0 involved?
...or...
If I have a tunnel OpenVPN (tun0) on eth0, how is managed data rate limit?Thanks in advance,
Fabio (I hope this post is not OT)
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
Jorge Isaac Dávila López +505 8430 5462 [email protected] --- Esta tierra es Linux. En las noches calladas puede escucharse a las máquinas Windows re-iniciándose...