All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Will this work?
@ 2005-11-24 13:46 Sorin Panca
  0 siblings, 0 replies; 2+ messages in thread
From: Sorin Panca @ 2005-11-24 13:46 UTC (permalink / raw)
  To: lartc

Hi people! Will this filter work?

# the traffic for MAN - match IP & MARK
$tc filter add dev $EXT1 parent 1: protocol ip prio 0 handle 0x1 fw u32
match ip src $IP flowid 1:B$hIP
$tc filter add dev $INT1 parent 1: protocol ip prio 0 handle 0x1 fw u32
match ip dst $IP flowid 1:B$hIP

# the traffic for Internet - match IP only (what is left after MAN filter)
$tc filter add dev $EXT1 parent 1: protocol ip prio 0 u32 match ip src
$IP flowid 1:C$hIP
$tc filter add dev $INT1 parent 1: protocol ip prio 0 u32 match ip dst
$IP flowid 1:C$hIP

# $hIP is the last byte of the IP address, written in hexa
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [LARTC] Will this work,
@ 2007-06-13  5:27 Grant Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Taylor @ 2007-06-13  5:27 UTC (permalink / raw)
  To: lartc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-13  5:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-24 13:46 [LARTC] Will this work? Sorin Panca
  -- strict thread matches above, loose matches on Subject: below --
2007-06-13  5:27 [LARTC] Will this work, Grant Taylor

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.