Adding an uplink to a switch
search cancel

Adding an uplink to a switch

book

Article ID: 305299

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • ESXi has no connectivity due to missing uplink 

OR

  • When adding an uplink to the switch, you may see an error similar to:
    There are no free physical adapters to attach to this virtual switch.

Environment

VMware vSphere ESXi

Resolution

  1. SSH to the ESXi host.

  2. To add an uplink (vmnic) to the standard switch, use the following command:

    esxcli network vswitch standard uplink add --uplink-name=<vmnic_label> --vswitch-name=<vSwitch_name>

  3. To add an uplink (vmnic) the the distributed switch:
    1. Find an unused port on the vDS in question that can be used by the uplink (typically, this is two digit integer, e.g. 14). "In Use" column for such DVPort ID will read "0":

      esxcfg-vswitch -l

    2. Add the uplink to the vDS. 

      esxcfg-vswitch -P <vmnic_label> -V <unused_dvPort_ID_from_step_3/a> <dvSwitch_name>

  4. Confirm the uplink has been added successfully:

    esxcfg-vswitch -l

  5. (Optional) Reboot the ESXi host to ensure configuration is persistent.

For more information, see KB article Configuring vSwitch or vNetwork Distributed Switch from the command line in ESXi/ESX (1008127).

Additional Information

Running the command "lspci | grep -i vmnic" confirms that the uplinks are available on the respective ESXi hosts.

For example:
Physical connectivity:

# lspci | grep -i vmnic


0000:01:00.0 Network controller: Intel Corporation Gigabit 4P I350-t rNDC [vmnic0]
0000:01:00.1 Network controller: Intel Corporation Gigabit 4P I350-t rNDC [vmnic1]
0000:01:00.2 Network controller: Intel Corporation Gigabit 4P I350-t rNDC [vmnic2]
0000:01:00.3 Network controller: Intel Corporation Gigabit 4P I350-t rNDC [vmnic3]

The above should match list of connected vmnics in output of "esxcfg-nics -l", e.g.:

# esxcfg-nics -l


Name    PCI          Driver      Link Speed      Duplex MAC Address       MTU    Description
vmnic0  0000:01:00.0 igbn        Up   1000Mbps   Full   b8:ca:3a:##:##:## 1500   Intel Corporation Gigabit 4P I350-t rNDC
vmnic1  0000:01:00.1 igbn        Up   1000Mbps   Full   b8:ca:3a:##:##:## 1500   Intel Corporation Gigabit 4P I350-t rNDC
vmnic2  0000:01:00.2 igbn        Up   1000Mbps   Full   b8:ca:3a:##:##:## 1500   Intel Corporation Gigabit 4P I350-t rNDC
vmnic3  0000:01:00.3 igbn        Up   1000Mbps   Full   b8:ca:3a:##:##:## 1500   Intel Corporation Gigabit 4P I350-t rNDC