LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Gateway shift Script (https://www.linuxquestions.org/questions/linux-networking-3/gateway-shift-script-299891/)

neos 03-10-2005 01:55 AM

Gateway shift Script
 
Hi all
I need help.
I have 1 Linux box with 2 IPs bind on single interface.
suppose ips are 1.1.1.1 and 2.2.2.2
Default Gateway is 1.1.1.100
so if 1.1.1.100 gateway goes down i shift default gateway to 2.2.2.100
Now i need a script that sence that if gateway 1.1.1.100 down (not reply after 2 min then it will automatically shift to 2.2.2.100.

so plz help me out.
Is anyone have any idea how to do that.

THnaks In AdVance

pave 03-10-2005 04:11 AM

Linux Advanced Router gives you the option to create multiple routing tables. You need to compile it into your kernel (if it's not yet compiled). You can then create two routing tables and each will have different gateway. Multiple gateways are usually used to load-balance between both connections, but they can be used also in your case. Google a little and you will find appropriate script.


All times are GMT -5. The time now is 05:15 AM.