Will this work, or have I been around too much magic smoke???

Linux Advanced Routing and Traffic Control

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

 



Will this (in theory) work, or have I been around too much magic smoke that has escaped from fried equipment???

I have a system with two different internet connections. One connection is a WISP via an external bridging radio (ethernet to proprietary wireless back haul). The other connection is PPPoE ADSL via the local phone company.

(I think) I am wanting to use equal cost multi path routing to try to utilize both of these connections. After reading some other information I'm not entirely sure that I do want to use ECMP routing. However, this is out side of this discussion.

To utilize ECMP routing, you need two or more static upstream gateways. The problem is that one of my upstream gateways is dynamic via PPPoE. Thus I do not have two static default routes to add via the "ip route ... nexthop ..." command.

So, my proposed theoretical solution. (At least so far it has sounded good in my head.) Use socat (http://www.dest-unreach.org/socat/)to create a pair of virtual TUN interfaces that are connected with each other. With these two additional virtual TUN interfaces, I *THINK* I can split the routing in to multiple tables. The main routing table would contain lo, eth0 (WISP), tun0, and eth2 (internal LAN). While the virtualRouter routing table would contain tun1 and eth1 (ADSL). If I use ip rule(s) to determine which routing table to use, I think I can get the system to virtually act like two different routers. The hope is that I can put a common subnet on tun0 and tun1 that exists in both routing tables, but with only one interface local to each routing table. Thus each routing table will (hopefully) think that it has to go across the virtual point to point interface to reach the other end of / IP on the subnet.

*IF*, and this is a big if, I can get this to work like I've tried to explain, I think I can have the virtual (non default / main) router do nothing but translate the PPPoE to raw IP thus presenting an additional upstream static IP to the main system, thus allowing the main system to see two static upstream gateways.

Ultimately I see the routing tables as such:

main routing table(s):
  lo:  127.0.0.1/8
eth0:  A.B.C.D/24       (WISP)
eth2:  192.168.0.254/24 (LAN)
tun0:  192.168.1.253/24 (virtual point-to-point)

virtualRouter routing table(s):
  lo:  127.0.0.1/8
eth1:                   (PPPoE ADSL)
tun1:  192.168.1.254/24 (virtual point-to-point)
ppp0:  M.N.O.P/24       (ADSL ISP)

Some packet flow might help make it easier to understand. Traffic flowing from the LAN out through the main system out through the PPPoE would pass through the system as such:

1)  In the eth2 LAN interface out the tun0 virtual interface.
2)**In the tun0 virtual interface out tun1 virtual interface.**
3)  In the tun1 interface out the ppp0 interface.
4)  In the ppp0 interface out the eth0 (ADSL) interface.

Returning traffic would take this path:

1)  In the eth0 (ADSL) interface out the ppp0 interface.
2)  In the ppp0 interface out the tun1 interface.
3)**In the tun1 interface out the tun0 interface.**
4)  In the tun0 interface out the eth2 (LAN) interface.

Steps 2 and 3 respectively (*ed lines) are where the traffic would go from one routing table to the other.

So, now that I have tried to explain what I'm wanting to do, and probably thoroughly made a mess of it, do you think that at least in theory this is possible?



Grant. . . .
_______________________________________________
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