LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   power lost from cable modem, interface lost (https://www.linuxquestions.org/questions/linux-networking-3/power-lost-from-cable-modem-interface-lost-255286/)

a10392 11-15-2004 06:11 PM

power lost from cable modem, interface lost
 
Hi,

I have a cable modem connected to my usb port and using it as eth1, this works good.
The problem is when there is a power failure, the modem shutsdown because it s not connected to ups and when it is turned on i cant connect to the interface, if i do ifconfig i get only my ethernet eth0 interface. to gain access to eth1 i must do ifdown eth1, ifup eth1. This is a big problem because i want to have remote access to this computer using ssh, but if there is a power failure i cant connect to the computer.

There is a way to automatically recover eth1 from a power failure, automatically doing ifdown eth1, ifup eth1.

Thanks in advance.

NetAX 11-15-2004 07:00 PM

Go to /etc/sysconfig/network. If a file for eth1 does not exist create one using eth0 as a template(The file name usually starts with something lie ifcfg-eth1). That should be able to allow the system to start the interface during boot time or whenever you need to view ifconfig.

good luck

a10392 11-16-2004 08:23 AM

hi,

i'am using debian, i think in debian you mean /etc/network/interfaces.
This is my configuration.
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
auto eth0
iface eth0 inet static
address 192.168.0.60
netmask 255.255.255.0
network 192.168.1.0
hwaddress ether 00:0c:96:af:34:f3

auto eth1
iface eth1 inet dhcp
hwaddress ether 00:0c:8a:a2:c4:0f


The system works fine at boot time, the problem is if there is a power failure, the computer continue
connected (UPS) but the modem shutsdown. In this case when the power returns i cant connect remotely to the computer
because the interface is lost. I must have fisical access to the computer and reboot or execute ifdown eth1 ifup eth1.

There is a command or some other way to restart the interfaces automatically when they desapear from ifconfig ?????

Thanks you all

NetAX 11-16-2004 08:45 AM

"There is a command or some other way to restart the interfaces automatically when they desapear from ifconfig ?????"


I can suggest that you write a script that will ping the modem to see if it responds. If the modem doesn't respond then it will restart the interface.

There's a script http://www.linuxquestions.org/questi...hreadid=254977 here it pings servers but you can tailor it to ping the modem. All you have to do is add ifdown/ifup to one of those lines.

That's a temporary fix for now. Good luck!:)

a10392 11-16-2004 09:01 AM

thanks,

that should work for now

regards

MM


All times are GMT -5. The time now is 07:57 AM.