Howto… when network interface is missing

March 16, 2007

Sometimes, eth0 (or other devices) cannot be found or recognized after a reboot/NIC change. This is common after hardware replacement, or copying/modifying guest OS running on virtual machine (vmware, virtual PC). 

Symptom

When trying to bring up the network interfaces, the following message (or similar) occurs: 

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device

ifconfig displays the local loopback.

Problem 

The reason for this is a change in MAC address. Linux OS  recognition and configuration of an interface is assigned with the MAC address of this interface. If it changes while the OS is running (similar to hot-plug), OS will lose the information previously gathered for this device. This is more common in linux running on top of VMware and other vm, where guest OS is often suspended, then moved.

 Solution

After searching on web, I found two posts related to the problem. One is to get back the lost interface, the other is to generate a new interface for virtual machine.

For ubuntu, the MAC address of each interface is stored at /etc/iftab, editing this file with the correct MAC you learn from elsewhere, and restart the network will do the trick. For VMWare, the generated MAC address is stored in *.vmx file. Click here for the original discussion.

If you want to add a new interface for VM, follow the vmx file sample given in this post.

Entry Filed under: notes. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2007
M T W T F S S
« Dec   Sep »
 1234
567891011
12131415161718
19202122232425
262728293031  

Most Recent Posts