A logical switch has multiple switch ports. A logical switch port connects another network component, a VM, or a container to a logical switch.

If you connect a VM to a logical switch on an ESXi host that is managed by VMware vCenter, a logical switch port is created automatically. For more information about connecting a VM to a logical switch, see Connecting a VM to a Logical Switch in Manager Mode.

For more information about connecting a container to a logical switch, see the NSX Container Plugin for Kubernetes - Installation and Administration Guide.
Note: The IP address and MAC address bound to a logical switch port for a container are allocated by NSX Manager. Do not change the address binding manually.

To monitor activity on a logical switch port, see Monitor a Logical Switch Port Activity in Manager Mode.

Prerequisites

Procedure

  1. With admin privileges, log in to NSX Manager.
  2. Select Networking > Logical Switches > Ports > Add.
  3. In the General tab, complete the port details.
    Option Description
    Name and Description Enter a name and optionally a description.
    Logical Switch Select a logical switch from the drop-down menu.
    Admin Status Select Up or Down.
    Attachment Type Select None or VIF. Select VIF if this port is for connecting to a VM.
    Attachment ID If the attachment type is VIF, enter the attachment ID.
    Using the API, you can set the attachment type to additional values ( LOGICALROUTER, BRIDGEENDPOINT, DHCP_SERVICE, METADATA_PROXY, L2VPN_SESSION). If the attachment type is DHCP service, metadata proxy, or L2 VPN session, the switching profiles for the port must be the default ones. You cannot use any user-defined profile.
  4. (Optional) In the Switching Profiles tab, select switching profiles.
  5. Click Save.