#networking

esxcli network nic list (retrieves all NIC information)
esxcli network nic get -n vmnic0 (get full details on a specific NIC)

esxcli network ip route ipv4 add –gateway 10.x.x.x –network 10.x.x.x/25
esxcli network ip route ipv4 list

NIC UP / DOWN
esxcli network nic down -n vmnic1
esxcli network nic up -n vmnic1

NETSTAT
esxcli network ip connection list

#productlocker
esxcli system settings advanced list -o /UserVars/ProductLockerLocation

#NUMA info on ESXi host
esxcli hardware memory get | grep NUMA

#SNMP
esxcli system snmp get
esxcli system snmp set –enable true

/etc/init.d/snmpd status

#VM info
esxcli vm process list

Troubleshooting

## List the switch Portnumber for VMs
net-stats -l
PortNum Type SubType SwitchName MACAddress ClientName
100663305 5 7 vSwitch4 00:50:56:34:17:b5 ClientVM1
100663306 5 7 vSwitch4 00:50:56:b3:47:b2 ClientVM2

## List ARP cache
esxcli network ip neighbor list

## Capture drop packets on specific VM switchport
pktcap-uw –capture Drop –switchport 33554442

## Capture packet on specific uplink with for specific mac address and redirect to a file
pktcap-uw –uplink vmnic5 –mac 00:50:56:34:17:b5 -o /tmp/test_lost_connection.cap

##HBA
List Adapters:
esxcli storage core adapter list

Adapters Stats:
esxcli storage core adapter stats get

Rescan Adapters:
esxcli storage core adapter rescan –all

VMKernel Modules:
esxcli system module list

#VMOTION
## find the netstack name (case sensitive)
esxcli network ip netstack list

esxcli network diag ping -I vmk1 –netstack=vmotion -H XXX.XXX.XXX.XXX
vmkping -I vmk1 -S vmotion XXX.XXX.XXX.XXX