[clug] A routing question

Christopher Zhang u4123459 at anu.edu.au
Wed Apr 18 13:54:49 GMT 2007


Hi list,

Say if the connections from subnet A to B are throttled down, but the  
connections from subnet A to C and from subnet B to C aren't. The way  
the connections are throttled is by applying rules on the default  
gateways of subnets A and B.

Is there a way to speed up the connections from subnet A to B?

The closest idea I can think of is to setup a gateway within subnet  
A, let's call it D. Setup a host in subnet C, let's call it E, and  
finally another gateway in subnet B, and call it F.

The idea is to route all traffic from subnet A to C, then bounce it  
off C to B. Since the connections from A to C and B to C are fast,  
this effectively increases speed from A to B. So instead of using the  
default gateways for subnet A and B, we can use our own new gateway  
D, then somehow pipe all traffic to E, and then from E pipe all  
traffic to our new gateway F in subnet B.

The reason this increases the speed from subnet A to B is that the  
connection is unthrottled from subnet A to C, and from subnet C to B.

Eventually this is like a man in the middle setup, in subnet A, tell  
all machines to use D as the default gateway. What D does is to  
forward to the traffic to E, D still uses the real default gateway  
for subnet A to do that however since this connection is to host E in  
an unaffected subnet, the connection is fast. Then E forwards  
whatever is forwarded to it to F, if we tell all computers to use F  
in subnet B, the traffic will reach any host fin subnet B, without  
any speed loss.

It is easy to setup D as a gateway and route traffic through it, but  
how can I tell D to route the traffic to E (in subnet C) and from E  
route all traffic to F (in subnet B)? I cannot tell D to use E as the  
default gateway since they are on different subnets. If I use  
iptables to forward the traffic, the packet will lose the original  
header which means the reverse won't come through.

Maybe a tunnel needs to be setup, but I have no idea how to do that,  
does anyone have better ideas?

Thanks

Chris

  
  


More information about the linux mailing list