VMWare

ESXi Commands – Network Commands

Hi all,
Moving forward, the next layer of commands that can be of great help when troubleshooting, will be network layer. This layer is very sensible (the others are too 😛 ) and should be tampered with very carefully.

As presented in the other guides from this series, to view a list of possible namespaces in the network component, please use:
esxcli network [ will return a list of all the system components that can be interogated ]

This command will return all the components, exactly as below:
Usage: esxcli network {cmd} [cmd options]
Available Namespaces:
firewall A set of commands for firewall related operations
ip Operations that can be performed on vmknics
nic Operations having to do with the configuration of Network Interface Card and getting and updating
the NIC settings.
port Commands to get information about a port
sriovnic Operations having to do with the configuration of SRIOV enabled Network Interface Card and getting
and updating the NIC settings.
vm A set of commands for VM related operations
vswitch Commands to list and manipulate Virtual Switches on an ESX host.
diag Operations pertaining to network diagnostics

Now let’s say we want to explore the firewall configuration. To do that, the next logical command that you need to think of, and type in, is:
esxcli network firewall [ will comeback with a usage syntax and available namespaces]

Right now, as a quick lab example, and get used to this kind of operations, let’s assume you want to check the current status of the firewall at ESXi level. Do this, use the following command:
esxcli network firewall get

This should return something like the below, as default (but the results may vary from one environment to another):
Default Action: DROP
Enabled: true
Loaded: true

You can now go back to the root namespace, and explore the others. This should be very helpful when gathering information for troubleshooting purposes.

Click on this link for ESXi Commands – Basic Commands
Click on this link for ESXi Commands – Hardware Commands
Click on this link for ESXi Commands – System Commands
Click on this link for ESXi Commands – VM Commands
Click on this link for ESXi Commands – Storage Commands

Tagged , , ,