LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2006, 09:49 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Question Two connections -one backup - one normal ??


Hi
Ive got two active connections...one is an always on connection "pppoe"...and the other one is a cable connection with a limited monthly download rate. Iam using the pppoe for browsing etc...but it is not very stable..so I need to use the cable connection when the pppoe connection is down. However, I do not need to balance the connection nor do I need to preserve the state from one package to another.
I was thinking about something simple...
1- cron job checking for ppp0 if it is down execute a custom script that clears the routing tables and dns and switches to cable..keep croning to check if ppp0 is up if so terminate cable connection clear dns and routing tables and use ppp0...this might be somehow naive...If there is a iptables implementation for this ...please any suggestions hints ....
In short, I just need to switch btw one connection and another with the priority to the "always on" pppoe connnection.
Thx
 
Old 02-09-2006, 04:16 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
i guess the trick will be finding a reliable means of testing whether the connection is really down (as opposed to not doing anything).

if you could to that you could use a while look (while to keep cheching it.

then when it's failed run the fail over script. obviously your script will need to monitor when it comes back up then run a fail back script.

you would need to write a new init script and call it an an appropriate run level.

it sounds complex but i think doable - IMHO reliably determining whether a connection is really down is harder that you might imagine....
 
Old 02-09-2006, 08:32 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
I had some problems with the "always on" pppoe connection ...however when it is down eth0 is down immediatly...Ive checked that in the syslog file..and ppp0 will be down too...the problem is that ppp0 might be up but there might be no connectivity for some reaoson...I mean a very low download rate .....I will try to implement it and if it works I will post it ....
 
Old 02-09-2006, 08:40 AM   #4
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
So if the connection is down...eth0 or ppp0...In my croned script i.e. within the while loop I keep executing ifconfig and then I grep,sed,head through it to check if there is eth0...and upon the results I act...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2000 MySQL connections, still "too many connections" newlinuxnewbie Linux - General 0 11-07-2005 01:03 PM
can I backup a root disk and boot from the new backup disk linuxbkp Linux - Enterprise 3 10-15-2004 06:42 PM
Is this normal? Daliz Linux - Newbie 2 02-10-2004 11:29 AM
Selective backup to CDRW, or other backup methods. trekk Linux - Software 1 11-03-2003 02:46 PM
backup and update the backup file doris Linux - General 4 08-24-2002 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration