All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Schoen" <schoen@anduras.de>
To: lartc@vger.kernel.org
Subject: [LARTC] Multiple Uplinks with the same gateway ip?!
Date: Thu, 03 Apr 2003 19:18:57 +0000	[thread overview]
Message-ID: <marc-lartc-104939764406390@msgid-missing> (raw)

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/

             reply	other threads:[~2003-04-03 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-03 19:18 Michael Schoen [this message]
2003-04-03 23:13 ` [LARTC] Multiple Uplinks with the same gateway ip?! Julian Anastasov

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=marc-lartc-104939764406390@msgid-missing \
    --to=schoen@anduras.de \
    --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.