January 29th, 2010 Leave a comment Go to comments

VLAN testing in ESX 4, So I need to test lots of VLANs and make sure connectivity is OK.

Well here is quick and easy way to do it?
1. Create a port group on the vSwitch with ID 4095. This will allow the VM
to connect to all available VLANs available to the host.

2. Enable VLAN tagging from inside the VM. This only works with the E1000
intel driver which only ships with 64 bit Windows. So if you have a 32 bit
Windows server, then you need to first modify the .vmx file and then download  and install the intel E1000 driver from within Windows.
This link how this is done. Note that when modifying the .vmx, add the following line:

Ethernet0.virtualDev = “e1000”

Note that if you use the default Flexible nic to begin with, there’s no existing entry for the nic in the .vmx, so just add the new entry.

Under Edit Settings for the VM, attach the NIC to the VLAN with id 4095.

3. Now you can add VLANs in the VM. Go to the Device Manager and then Properties for the E1000 NIC. There’s a tab that says VLANs (see screendump below). As you add VLANs, a seperate NIC or “Local Area Connection” is created for each VLAN. It is set for DHCP, so if there’s a DHCP server on that network it will receive an IP automatically. If not, you will need to configure an IP for that interface manually (e.g. by requesting a temporary IP from the network department.). For quickly configuring the IP, you can run the following command from CMD or a batch (.cmd) script:

netsh int ip set address “local area connection 1” static 1

4. Now we will use the Tracert (traceroute) command to test connectivity.
The reason that we can’t use Ping is the following: If you have multiple VLANs
configured and you ping a gateway on a given VLAN – and the VLANs happen to be routable –
then you will recieve a response from one of the other VLANs even though the one your
are testing is not necessarily working.


Categories: HowTo Tags: , , , , , , ,
  1. No comments yet.
  1. No trackbacks yet.