All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Multiple Uplinks with the same gateway ip?!
@ 2003-04-03 19:18 Michael Schoen
  2003-04-03 23:13 ` Julian Anastasov
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Schoen @ 2003-04-03 19:18 UTC (permalink / raw)
  To: lartc

Hi folks,

i spent my whole day trying to set up my linux router using load
balancing with multiple uplinks. I mainly focused on the nano howto, but
somewhere I have a big mistake within my head.

Basically the load-balancing is working, but not on a per-connection
basis - just on a per packet basis. Practically this is not usable of
course <g>

But as far as I understood it should work.. 

Assumptions:
(i)   Using kernel v2.4.19 with julian patches.. 
(ii)  The Remote Gateway has the same IP for both dial-up links
(iii) Using DSL Dial-Up Links (ppp0,ppp1)
(iv)  Gateway IP: 217.5.98.12
(v)   Internal Networks 192.168.0.0/24, 192.168.1.0/24


What I did:
(1) Masquerading
====================================
=iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -o ppp0 -j MASQ
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -o ppp1 -j MASQ
iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -d 0/0 -o ppp0 -j MASQ
iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -d 0/0 -o ppp1 -j MASQ

(2) Firewalling+Connection Tracking
====================================
=I use a quite complex fw-script including connection tracking that works
for years within in a single-uplink enviroment. 
[I also tried the simple setup from the nano-howto.. Also no per
connection load balancing!]

(3) Routing
====================================
=Due to the fact, I have the same gateway, I used the iif parameter for
policy routing -> is that the problem??

ip rule add prio 50 table main
[main table has just routes to 192.168.0.0/24 and 192.168.0.1/24, 
no default route]

ip rule add prio 201 dev ppp0 table 201
ip route add default via 217.5.98.12 dev ppp0 proto static table 201
ip route append prohibit default table 201 metric 1 proto static

ip rule add prio 202 dev ppp1 table 202
ip route add default via 217.5.98.12 dev ppp1 proto static table 202
ip route append prohibit default table 202 metric 1 proto static

ip rule add prio 222 table 222
ip route add default table 222 proto static \
		nexthop via 217.5.98.12 dev ppp0 weight 1\
		nexthop 217.5.98.12 dev ppp1 weight 1


Come on guys, that´s not impossible, is it? 


  .\\ichael


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] Multiple Uplinks with the same gateway ip?!
  2003-04-03 19:18 [LARTC] Multiple Uplinks with the same gateway ip?! Michael Schoen
@ 2003-04-03 23:13 ` Julian Anastasov
  0 siblings, 0 replies; 2+ messages in thread
From: Julian Anastasov @ 2003-04-03 23:13 UTC (permalink / raw)
  To: lartc


	Hello,

On Thu, 3 Apr 2003, Michael Schoen wrote:

> Due to the fact, I have the same gateway, I used the iif parameter for
> policy routing -> is that the problem??

	Try without using iif, just "dev pppXXX", without "via GWIP",
i.e. check what happens when using only "nexthop dev pppX"

	This command should return error, missing "via" before GWIP:

> ip route add default table 222 proto static \
> 		nexthop via 217.5.98.12 dev ppp0 weight 1\
> 		nexthop 217.5.98.12 dev ppp1 weight 1

Regards

--
Julian Anastasov <ja@ssi.bg>

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2003-04-03 23:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03 19:18 [LARTC] Multiple Uplinks with the same gateway ip?! Michael Schoen
2003-04-03 23:13 ` Julian Anastasov

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.