All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] multigateway routing with adsl and dynamic ip
Date: Wed, 31 Oct 2007 16:34:37 +0000	[thread overview]
Message-ID: <4728AE9D.2090904@riverviewtech.net> (raw)
In-Reply-To: <658869.14038.qm@web32513.mail.mud.yahoo.com>

On 10/31/07 06:18, sonu chouhan wrote:
> i am not so much expert in linux and don't have a proper knowledge of 
> script writing, i am showing my problem again in detail below.

Eh, sounds like a good time to learn something with the help of others.  ;)

> i am using 4 adsl lines of an same isp, my adsl modem is working as a 
> nat router so i can get static private ip on my linux multigateway 
> router, all is working fine but my adsl router's wan port hang 
> sometime in 4 to 5 days, and my linux router don't find that one line 
> is down bcoz gateway is still up (i.e. adsl modem's lan port is 
> working). i have try many different modem of different make but 
> problem is same and when i use adsl modem as a bridge, there is no 
> problem in modem, so i have desided to change my adsl modem in bridge 
> mode, but my isp only provide dynamic ip and also getting many 
> problem which i am showing you below with my rules which is working 
> fine

<snip>

> so plz help me out that how can i make a script, and i don't want to 
> run any script manuly bcoz ip does change in every few hours

I will say that based on what I know and have experienced, you are 
biting off more than you realize.  First there is the fact that with 
your modems in bridging mode you will have multiple IPs from the same 
provider, probably all on the same subnet and thus all having the same 
upstream gateway, which Linux can not (directly) use like you are 
wanting to.  If your modems are not bridging but rather routing Linux 
will indeed not detect that the modem acting as a router has a defunct 
out bound connection because it can communicate with the router its self.

Based on my experience, I think you will be better off having some 
system handle the routing for each modem.  I don't care if you have the 
modems act as a router, or bridge them and put a router behind them, or 
bridge them and do some VERY fancy stuff with Linux.  How ever you do 
it, I'd suggest that you use a router that is capable of informing the 
other router(s), say your Linux box, when it's ADSL connection is down 
and as such to not use said router.  Usually this is done with routing 
protocols.

With these multiple (physical or virtual) routers Linux will see 
different IP addresses for them and as such be able to use them as 
'nexthop' gateways thus be able to use them for load balancing / equal 
cost multi-path routing.  Even if all the modems and your Linux box 
share one common small subnet, the fact that the routers have different 
IPs make them something that Linux can work with.

(Granted you could do some dastardly things with bridging and the likes 
so that Linux thinks that it really does have multiple routers one one 
subnet when it really does not, but I think that is more than a bit 
beyond what you are asking.  For now avoid doing this.)

The reason that Linux is trying to use the modems (acting as a router) 
is because it is not aware that the modem (acting as a router) has a bad 
connection.  Linux's "Dead Gateway Detection" algorithms detect when 
they can not reach the immediate upstream gateway on the MAC layer (2). 
  Thus if Linux can talk to the modem (acting as a router) at all, say 
ping it, ARP it, what ever to it, Linux believes the router (a.k.a. 
gateway) is very much a live and thus available for use.

(Granted you may be able to do something with ICMP redirects to 
encourage the Linux box to use a different router, but this is so far 
out of the norm I will not even speculate on the viability.  For now 
avoid doing this.)

> thanks in advance.

Does this at least help you know what you are up against?



Grant. . . .
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

      parent reply	other threads:[~2007-10-31 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 12:44 [LARTC] multigateway routing with adsl and dynamic ip sonu chouhan
2007-10-29 13:15 ` Ben Scott
2007-10-29 22:17 ` Grant Taylor
2007-10-31 11:18 ` sonu chouhan
2007-10-31 16:34 ` Grant Taylor [this message]

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=4728AE9D.2090904@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --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.