0

We are trying to setup a new server running CentOS at work. The server has the minimal install on it. The problem is there is no eth0. There is no ifcfg-eth0 in the /etc/sysconfig/network-scripts folder and I can only see 'lo' when I do the "nmcli d" command. The new CentOS server is running in VMWare.

I am wandering if I can add a new interface or whether I would have to reinstall it?

3
  • Does the VM actually have a network card?
    – mzhaase
    Sep 21, 2016 at 11:43
  • 2
    CentOS 7 does not use ethN as a naming convention any more. The devices may be named something like enN or even enp4s0f0 thanks to Predictable Network Interface Names. In VMware, the devices might even be named like eno16777736 or eno3359296 due to VMware's bad choices for BIOS device names. Sep 21, 2016 at 18:38
  • See my answer as to how to change these strange ethernet names. :-)
    – mdpc
    Sep 22, 2016 at 19:24

3 Answers 3

4

Starting with version 7, CentOS switched to systemd, which enumerates the network interfaces differently. Try running the command

ip link

to see what interfaces the system sees. It will likely be something similar to 'enp0s3'.

Stefan Lasiewski's comment after the original question gives more detail.

1
  • I think that you'll find that in Centos 7 ifconfig still works.
    – mdpc
    Sep 22, 2016 at 19:22
0

It may be that on your installation image only e1000 drivers are present, but you have added a vmxnet3 NIC to your VM. You need to install them afterwards (VMware guest tools image via Vsphere client for example), after that your NIC will show up.

1
  • The VM does have a NIC but I'm not sure what it is. I will try installing guest tools
    – wrichards0
    Sep 21, 2016 at 11:50
0

First, make sure you have an ethernet device created in the VM guest.

Make sure that in the VMWare guest options that the ethernet device has the check-mark that states that it should be ON at reboot.

If you do NOT have the guest extensions installed on the guest, then ensure that you configure the e1000 ethernet type. Once the guest extensions are installed then you configure use the vmxnet ethernet type.

You do realize that unless you make some changes to the grub configuration, on Centos 7 your ethernet port will NOT be named eth0. It will be some strange name based on the controller. If you want this type of ethernet enumeration, change your GRUB_CMDLINE_LINUX line in /etc/sysconfig/grub to look like something like this:

 GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet net.ifnames=0 biosdevname=0"

NOTE the last TWO parameters on the line which are the important ones, don't change other things just append the two parameters.

Then of course you have to remake the grub:

 grub-mkconfig -o /boot/grub/grub.cfg

Reboot and then the ethernet idents will be the old style eth# format. Also, you'll no doubt have to rename the startup scripting in /etc/sysconfig/network-scripts....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .