Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have to set up a scheme where I have 4 different ISPs, I want to have a device or method where if one line fails the other would immediately takes its place so internet service is always available.
It's not something I've tried but it looks to me like you might get some ideas from http://www.linuxvirtualserver.org/ (dunno how this would work for routing) and http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/index.html. Infact why do you need to have a 'fail and take over' method? You can just have all 4 links to one router up all the time, if you loose one then traffic will just keep going out the other three. You might want to give priority to some routes via some links but it should be pretty self managing.
You definetely need to do some advanced routing studiying, and its very easy one you figure it out
btw you need to use ip route2
here is a quick example for you
ip ro add default scope global nexthop via 111.222.111.221 dev ppp0 weight 1 nexthop via 111.222.111.222 dev ppp1 weight 1 ...
(this is for spliting internet access) there is lots more for play
good luck
I'm working on a similar project, but with only two ISP's. I have a cable modem and an ADSL modem. With the help of this document ( http://www.ssi.bg/~ja/nano.txt ) I have been able to load balance my connections over both lines, but I'm still struggling to find out how to get the 'dead gateway detection' part functioning... hope this link helps you on your way.
well, what happens now if I pull out one of the cables: the routing systems keeps on sending packets to that interface, even if they don't reach their destination.
Only if I disable the interface with "ip link set eth1 down" then the packets will go exclusively over the other (still functioning) line.
But if I set the link up oncemore with "ip link set eth1 up" then the routing system still lists the connection as dead.
if I list the routes in the multipath table it says:
root@linuxrouter:~# ip route list table 222
default proto static
nexthop via 10.0.0.138 dev eth1 weigth 1 dead
nexthop via 192.168.1.1 dev eth2 weight 1
and all traffic goes out via eth2. I don't know how to remove the 'dead' flag from the route. (Technically, I don't even know if where the flag sticks; on the route, the ip or the interface?)
So as long as both lines are functional, my router works like a charm, load balancing and all...but I haven't been able to get any kind of redundancy going.
If one line fails it should of course be marked dead or inactive, but I would also like to implement a check every minute or so that checks if it is back up and then to set it active again. I'm currently studying the subject.
I must also admit I'm very new to Linux. I've only been working on this router for about two weeks now...and I've only about a months experience with linux at all :-|
oh, perhaps for clarity I should explain the setup of my machine:
P133/112 mb, Slackware 8.1, upgraded to kernel 2.4.21 + patches described in nano.txt, 3 NICs
eth0, internal NIC: ip 67.67.67.67/24 (our intranet = 67.67.67.x)
eth1, external NIC: ip 213.84.x.y/32 -> gateway is 10.0.0.138
eth2, external NIC: DHCP from ISP (therefore behind another router to give it a static IP) ip 192.168.1.1/16 -> gateway is 192.168.1.1
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.