ESXi 6.5 VLAN Configuration

Preface:

This document assumes the following

Some Hints:

Example:

ESXi has a management IP of 192.168.1.5 on ESXi VLAN0

The home network gateway is 192.168.1.1

All the switch ports are set to Access VLAN1

Because the switch is set to access ports on vlan 1 and both ESXi and the Router are on it. The router is able to send an untagged packet to the switch it is tossed on vlan 1 and rides to the router.

If the router is put on VLAN 2 there is no longer a path to the router for VLAN1

If both VLAN 1 and VLAN 2 need to talk to the router and there is only one port, a trunk is needed. The way this happens, is since the packets need to know what vlans they should be on, they get tagged on the trunk port. There is a native vlan so anything that isn’t tagged as something else gets tossed on the native vlan.

The same goes with the ESXi Server. Anything outside of the native vlan needs to be tagged.  

VLANs with ESXi 6.5 and only one NIC

ESXi setup:

  1. Click networking
  2. Click “Port groups” tab
  3. Management Network should be listed
  1. Note the vSwitch it is connected to
  2. Verify it is set to VLAN0
  1. Click Add Port Group
  1. Enter the Name from the VLAN plan
  2. Give it the VLAN ID from the VLAN plan
  3. Assign it to the vSwitch that the Management Network is assigned to
  4. Click Add
  1. Build out a VM assigning that port group to the NIC

Switch Configuration

  1. Set the uplink port to ESXi as a Trunk port
  2. Native VLAN on the trunk port set to the normal LAN
  3. Verify access to the ESXi
  4. If everything went well continue on
  5. Setup the router connection if that hasn’t already been done.
  6. Validate the new VM has connectivity to the router
  7. Wash, rinse, repeat, until all your VMs and VLANs are created and active

VLANs with ESXi 6.5 and Multiple NICs

For this setup, it is assumed that management will be on one NIC and the second one will be for the trunk.

ESXi setup:

  1. Click networking
  2. Click “Physical NICs” tab
  3. Verify Both NICs are there
  4. Click “Virtual Switches” tab
  5. Click “Add Standard Virtual Swtich”
  1. Give it a descriptive name
  2. In Uplink 1 select the physical NIC not already in use
  1. Click “Port groups” tab
  2. Click Add Port Group
  1. Enter the Name from the VLAN plan
  2. Give it the VLAN ID from the VLAN plan
  3. Assign it to the vSwitch that the Management Network is assigned to
  4. Click Add
  1. Build out a VM assigning that port group to the NIC

Switch Configuration

  1. Set the uplink port to ESXi as a Trunk port
  2. Native VLAN on the trunk port set to the normal LAN
  3. Verify access to the ESXi (Make sure that everything still works as it should and that the wrong interface wasn’t modified
  4. If everything went well continue on
  5. Setup the router connection if that hasn’t already been done.
  6. Validate the new VM has connectivity to the router
  7. Wash, rinse, repeat, until all your VMs and VLANs are created and active