> ## Content Index
> Fetch the complete content index at: https://george.bike/llms.txt
> Use this file to discover other available public pages before exploring further.

# CentOS 7 and VMWare ESXi Networking via CLI
- URL: https://george.bike/centos-7-and-vmware-esxi-networking-via-cli/
- Published: 2017-08-30T14:28:00.000Z
- Updated: 2017-08-30T14:28:00.000Z
- Author: George Carey
- Tags: #Import 2026-11-24 15:41

Easiest way to get your network up and running correctly and quickly:

1\. Make sure you configure your network with static IP address (if needed) when installing. Enter the IP address, network, gateway, etc.

2\. Let VMWare assign the MAC. Much easier than trying to manage it through udev or the config files.

Your network configuration file is in **/etc/sysconfig/network-scripts/** directory. You only need to touch the file for the specific adapter that is created (e.g. **ifcfg-ens192**).

If you add another adapter to the machine in VMWare use the following steps:

1\. I usually reboot to make sure it is properly detected by the OS.

2\. Do an **ifconfig -a** to see the new adapter name.

3\. Copy the **ifcfg-ens*nnn*** file to the new name, then edit the contents. Go over each item carefully. Make sure you change the **DEVICE** line to the new name. Change the **UUID** line. To get the UUID you can:

**nmcli -t --fields uuid,device con show**

4\. Reboot to make sure it all works, your adapter should be up and have the right IP address, etc. Use **ifconfig -a** to check it.

To add a static route:

Create a file in **/etc/sysconfig/network-scripts** called **route-ens192** (or whatever the adapter is).

Put the route parameters in there like this:

**10.0.0.0/8 via 10.182.3.1 dev ens192**

Reboot, then check **netstat -nr** to make sure you see the proper kernel route.

[Original post](https://george.bike/?p=73&more=1) blogged on [b2evolution](http://b2evolution.net/?ref=george.bike).