ESXi Command LinevSphere Guides

ESXi Commands Part-4 : Managing ESXi Networking using esxcli commands

In this series we will see on how you can easily get information using commands in ESXi & how you can manage the ESXi using esxcli command line. This is the fourth part where we will see some of the commands on how you can administer & manage the esxi networking using the esxcli. esxcli is the command line interface framework in vmware vsphere which provides modular architecture for the components “Namespace” running in VMkernel. esxcli is powerful command line interface which provides very helpful information. you don’t need to install any other software to run esxcli. esxcli can be directly run into the ESXi using Putty. Information you will find that can be very useful in the time of troubleshooting the esxi server issues.

In this post we will see on by using “esxcli network” how we can get & manage esxi networking . You may find very useful commands in this post which you will be using on daily basis using GUI from vsphere client but you can also do it using esxcli command line if you don’t have the vsphere client. Below is the list of things you can do to get & manage the esxi networking using esxcli. You will find some of the advanced management commands which should not be used if you don’t know about it properly.

Available Namespaces with esxcli network :

  • firewall : You will find here set of commands related to firewall operations on esxi.
  • ip : You can do manage the vmknic operations using this namespace such as dns, interface , ipsec etc.
  • nic : You can manage & update the Network Interface Card(NIC) information using this interface.
  • port : It will help you to find the information related to ports on the esxi.
  • sriovnic : You can do operations on SRIOV enabled network interface cards and get & update the nic settings.
  • vm : It will help you to do the operations related to virtual machines on ESXi.
  • vswitch :  It will help you to manage the virtual switch on esxi such as standard switch & distributed switch.
  • diag : It will help you to do some diagnostics on network.

This above are all the available Namespaces which you can use with esxcli network. some of the advanced namespaces which can only be used with the caution or with vmware support engineers.

There is an syntax of running the each command using the esxcli. In this post we will see on how we can use the command “esxcli network” to manage the networking of esxi.

Syntax of the command is as follows:

esxcli network {cmd} {cmd options}

esxcli network is the command which you can run directly into ESXi without any option. But to get into deeper you will have to use the Namespaces with the command.
Where first {cmd} will be the any of the namespace available above & after you can use the available namespaces or available commands w.r.t get the information.

We will only see the some of commonly used namespaces.

firewall Namespace :

 esxcli network firewall


Here you will get 1 namespace & 5 commands to do the firewall related operations.
ruleset : It will help you to list & update the firewall ruleset configuration.

get : Get the firewall status.
load : Load firewall module & rulesets configuration.
refresh : Load ruleset configuration for firewall.
set : Set firewall enabled status & default action.
unload : Allow unload firewall module.

ip Namespace :

 esxcli network ip


Here you will find 7 namespaces & 2 commands.
dns : Operations pertaining to DNS Server configuration.
interface : Operations pertaining to VMkernel network interfaces (vmknic).
ipsec : Operations on Internet Protocol security.
route : Operations pertaining to route configuration.
connection : List active tcpip connections.
neighbor : Operations can be performed on arp tables.
netstack : Operations such as creation, management & deletion of VMkernel Netstach Instances.

get : Get global IP settings.
set : Update global IP settings.

nic Namespace :

 esxcli network nic


Using nic namespace you can do multiple operations on Network Interface Cards on ESXi.

port Namespace :

 esxcli network port


Here you can use 2 namespaces.
filter : Commands to get port filter information.
stats : Commands to get port statistics.

vm Namespace :

 esxcli network vm


Here you can use 1 namespace & 1 command.
port : Command to list ports of a given VM.

list : List networking information for the VM’s that have active ports.

vswitch Namespace :

 esxcli network vswitch


Here you can use 2 namespace.
dvs : Commands to retrieve Distributed Virtual Switch Information.
standard : Commands to list & manipulate standard switch on ESXi host.

diag Namespace :

 esxcli network diag


Here you can use 1 command.
ping : Send ICMP echo requests to network hosts.


You can also try this esxcli namespaces & commands to manage the esxi about server’s in your environment.

Checkout our Posts on ESXi Commands Series:-

ESXi Commands Part-1 : Basic commands.

ESXi Commands Part-2: Finding Hardware information using esxcli

ESXi Commands Part-3 : Managing ESXi using esxcli commands

ESXi Commands Part-5 : Finding VM information using esxcli

ESXi Commands Part-6 : Managing Storage using esxcli

That’s it for Today Friends. I Hope you liked reading this post & If you find anything more to be added or removed feel free to write it in our comments. If you find it useful You are Feel free to share this on social media to help others & spread knowledge.
If you have any query on any thing you are free to write it in our comments section & we will make sure to provide you the better solution as soon as possible.

Join Our LinkedIn Group to get Updates & Discussions : Mastering VMware.
Checkout our Facebook Group for discussions & more.
You can also Like & Share our Facebook Page for Latest Updates.

Mayur Parmar

Hi I am Mayur Parmar. Independent Author & Founder of Mastering VMware. I am working in IT industry for more than 4 Years with knowledge of VMware , Microsoft Server's, Linux Server's.

Related Articles

One Comment

  1. Pingback: Tracy Glastrong

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button