All of lore.kernel.org
 help / color / mirror / Atom feed
From: Terry Baume <bogaurd@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Traffic shaping on multiple interfaces
Date: Sun, 24 Jun 2007 10:58:12 +0000	[thread overview]
Message-ID: <467E4B74.5030809@gmail.com> (raw)

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@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

             reply	other threads:[~2007-06-24 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-24 10:58 Terry Baume [this message]
2007-06-24 11:58 ` [LARTC] Traffic shaping on multiple interfaces Alexandru Dragoi
2007-06-25  1:01 ` Andy Furniss
2007-07-06  0:32 ` Andy Furniss
2007-07-06  4:53 ` Terry Baume
2007-07-07 20:18 ` Andy Furniss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=467E4B74.5030809@gmail.com \
    --to=bogaurd@gmail.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.