Re: multigateway routing with adsl and dynamic ip

Linux Advanced Routing and Traffic Control

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

 



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@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