vikrant wrote:
Marcin Giedz wrote:
Dnia środa, 4 stycznia 2006 12:16, vikrant napisał:
Marcin Giedz wrote:
Hello,
In my INtel Blade server I have two ethernet interfaces: eth0,
eth1. Now
only one is working, the another one is not configured. However I'd
like
to have something like dynamic routing: if one interfaces is down the
second one if
i am getting little confused when u say interface goes down please
explain .
OK - very spimle. Let's say that network cable is damage or someone
has disconnected cable from the card. If one cable is unplagged
(eth0) the second one (eth1) becames master.
what do u mean from interface does down whether interface card become
inactive or network cable get damage or ISP connection goes down please
clarify it .
up. If first returns up the second one goes down.
Does anyone know how can I do this?
Thx,
Marcin
Thanks
Vikrant
I am considering that both the interfaces are using as external
interface.
I don't know the right way to track the connectivity ,I think Routing
Protocol e.g BGP,RIP,IGP or OSPF are the solution for this kind of
problem.
But ,what i did to do this ,write a script that ping the ISP DNS and
set the status value (variable)according to packet loss % and then
take action according to the status value , ifdown eth0 -> ifup eth1
-> make changes to iptables rules , and vice-versa.
add the script in crontab so that it runs after a certain time period
and perform the checking.
I am just a beginner so please do not consider it as the final solution.
Please know me if u find the right ans to ur ques.
and sorry for bad english.
Thanks
Vikrant
If your problem is just limited to plugin or plugout of cable then u can
use ifplugd as Boryan yotov suggests but by this u can not check whether
ISP line in up or down.
link for ifplugd
http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/