Results 1 to 5 of 5

Thread: Failover routing

  1. #1
    Join Date
    Jul 2010
    Posts
    43

    Failover routing

    I have two different ISPs and a linux box in the middle between my LAN and both ISPs.I don't have any idea about the advance networking operation into the linux operating environment .. What is the fine method to go for the routing failover ? I have tried two default routes with the separate metrics but it does not seem to feasible at that location ... Any idea about this

  2. #2
    Join Date
    Nov 2009
    Posts
    446

    Re: Failover routing

    You have to write one small shell script which ping a test IP and if it seems unreachable switch to the different gateway. Schedule such script to launch after every minute or so with the help of cron execution command .

    Code:
    #!/bin/bash
    GW1="192.168.10.254"
    GW2="192.168.55.254"
    TSTIP="192.71.220.10" # Any reliable Internet ip that responds to ping.
    CURGW=`/sbin/route -n |awk '/^0.0.0.0/ {print $2 }'`
    
    if ping -w2 -c3 $TESTIP >/dev/null 2>&1; then
      echo "Active ISP is Ok."
    else
      if [ "$CURGW" = "$GW1" ]; then
        NEWGW="$GW2"
      else
        NEWGW="$GW1"
      fi
      /sbin/route del default
      /sbin/route add default gw $NEWGW
    fi

  3. #3
    Dr. V Guest

    Re: Failover routing

    Yeah !!! that is looking fine and I am sure that it will be feasible for you . I also tested this script on my system ..This script needs both of the ISP's that are pre-configured and are not messing with your routing table when connected/disconnected, especially, PPP is know to be frequent unpolite when working with the routes.

    You mostly need some sort of test to find out if another location is functioning as well. Other concerns may be iptables/tc reloading and the components like that.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Failover routing

    You have to configure up the existing Linux system as a failover router to allow with a quick and automatic switchover from a non-functional Internet connection to one which is operational .
    To start the procedure , you will have to be with a computer systsem with any newly released GNU/Linux distro installation. You also require three network cards to attach within this Linux box. Two of the three network cards as eth0 and eth1, will interact with the Internet routers/gateways of your primary ISP (as from ISP1) and secondary ISP (as from ISP2). The another third network card, suggested as eth2, will connect to your internal LAN connection .

  5. #5
    Join Date
    Apr 2008
    Posts
    392

    Re: Failover routing

    Start by configuring up your network based on the configuration information informative to you. You can modify the settings from the X Window GUI with the help of Network utility. For doing, open the Network utility from Main Menu => System Settings => Network. This will browse up the network configuration window showing as the list of entire network cards established on your system. Double-click onto the network card you need to go for resetting this , choose the Statically Set IP Addresses option, and allocate the IP address along with the subnet mask. A Default Gateway Address section would be specified there; tou can leave the same blank for the time starting , as it can be specified later on from the terminal .

Similar Threads

  1. failover configuration
    By shankar in forum Networking & Security
    Replies: 2
    Last Post: 15-02-2011, 11:02 AM
  2. about failover option in windows using LAN
    By shankar in forum Networking & Security
    Replies: 2
    Last Post: 31-01-2011, 12:20 PM
  3. CAS Array Failover Issue
    By Its_Shaili in forum Windows Software
    Replies: 6
    Last Post: 15-08-2010, 06:42 AM
  4. Issue failover MS SQL cluster
    By defstar in forum Windows Software
    Replies: 3
    Last Post: 21-07-2009, 02:03 PM
  5. DHCP Failover !is it available to Windows 7?
    By Cody in forum Networking & Security
    Replies: 3
    Last Post: 14-02-2009, 10:21 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,449,669.96714 seconds with 17 queries