Jump to Navigation

270 - VMWare Network management

The command of network management is different from Linux.

1. ESXCLI

esxcli [dispatcher options] <namespace> [<namespace> ...] <cmd> [cmd options]

Namespaces is mentioned twice as namespaces can actually be nested and use a drill down approach.
Cmd options refers to the command that needs to be executed to this namespace, this could be like'get', 'list' or 'set'.

* SYSTEM

# esxcli system version get

# esxcli system hostname get

# esxcli system hostname set --fqdn=esxi5.mydomain.com

* DNS

# esxcli network ip dns server list

# esxcli network ip dns server add --server=192.168.17.30

# esxcli network ip dns search list

# esxcli network ip dns search add --domain=mydomain.com

* IP Address

# esxcli network ip connection list

# esxcli network ip interface ipv4 get

# esxcli network ip interface ipv4 set
--interface-name=vmk0 --ipv4=192.168.18.41 --netmask=255.255.255.0 --type=static

* NIC, VSWITCH

# esxcli network vswitch standard portgroup list

# esxcli network nic list

2. ESXCFG-ROUTE for gateway

Description: Sets or retrieves the default VMkernel gateway route
Syntax: esxcfg-route <options> [<network> [<netmask>] <gateway>]

<network> can be specified in 2 ways: as a single argument in
<network>/<mask> format or as a <network> <netmask> pair.
<gateway> is either an IP address or 'default'

# esxcfg-route -l
 
# esxcfg-route -a default 192.168.18.1

 

 

Cloud:


Main menu 2

Story | by Dr. Radut