LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-23-2008, 05:44 PM   #1
jhelzunn
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Rep: Reputation: 0
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.
 
Old 04-23-2008, 05:52 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by jhelzunn View Post

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
 
Old 04-23-2008, 05:59 PM   #3
jhelzunn
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Original Poster
Rep: Reputation: 0
nope.i used acronis in cloning the HD.
 
Old 04-23-2008, 07:41 PM   #4
thveillon
Member
 
Registered: Dec 2007
Posts: 59

Rep: Reputation: 16
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.

Last edited by thveillon; 05-03-2008 at 06:31 AM.
 
Old 04-23-2008, 09:36 PM   #5
jhelzunn
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Original Poster
Rep: Reputation: 0
can you expound more on it. am just a newbie and i really dunno how to do it. thanks in advance.
 
Old 04-24-2008, 04:31 AM   #6
thveillon
Member
 
Registered: Dec 2007
Posts: 59

Rep: Reputation: 16
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 !

Last edited by thveillon; 04-24-2008 at 04:34 AM.
 
Old 05-02-2008, 11:56 AM   #7
jhelzunn
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Original Poster
Rep: Reputation: 0
a million thanks!

thank you very much thiev! you been a good help!
 
Old 05-03-2008, 06:32 AM   #8
thveillon
Member
 
Registered: Dec 2007
Posts: 59

Rep: Reputation: 16
Good it helped.
 
Old 02-15-2011, 08:32 AM   #9
smokedawg
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
Very great solution.. thanks a lot
 
Old 08-09-2017, 04:24 PM   #10
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
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.
 
  


Reply



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
: error fetching interface information: Device not found Beauford-2 Slackware 5 02-13-2008 09:28 AM
Fetching the distribution release information on AIX machine afrose_fathima AIX 3 05-16-2006 04:17 AM
HELP error fetching interface nkeever Linux - Newbie 1 05-09-2005 07:31 PM
Error fetching interface... ChangeOfPace Linux - Networking 10 05-05-2004 01:56 PM
error fetching interface information jw.pi Linux - Networking 2 06-22-2001 06:37 PM

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

All times are GMT -5. The time now is 07:58 PM.

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
Open Source Consulting | Domain Registration