1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

eth0 -> eth1

Discussion in 'Linux / Unix Discussion' started by popeye67, Feb 12, 2008.

  1. popeye67

    popeye67 Bit Poster

    After using mondoarchive to clone nagios server to another vm I found that my eth0 has changed to eth1. eth0 was non existant (ie ifup came with nothing). Took me couple of hours to get to the bottom of this. Debian (ubuntu as well) will rename your network interface if it detects MAC address change. Since VM will always come up with 'new' MAC addr, you'll need to edit the file ;

    /etc/udev/rules.d/z25_persistent-net-rules . File is ascii and self explanatory.

    Hope this will help someone to save some time.
  2. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    Thanks, Popeye. I guess from the operating system's point of view, if the MAC address has changed, it *must* mean that it's a different Ethernet interface. Good observation. :wink:
    Certifications: A+ and Network+
  3. sunn

    sunn Gigabyte Poster

    Good Find.
    I guess it's specific to some Linux boxes? You mentioned Debian & ubuntu, but I've never seen an issue on the FreeBSD or the other Linux distros in VM. I'll keep it in mind -- Thanks again...
  4. popeye67

    popeye67 Bit Poster

    Well MAC address doesn't need to change. You can define MAC address in VM (at least in ESX). But I don't know anyone who does it. So 2 options ; one ; change mac address in new vm to match the old one. Or follow the original post. As far as physical machines are concerned yes the MAC address will change with a new network card unless you do ;

    ifconfig eth0 down hw ether 00:00:00:00:00:01
    ifconfig eth0 up

Share This Page