esxi command-line networking

no more ifconfig…

i kind of like how vmware is unifying everything under the esxcli umbrella.
esxcli network
esxcli network vswitch standard list = lists standard vswitch details
esxcli network vswitch standard remove -v vSwitch0 = remove specified vswitch
esxcli network vswitch dvs vmware list = lists dvswitches
esxcli network vswitch standard uplink add -u vmnic4 -v vSwitch0 = adds specified uplink to vswitch

esxcfg-vswitch -Q vmnic5 -V 277 dvSwitch1 = removes specified interface from dvswitch
^one command that evidently hasn’t transitioned to esxcli yet. the 277 represents the dvport ID

esxcli network ip interface list = lists vmkernel interfaces
esxcli network ip interface remove -i vmk0 = remove specified vmkernel interface

esxcli network ip interface ipv4 get = list ipv4 settings
esxcli network ip interface ipv4 set -i vmk0 -I 10.0.0.1 -N 255.255.255.0 -t static = set IP address for specified interface

esxcli network ip route ipv4 add -g 10.0.0.254 -n default = sets default ipv4 gateway

esxcli network nic list = list of nics and their status
esxcli network nic up -n vmnic2 = bring up specified interface
esxcli network nic down -n vmnic1 = bring down specified interface

esxcli iscsi adapter list = lists iscsi adapters

esxcli network ip dns server list = lists currently used DNS servers
esxcli network ip dns server add –server=10.0.0.3 = add additional DNS server (can be used to add more than 2 DNS servers)
source: https://communities.vmware.com/thread/462429

according to the following article, all previous commands will eventually be deprecated and esxcli will be used for all functions:
http://blogs.vmware.com/vsphere/2011/07/esxi-50-command-line-part-1-introduction-to-the-new-esxcli.html

This entry was written by resinblade , posted on Tuesday October 01 2013at 05:10 pm , filed under IT . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

Comments are closed.