VMware Explore happening NOW!

What NICs Do I Have? – esxcfg-nics – VCDX Prep

As a plethora of my last posts suggest, I am spinning up study towards my VCDX. My first stop on that journey will be with the Enterprise Admin exam. Along the way I hope to share bits that I learn, review, and otherwise enjoy about the process. Today that is figuring out all manner of information about the NICs or network cards installed in the ESX host, and how to manipulate them. Let’s get started:

Question: What NICs?

Answer: esxcfg-nics –l

Example:

[root@ProfessionalVMware root]# esxcfg-nics -l
Name    PCI      Driver      Link Speed    Duplex MTU    Description                  
vmnic0  02:00.00 e1000       Up   1000Mbps Full   1500   Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic1  02:02.00 e1000       Up   1000Mbps Full   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic2  02:03.00 e1000       Up   1000Mbps Full   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

If you excuse the wrapped console output for a moment, you will see that there are three interfaces, vmnic0 –2. You’ll also notice how the PCI ordering is done, and that these particular NICs use the Intel e1000 driver (it is in a VM after all).

Question: How do I change the duplex/speed?

Answer: Using esxcfg-nics –s 10/100/1000 –d “full/half” vmnic#

Example:

[root@ProfessionalVMware root]# esxcfg-nics -d half -s 10 vmnic1
[root@ProfessionalVMware root]# esxcfg-nics -l
Name    PCI      Driver      Link Speed    Duplex MTU    Description                  
vmnic0  02:00.00 e1000       Up   1000Mbps Full   1500   Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic1  02:02.00 e1000       Up   10Mbps   Half   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic2  02:03.00 e1000       Up   1000Mbps Full   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

What you see above is that I changed the speed and duplex of vmnic1 to 10 half. I also made it bold! These settings are rather cruel, but every now and again a good BOFH has to do what a good BOFH has to do.

Question: I preformed the above speed and duplex changes on the accounting groups box… now how do I fix it?

Answer: A good, pleasantly worded apology, and the following: esxcfg-nics –a vmnic#

Example:

[root@ProfessionalVMware root]# esxcfg-nics -a vmnic1
[root@ProfessionalVMware root]# esxcfg-nics -l
Name    PCI      Driver      Link Speed    Duplex MTU    Description                  
vmnic0  02:00.00 e1000       Up   1000Mbps Full   1500   Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic1  02:02.00 e1000       Up   10Mbps   Half   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic2  02:03.00 e1000       Up   1000Mbps Full   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
[root@ProfessionalVMware root]#

You’ll notice the speed/duplex did not change. You may have to let this sit for a few seconds (or as long as it took me to write the last sentence), before it corrects itself. Here it is all corrected:

[root@ProfessionalVMware root]# esxcfg-nics -l
Name    PCI      Driver      Link Speed    Duplex MTU    Description                  
vmnic0  02:00.00 e1000       Up   1000Mbps Full   1500   Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic1  02:02.00 e1000       Up   1000Mbps Full   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
vmnic2  02:03.00 e1000       Up   1000Mbps Full   200    Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

As always, if you have questions or comments, drop a line in the comments.

2 thoughts on “What NICs Do I Have? – esxcfg-nics – VCDX Prep

  • I am mapping the wiring on a remote system. We have vmware 4.0 using 8 DL385 G5 ESX servers.
    I am shutting down Cisco switchports and using the esxcfg-nics -l command to see which ESX server interfaces go Link Down. This works fine on some servers but on others the interfaces never show Down. I even see the red “X” appear on the Physical Adapter icon in the vSphere Client networking config page but the interface still shows as Up.

Comments are closed.