ESX 3.5 – 5 critical vmware esx cli network commands

Posted on Updated on

I found this really cool article today… It’s not my work, but it is a great reference…

http://www.petri.co.il/5-critical-vmware-esx-cli-network-commands.htm

5 Critical VMware ESX CLI Network Troubleshooting Commands
by David Davis, vExpert, VCP, CCIE 9369 – December 23, 2008

Have you ever made a change to your VMware ESX Server Network configuration using the Virtual Infrastructure (VI) Client and then lost communications with the server? If you had to go to the ESX Service console to troubleshoot the virtual network configuration, would you know the commands to do it? In this article, you will learn the 5 most critical ESX CLI commands you need to know to troubleshoot networking issues.
#1) service network restart
The service X restart command is an excellent command that allows you to restart any service running on your ESX Server. In our case, we are using the network keyword to restart network services. This is the command you should run after making changes to your ESX networking configuration. You can also do network start or network stop. This brings down all network interfaces, then brings up the interfaces configured to start at boot.

#2) ifconfig
The second command is ifconfig. Similar to the Windows command, ipconfig, this command is used to view the status of all network interfaces on the system. However, it can do a lot more than just view an interface, it can reconfigure interfaces, bring them down, or back up. You can change the IP address of your interfaces with ifconfig.

#3) esxcfg-vswif
Next, we have the ESX command that allows you to view the status of or reconfigure the VMware Service console network interface. That SC network interface is called “vswif” and the first interface is always “vwsif0”. To view the status of it, you can use the -l (L for list)
#4) esxcfg-vswitch
The fourth command on the list is the esxcfg-vswitch command. This command is used to view the status of or reconfigure the VMware virtual switches (called vswitch). These vswitches are used to connect the physical NIC in the server (called vmnic) to the ESX port groups (such as the “Service Console” and the “VM Network” port groups). To view the status of your vswitches, you can use the -l (L for list) command, like this:

#5) esxcfg-nics
Lastly, we have the esxcfg-nics command. This command is used to view the status of or reconfigure the VMware Physical Network interface cards that are installed in the physical server. These physical NICs are called “vmnic” and they start with “vmnic0”. The vmnics are connected to vswitches to connect the physical network to the virtual networks.
To view the status of your vmnics, you can use the -l (L for list) command,
Summary
Believe me, there was a time that I was stuck at the ESX service console interface, trying to resolve a networking issues, and struggling to find the right commands to do it. I hope that you will save this URL or print this article to keep it handy the next time you are in a similar situation because that know that these 5 commands can help you get out of any VMware ESX Server networking configuration or troubleshooting issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s