Support > Knowledge Base
Knowledge Base

Search the Knowledge Base: |
Search the Knowledge Base: |
Configuring a VLAN on a portgroup
Symptoms
- Loss of network connectivity to and from the ESX Server host
- Loss of connectivity to associated portgroups
Purpose
This article explains adding and removing VLAN IDs to and from a portgroup.
Note: Making changes to the service console portgroup from either the Virtual Infrastructure Client or an SSH session may cause you to become disconnected. When working on the service console portgroup, it is best to use a remote console (such as ILO, DRAC or equivalent), or work at the physical console of the server.
Resolution
Changing the VLAN ID from within the Virtual Infrastructure Client
To change the VLAN ID from within the Virtual Infrastructure Client:
-
Highlight the ESX Server host and c lick the Configuration tab.
-
Click the Networking link.
-
Click Properties next to the virtual switch that serves the portgroup to be modified.
-
Highlight the portgroup in the list and click Edit.
-
Enter the appropriate value in the VLAN ID field (enter 0 for no VLAN).
-
Click OK.
Changing the VLAN ID at the ESX Server service console
To change the VLAN ID at the ESX Server service console:
-
Log in to the service console as root via SSH, remote console, or at the physical console.
-
Type the following command and press Enter to see the current configuration of the virtual switches:
[root@server root]# esxcfg-vswitch -l
The output appears similar to:
Switch Name Num Ports Used Ports Configured Ports Uplinks
vSwitch0 32 4 32 vmnic0
PortGroup Name Internal ID VLAN ID Used Ports Uplinks
VM Network 0 portgroup1 0 0 vmnic0
Service Console portgroup0 0 1 vmnic0
Switch Name Num Ports Used Ports Configured Ports Uplinks
vSwitch1 64 2 64 vmnic1
PortGroup Name Internal ID VLAN ID Used Ports Uplinks
VM Network 1 portgroup19 0 0 vmnic1
Note: Your virtual switch and portgroup names may be different.
-
Record the name of the virtual switch and portgroup that you want to change. The command to change the VLAN ID on a portgroup is:
[root@server root]# esxcfg-vswitch -p "<portgroup name>" -v <VLAN_ID> <virtual switch name>
where <portgroup name> is the name of your portgroup and <virtual switch name> is the name of your virtual switch.
For example, using the configuration above, to add a VLAN ID of 10 to VM Network 1 (which resides on vSwitch1), you must enter the command:
[root@server root]# esxcfg-vswitch -p "VM Network 1" -v 10 vSwitch1
-
To verify the new configuration, type the following command and press Enter:
[root@server root]# esxcfg-vswitch -l
The output appears similar to:
Switch Name Num Ports Used Ports Configured Ports Uplinks
vSwitch1 64 2 64 vmnic1
PortGroup Name Internal ID VLAN ID Used Ports Uplinks
VM Network 1 portgroup19 10 0 vmnic1
-
To resolve connectivity and configuration issues:
Linking and unlinking to proper vmnic
For regular vSwitches:
esxcfg-vswitch -U <vmnic> <vSwitch> #unlink an uplink.
esxcfg-vswitch -L <vmnic> <vSwitch> # add an uplink.
For additional Information, see Sample configuration of virtual switch VLAN tagging (VST Mode) and ESX Server (1004074).
Feedback
Actions
- KB Article: 1003825
- Updated: Aug 14, 2009
- Products:
VMware ESX
VMware VirtualCenter - Product Versions:
VMware ESX 3.0.x
VMware ESX 3.5.x
VMware VirtualCenter 2.0.x
VMware VirtualCenter 2.5.x

