This tool can manage the Ethernet interfaces of the service console. In a big change from previous versions of ESX, the Ethernet interface of the service console is named with the “vswif” prefix and not “eth” prefix as you may be used to in Linux.
During installation of ESX server, your service console Ethernet connection should have been created. However, maybe a mistake was made, or we want to add another service console port for redundancy.
In VI Client we can view the network configuration of our ESX host. Here is an example of a typical network configuration.

If we use the esxcfg-vswif tool, we are examining, creating or modifying a service console port. So in the first example here, we are simply listing what ports have been created.
# esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 192.168.31.31 255.255.255.0 192.168.31.255 true false
So the output is showing the same as the graphical output in VI client.
If we wanted to add a 2nd service console port, we could use this command. However, all this command will do is turn a regular portgroup into a service console port and bind an IP address to Linux. So in the following command line example, we create a portgroup first, and then we turn it into a service console port with esxcfg-vswif.
# esxcfg-vswitch –add-pg=”Service Console Backup” vSwitch1
# esxcfg-vswif -a -i 10.10.1.31 -n 255.255.0.0
-p “Service Console Backup” vswif1
[2007-11-21 11:29:18 'Vnic' warning] Generated New MAC address
, 00:50:56:4d:da:97 for vswif1
Nothing to flush.
So now if we run esxcfg-vswif to list the service console ports, we will be able to see the original service console port as well as our new one we just created. We’ve shown you the graphical representation as well from the VI client so you can compare.
# esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 192.168.31.31 255.255.255.0 192.168.31.255 true false
vswif1 Service Console Backup 10.10.1.31 255.255.0.0 10.10.255.255 true false

A new function was added to esxcfg-vswitch when ESX 3.5 was released at the end of 2007. This version of ESX server was the first to support Ethernet Jumbo Frames. This is where the MTU size is increased beyond the default 1500 bytes. In the following example, we are changing the maximum MTU for vSwitch1.
# esxcfg-vswitch -m 9000 vSwitch1
|