Bridge + leased line + tc

Linux Advanced Routing and Traffic Control

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

 



Hi,

I can't get traffic shaping working.

This is my situation:


	     --------                       ------
Net1 ----- |router|  -------------------- | TC | ----------- Net2
           --------      leased line      ------

						   eth1    eth0

We use the leased line for normal traffic but also for synchronisation
between 2 servers. The leased line is 2mbit. The synchronisation
generates too much traffic and uses completely the 2mbit capacity of the
leased line. This is no problem during night, but we want to limit the
synchronisation traffic during day (or in other words: the sync-traffic
should get the lowest priority and the other traffic can use up to
2mbit).

According to the documentation, you can only shape outgoing traffic. We
took a PC (named TC) and put the network interfaces in bridge mode.
The synchronisation happens from Net1 to Net2, so TC is after the leased
line.
Normally you would shape the outgoing traffic on eth0, but this doesn't
work. We even tried to limit eth0 to 20kbit, but the synch-traffic
completely fills the leased line and no other traffic gets through.

We found a temporary fix by using IMQ with iptables:
/sbin/tc qdisc del root dev imq0
/sbin/tc qdisc add dev imq0 root handle 1: htb default 20
/sbin/tc class add dev imq0 parent 1: classid 1:1 htb rate 2Mbit burst
6k
/sbin/tc class add dev imq0 parent 1:1 classid 1:10 htb rate 64kbit ceil
787kbit
/sbin/tc class add dev imq0 parent 1:1 classid 1:20 htb rate 2Mbit
/sbin/tc qdisc add dev imq0 parent 1:10 handle 10: sfq perturb 10
/sbin/tc qdisc add dev imq0 parent 1:20 handle 20: sfq perturb 10
/sbin/tc filter add dev imq0 parent 1: protocol ip prio 18 u32 match ip
dst 10.10.10.10 flowid 1:10	(10.10.10.10 is ip of server in Net2).


Is there a better way to give the sync-traffic the lowest priority? If
somybody starts a download it should get 2mbit and the sync-traffic
should get the rest (if any).

We would like to upgrade to 2.6, but imq is not maintained. Any help?


Thanks in advance,

Wouter
			
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


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