List all nics/uplink
[root@ESXi01:~] esxcli network nic list
Name PCI Device Driver Admin Status Link Status Speed Duplex MAC Address MTU Description
------ ------------ ------ ------------ ----------- ----- ------ ----------------- ---- -----------
vmnic0 0000:00:1f.6 ne1000 Up Up 1000 Full 1c:69:7a:6b:a3:e5 1500 Intel Corporation Ethernet Connection (10) I219-V
vusb0 Pseudo cdce Up Up 100 Full 00:e0:4c:68:05:48 1500 Realtek USB 101001000 LAN
Assign a uplink/nic to a vswitch:
[root@ESXi01:~] esxcli network vswitch standard uplink add -u vusb0 -v LAN
esxcli network vswitch standard uplink add -u vmnic0 -v WAN
Remove switch:
esxcli network vswitch standard remove --vswitch-name=LAN
Check network config:
[root@ESXi01:~] esxcli network vswitch standard list
vSwitch0
Name: vSwitch0
Class: cswitch
Num Ports: 3456
Used Ports: 10
Configured Ports: 128
MTU: 1500
CDP Status: listen
Beacon Enabled: false
Beacon Interval: 1
Beacon Threshold: 3
Beacon Required By:
Uplinks: vmnic0
Portgroups: VM Network, Management Network
WAN
Name: WAN
Class: cswitch
Num Ports: 3456
Used Ports: 2
Configured Ports: 128
MTU: 1500
CDP Status: listen
Beacon Enabled: false
Beacon Interval: 1
Beacon Threshold: 3
Beacon Required By:
Uplinks:
Portgroups: WAN
LAN
Name: LAN
Class: cswitch
Num Ports: 3456
Used Ports: 4
Configured Ports: 128
MTU: 1500
CDP Status: listen
Beacon Enabled: false
Beacon Interval: 1
Beacon Threshold: 3
Beacon Required By:
Uplinks: vusb0
Portgroups: LAN
[root@ESXi01:/etc/rc.local.d] esxcli network vswitch standard list
ReplyDeletevSwitch0
Name: vSwitch0
Class: cswitch
Num Ports: 3456
Used Ports: 11
Configured Ports: 128
MTU: 1500
CDP Status: listen
Beacon Enabled: false
Beacon Interval: 1
Beacon Threshold: 3
Beacon Required By:
Uplinks: vmnic0
Portgroups: VM Network, Management Network
WAN
Name: WAN
Class: cswitch
Num Ports: 3456
Used Ports: 4
Configured Ports: 128
MTU: 1500
CDP Status: listen
Beacon Enabled: false
Beacon Interval: 1
Beacon Threshold: 3
Beacon Required By:
Uplinks: vusb0
Portgroups: WAN