LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   error fetching interface information: device not found (https://www.linuxquestions.org/questions/linux-networking-3/error-fetching-interface-information-device-not-found-637381/)

jhelzunn 04-23-2008 05:44 PM

error fetching interface information: device not found
 
i have two servers installed with debian.
server 1 is my asterisk server
server 2 is my vicidial server

eth0 is working with private IP address
eth1 is working with public IP address

i cloned both server so i will have a backup.
when i restored both servers for use
and i tried changing IP on both NIC using ifconfig

eth0:error fetching interface information: device not found
eth1:error fetching interface information: device not found

lo and behold!

eth0 became eth2
eth1 became eth3

both are configured but asterisk clients could not log
vicidal clients can though

how can i resolve this?

any help is depply appreciated.

jailbait 04-23-2008 05:52 PM

Quote:

Originally Posted by jhelzunn (Post 3130770)

i cloned both server so i will have a backup.
when i restored both servers for use

Did you do the cloning and restoring using the dd command?

--------------------
Steve Stites

jhelzunn 04-23-2008 05:59 PM

nope.i used acronis in cloning the HD.

thveillon 04-23-2008 07:41 PM

Udev is associating devices names with MAC address in /etc/udev/rules.d/**-persistent-net.rules file (** are random numbers). You can set new rules which should look like :

Code:

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="??:??:??:??:??:??", NAME="eth0"
where question marks after "ATTR{address}==" are the interface MAC address (shown by ifconfig).

You can then delete the old rules and reload network.

Hope it helps.

jhelzunn 04-23-2008 09:36 PM

can you expound more on it. am just a newbie and i really dunno how to do it. thanks in advance.

thveillon 04-24-2008 04:31 AM

Sorry, since you were talking about two servers I assumed i could go for the short version !

So network cards are managed by a helper program called "udev". Udev is great because it can managed dynamically the removal/addition of hardware, but it's attributing names to devices in it's own kind of way. For network cards names need to be consistent from one boot to the next, so udev is associating the conventional interface name (eth*) to it's unique MAC address (MAC address is build inside the device itself).

Those associations are stored in the folder /etc/udev/rules.d/ where you will find a "yx_persistent-net.rules" file ("yx" are random numbers, depends on your system).

The "rules" udev use to name the devices are of the form :

Code:

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"
(the xx:xx:xx... pattern will be replaced by a MAC address)

All you need to do is reading your actual network card MAC address with :

Code:

sudo /sbin/ifconfig -a
("-a" option lists even non configured devices) , it will look like "HWaddr 00:1d:20:55:cf:67", and write this MAC address in the udev rule corresponding to the conventional name that suites you (eth0 for instance). You can delete old rules, add new ones for other cards.

You will need root privileges to edit the "yx_persistent-net.rules" file.

Reboot when done (restarting the network should be enough though...)

Hope it's more understandable this time ! ;)

jhelzunn 05-02-2008 11:56 AM

a million thanks!
 
thank you very much thiev! you been a good help!

thveillon 05-03-2008 06:32 AM

Good it helped.

smokedawg 02-15-2011 08:32 AM

Very great solution.. thanks a lot

Alanbh 08-09-2017 04:24 PM

eth0; error fetching interface information
 
Had the same trouble after switching network cards on a original build 2.6.33 thinking i had a bad card. Checked /etc/udev/rules.d/ (my network rule file). The eth0 had been changed to eth5. Editing eth5 back to eth0 solved the problem.


All times are GMT -5. The time now is 10:39 AM.