LinuxQuestions.org
Visit Jeremy's Blog.
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 08-17-2002, 07:31 PM   #1
tola
LQ Newbie
 
Registered: Aug 2002
Posts: 1

Rep: Reputation: 0
Question 2 ether cards auto-routering


Hi,
I'm new to this board.
My question is,
I have 2 ether cards on my Linux machine as server.
If #1 crashed for some reason, is there any idea to do some coding in the program to let #2 start to take over the job of #1
automaticly?
I mean #2 card is working as a kind of backup.
 
Old 08-17-2002, 11:00 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
if you have dhcp setup as the protocol for each interface, and the isp accepts any mac address, and ifup, and ifdown are setup to work with your isp.

two files, there's a lot of ways to do this. but what the heck

start one of them from rc.local ( the one that's up at boot )

/usr/bin/ifupeth0 &

-----------------------------------------------------------

#!/bin/sh
# /usr/bin/ifupeth0
if ! ping -i 30 yourgateway.com; then
ifdown eth0
ifup eth1
sleep 30
fi
/usr/bin/ifupeth1 &

----------------------------------------------------------

#!/bin/sh
# /usr/bin/ifupeth1
if ! ping -i 30 yourgate.com; then
ifdown eth1
ifup eth0
sleep 30
fi
/usr/bin/ifupeth0 &

-----------------------------------------------------------
99.99999999 percent of the time I bet the problem will not be your card. I have never seen one go out.

Last edited by DavidPhillips; 08-17-2002 at 11:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
USB ethernet and embedded ether bschmidt Linux - Networking 0 08-18-2004 12:20 AM
Boot parameter - ether= Ironica Linux - Networking 0 06-02-2004 02:25 AM
cable modem / network cards + auto neg. dunkyb Linux - Hardware 3 04-09-2003 05:27 AM
how RH7.3 auto find and loads cards (FC specifically) Nitemare Linux - Hardware 0 02-17-2003 12:00 AM
Intel Ether Express PRO+ Driver jbrinkma Linux - Hardware 1 09-02-2002 04:28 AM

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration