1. To check how many network cards connected to ESX.
Login to esx server with credentials. use command esxcfg-nics -l
[root@server root]# esxcfg-nics -l
The output appears similar to:
The output is showing two nics are connected to ESX i.e vmnic0 and vmnic1 and it will show mac address of nic cards also
2. To check list of current virtual switches availble in ESX server
[root@server root]# esxcfg-vswitch –l
The output showing that one vSwitch is created to ESX server. i.e; vSwitch0
3. How to creating new virtual switch with command line
[root@server root]# esxcfg-vswitch -a vswitch2
'-a' is for creating
vswitch2 is for name of the vswitch.
vSwitch2 switch showing that default num of ports is 64, Uplinks nill, because we are not connected nic card to new switch
4. Create service console port group on this new switch "vSwitch2"
[root@server root]# esxcfg-vswitch -A "Service console" vSwitch2
virtual switch vSwitch2 is created port group called service console, the service console is not connected with any vmnic. So i am uplink the nic card to new vSwitch2
5. Uplink the nic card to new vSwitch2
[root@server root]# esxcfg-vswitch -L vmnic2 vSwitch2
The new vSwitch2 is now connected with physical nic card is vmnic1.
6. To Create the vswif (Service console) interface;
[root@server root]# esxcfg-vswif -a vswif0 -i 192.168.1.100 -n 255.255.255.0 -p "service console"