Skip to contentSkip to conversation

failover routing

LARTC Jandre Olivier 5 participants 6 messages Feb 1, 2006 – Feb 7, 2006

lore
Share & tools
lore
#0 lore raw

Hi Guys,

I would just like to have advice and pointers of the best way would be, Someting like BGP or OSPF?

I have 2 internet connections at diffrent locations. let say connection A and B

1.) router A has a fast internet connection and a seperate interface for clients using /lan/pppoe/ipsec etc and another ethernet interface going to router B

2.) router B has similiar setup as router A and also a seperate ether interface for clients and one going to router A

3.) all clients gets masqueraded as there is limited amount of internet routable ips

Now my first thought was to write some perl/bash scripts to just ping your internet gateway address of Router A and if its down, just change your default route to router B and everyone and vice versa and u can still get access.
This way for me is not very clean though as Im the one writing the scripts as something like zebra might do this perfectly? just a basic idea of what my setup is. What would be my best way of doing this.?

Signature · 10 lines
/*---------------------------------------------------------------------*/
                         __   _
             ---------- / /  (_)__  __ ____  __  ---------
               ------- / /__/ / _ \/ // /\ \/ / --------
                 ---- /____/_/_//_/\_,_/ /_/\_\ ------
                    [email protected]
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw

Your script could have the backup router take on the IP Address of the primary after it loses its heartbeat. You'll run into a problem with ARP caches. I saw some code floating around earlier that allowed one box to listen to the MAC address of another and respond to its ARP requests. You would need to incorporate something like this in any solution.

And this all assumes routers A and B are in parallel; all clients and both routers are on the same LAN. So you have a separate NIC between routers A and B for heartbeat. Each router has a NIC on the LAN side, and each has a NIC connecting to the Internet.

- Greg Scott

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jandre Olivier
Sent: Wednesday, February 01, 2006 5:52 AM
To: [email protected]
Subject: [LARTC] failover routing

Hi Guys,

I would just like to have advice and pointers of the best way would be, Someting like BGP or OSPF?

I have 2 internet connections at diffrent locations. let say connection A and B

1.) router A has a fast internet connection and a seperate interface for clients using /lan/pppoe/ipsec etc and another ethernet interface going to router B

2.) router B has similiar setup as router A and also a seperate ether interface for clients and one going to router A

3.) all clients gets masqueraded as there is limited amount of internet routable ips

Now my first thought was to write some perl/bash scripts to just ping your internet gateway address of Router A and if its down, just change your default route to router B and everyone and vice versa and u can still get access.
This way for me is not very clean though as Im the one writing the scripts as something like zebra might do this perfectly? just a basic idea of what my setup is. What would be my best way of doing this.?

-- /*---------------------------------------------------------------------* /

                         __   _
             ---------- / /  (_)__  __ ____  __  ---------
               ------- / /__/ / _ \/ // /\ \/ / --------
                 ---- /____/_/_//_/\_,_/ /_/\_\ ------
                    [email protected]

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Jandre Olivier
Quoted 6 lines · Greg Scott

Your script could have the backup router take on the IP Address of the primary after it loses its heartbeat. You'll run into a problem with ARP caches. I saw some code floating around earlier that allowed one box to listen to the MAC address of another and respond to its ARP requests. You would need to incorporate something like this in any solution.

Heartbeat (http://www.linux-ha.org/) does a gratuitous ARP (sends an ARP-reply broadcast) when it takes over the ip of the other host so the clients _should_ know the new MAC address belonging to the router.

_sh_

Quoted 50 lines

And this all assumes routers A and B are in parallel; all clients and both routers are on the same LAN. So you have a separate NIC between routers A and B for heartbeat. Each router has a NIC on the LAN side, and each has a NIC connecting to the Internet.

- Greg Scott

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jandre Olivier
Sent: Wednesday, February 01, 2006 5:52 AM
To: [email protected]
Subject: [LARTC] failover routing

Hi Guys,

I would just like to have advice and pointers of the best way would be, Someting like BGP or OSPF?

I have 2 internet connections at diffrent locations. let say connection A and B

1.) router A has a fast internet connection and a seperate interface for clients using /lan/pppoe/ipsec etc and another ethernet interface going to router B

2.) router B has similiar setup as router A and also a seperate ether interface for clients and one going to router A

3.) all clients gets masqueraded as there is limited amount of internet routable ips

Now my first thought was to write some perl/bash scripts to just ping your internet gateway address of Router A and if its down, just change your default route to router B and everyone and vice versa and u can still get access.
This way for me is not very clean though as Im the one writing the scripts as something like zebra might do this perfectly? just a basic idea of what my setup is. What would be my best way of doing this.?

-- /*---------------------------------------------------------------------* /

                         __   _
             ---------- / /  (_)__  __ ____  __  ---------
               ------- / /__/ / _ \/ // /\ \/ / --------
                 ---- /____/_/_//_/\_,_/ /_/\_\ ------
                    [email protected]
Quoted 8 lines

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#3 lore raw
In reply to Jandre Olivier

Hi, our network has a hand full of 2k servers that use silent rip. We use 2 Linux gateways with separate isp's.
Each gateway does a ' default-originate' to advertise its default route in ripv2 (with on having a different metric).
The main gateway has a ping script written in shell that will ping the gateway, determine if its up or down; With either result it checks its history of the last 3 intervals, and will only stop rip if or start rip if there is/was 3 concurrent ups or downs. I have been running this for 2 years with no problems.

I hope this helps

#4 lore raw
In reply to Jandre Olivier

sounds good, do your run ripv2 with zebra or quagga?, your idea sounds exactly what I have in mind. Mind explaining a bit more technical and sharing some usefull bits in your config?

Thanks

Sew

Quoted 11 lines · comp.techs

Hi, our network has a hand full of 2k servers that use silent rip. We use
2 Linux gateways with separate isp's.
Each gateway does a ' default-originate' to advertise its default route in ripv2 (with on having a different metric).
The main gateway has a ping script written in shell that will ping the gateway, determine if its up or down; With either result it checks its history of the last 3 intervals, and will only stop rip if or start rip if there is/was 3 concurrent ups or downs.
I have been running this for 2 years with no problems.

Quoted 10 lines

I hope this helps

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#5 lore raw
In reply to Jandre Olivier

Hi,

yes we run ripv2 and both quagga and zebra.

The script on the primary gateway just pings the nexthop. The return value is formated.
and stored in a log file.
Next the script checks the last three values in the log, if current value 100 (down) or 0 (up) matches the last three values in the log file determines the outcome of either stopping rip or starting it.

For example: logfile values 100 100 100 current value 100 --this would stop ripd
In order for ripd to start we would need : 0 0 0 in the logfile and a current value 0, this would then start ripd

! this is what is in my secondary gateway ripd.conf router rip
default-information originate
offset-list 1 out 4 eth0
network eth0

access-list 1 permit 0.0.0.0

!this is what is in my primary gateway ripd.conf
router rip
default-information originate
network eth0

Jason
________________________________

From: the sew [mailto:[email protected]]
Sent: Tue 2/7/2006 1:58 PM
To: comp.techs
Cc: [email protected]
Subject: Re: [LARTC] failover routing

sounds good, do your run ripv2 with zebra or quagga?, your idea sounds exactly what I have in mind. Mind explaining a bit more technical and sharing some usefull bits in your config?

Thanks

Sew

On 2/7/06, comp.techs <[email protected]> wrote:

Hi, our network has a hand full of 2k servers that use silent rip. We use 2 Linux gateways with separate isp's.
Each gateway does a ' default-originate' to advertise its default route in ripv2 (with on having a different metric).
The main gateway has a ping script written in shell that will ping the gateway, determine if its up or down; With either result it checks its history of the last 3 intervals, and will only stop rip if or start rip if there is/was 3 concurrent ups or downs. I have been running this for 2 years with no problems.

I hope this helps

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc