Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Rep:
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.
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 ?????
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.