Re: Traffic shaping on multiple interfaces

Linux Advanced Routing and Traffic Control

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

 



Terry Baume wrote:
I'm trying to setup traffic shaping on my linux gateway/router.

The system has 3 interfaces:
eth0 - My LAN - with IP address 192.168.0.254
eth1 - The ethernet connection to which my ADSL modem is connected. This has a 10.25.x.x IP, more on this later. The ADSL link has an upstream of ~1.2mbit. ppp0 - The PPP connection which is my WAN connection, with a real world IP.

The system acts a router, performing NAT for my LAN. This works perfectly, as does traffic shaping on ppp0 - I get very good results.

The trouble is that my ISP allows me to user another service over my ADSL line, as a bonus. Basically the modem has 2 virtual circuits, one being for my WAN connection, and the other being a private network between other users of the same ISP, on the same telephone exchange - this is where the 10.25.x.x IP on eth1 comes from. To make things clear, low latency on the eth1 interface is not important, this interface is only used for file sharing and such. Latency on ppp0 is obviously important, being my WAN connection.

My IPTables rules provide NAT for both connections, the only thing I cannot get working correctly is traffic shaping.

So far, I have experimented with wondershaper, shaping on the ppp0 interface. This works well to keep latency down when traffic is on the ppp0 interface. If there is traffic on eth1 (the 'private' network of 10.25.x.x), with no traffic on the ppp0 interface, latency on ppp0 remains low, regardless of whether traffic shaping is active. I believe this has something to do with the way my ISP has configured priorities at the telephone exchange. I begin to run in to trouble when I am uploading heavily on eth1 & ppp0 simultaneously. Once this happens, ping times over ppp0 rise dramatically, to well over 1200ms (normal is around 7ms). I have tried shaping on eth1 instead of ppp0 (as eth1 should contain all the packets for ppp0, I believe), but this does not yield lower latency, though I did note that it did limit the speed of the connection if I set the upstream and downstream values absurdly low.

I think what I need to do is somehow setup a script where traffic directed to 10.25.0.0 on eth1 is somehow counted against the bandwidth specified for ppp0, but I'm really not sure. Could someone offer some advice?

Thanks.

I believe this is due to the fact that as outbound traffic is occurring on both interfaces, tc does not worry about queues etc, as it does not look as though ppp0 is being maxed out (ppp0 would only be using roughly half of 1.2mbit), when the ADSL link itself is being maxed out.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Try using IMQ, from www.linuximq.net
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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