As I was looking around in the command line interface (which is pretty new for me) I came around the esxcfg- command set. In particular the commands to manage the NIC’s (part 1) and the vSwitches (part 2) raised my interest. I decided to explore a bit further and write down how to do some standard actions. So here goes for NIC operations…
Listing all NIC’s
This commands gives you a nice list of all the available NIC’s and all their properties. Those properties include name, link, speed, duplex and description.
Setting a specific link speed and duplexity of a NIC
The thing I want to do here is set my ‘vmnic3’ (the name I got from my previous command) to a speed of 100Mbps and I want to set it to full duplex. The command to do this is:
esxcfg-nics -s 100 -d full vmnic3
The ‘-s’ parameter defines the speed. This parameter can hold the values 10, 100, 1000 and 10000 respectively defining the speed to 10Mbps, 100Mbps, 1000Mbps and 10000Mbps.
The ‘-d’ parameter defines the duplexity. This parameter can hold the value ‘full’ for full duplex and ‘half’ for half duplex.
Setting link speed and duplexity of a NIC to automatic detection
To set my ‘vmnic3’ back to automatic detection I use the following command:
esxcfg-nics -a vmnic3
The ‘-a’ parameter simply sets the link speed and duplexity of the NIC back to automatic.
I hope this was useful to someone. At least I got better understanding and a little reminder for myself how to do these things. In part 2 I will cover some standard networking tasks considering virtual switches using the command esxcfg-vswitch.