Views:
If a network connectivity problem occurs on your virtual machine, check whether the MAC address assigned to your NIC card changes.
Sometimes the MAC address automatically assigned to a virtual machine changes dynamically. However, the MAC address recorded either in the interface configuration files or in the udev persistent network rule files does not change. As a result, the NIC card might be unavailable.
Trend Micro recommends that you use a static MAC address. If your MAC address changes, do the following to make sure your NIC card works properly:

Procedure

  1. Remove the udev rule file using the following command:
    rm -rf /etc/udev/rules.d/70-persistent-net.rules
  2. Remove the following lines from the /etc/sysconfig/network-scripts/ifcfg-eth<X> file:
    HWADDR=<MAC>
    UUID=<UUID>
    Note
    Note
    The interface configuration files are named /etc/sysconfig/network-scripts/ifcfg-eth<X>, where <X> is a unique number corresponding to a specific card.
  3. In the /lib/udev/rules.d/75-persistent-net-generator.rules file, find the line that contains the following information:
    ATTR{addr_assign_type}=="0"
  4. Add the following information before the line you found:
    # ignore VMWare virtual interfaces
    ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end"
    # ignore Hyper-V virtual interfaces
    ENV{MATCHADDR}=="00:15:5d:*", GOTO="persistent_net_generator_end"
  5. Restart your virtual machine to verify your network connectivity.