VMware Cloud Community
BrendanMarmont
Enthusiast
Enthusiast
Jump to solution

ESXi - Trunking to Cisco switch

Hi, I'm having a bit of trouble creating a trunk to a ESXi v4.1 host.

My config on the switch

interface GigabitEthernet3/29
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,300
switchport mode trunk
switchport nonegotiate
spanning-tree portfast trunk

ESXi side the VLAN ID was set to All (4095) - Both the switch and host side configurations dropped the host from vCentre.

Setting the switch interface to an access port on VLAN100, the host will stand up fine. Problem being I need another network to be accessed (VLAN300)

interface GigabitEthernet3/29
switchport access vlan 100
switchport mode access
spanning-tree portfast
end

I am able to enable a second adapter on the host and set it up as a trunk like above, seems to work fine, although I have not got a vm up on it yet to test Smiley Happy

*

My query is, how do we go about allowing multiple VLANs to a ESXi host on a single adapter? What am I missing here...

Thanks in adavance,

Brendan

Reply
0 Kudos
1 Solution

Accepted Solutions
Rubeck
Virtuoso
Virtuoso
Jump to solution

To me it sounds like the vmkernel interface used for the management  network isn't being tagged, as the host reponds when you define the  physical switch port as an access port in VLAN 100. So either tag the  vmkernel port with VLAN ID 100 or make VLAN 100 the native VLAN on the  physical switchport..(switchport trunk native vlan 100)

/Rubeck

View solution in original post

Reply
0 Kudos
8 Replies
a_p_
Leadership
Leadership
Jump to solution

ESXi side the VLAN ID was set to All (4095)

VLAN 4095 is useful if you set the VLAN ID in the guest OS (VGT mode). The most common configuration is to create multiple port groups with the different VLAN-IDs on the vSwitch (VST mode),

see http://www.vmware.com/files/pdf/virtual_networking_concepts.pdf

André

BrendanMarmont
Enthusiast
Enthusiast
Jump to solution

Thanks for the reply,

I understand the virtual switch side of things. Was more wondering why my physical interface being set to 802.1q was dropping the ESXi host off the LAN. I can only see the host when the physical interface is set as an access port with a fixed VLAN ID matching the hosts IP address.

I can create a Port Group with a VLAN ID of 300, but surley if the physical interface to the host is fixed with 'switchport access vlan 100' it is not going to pass the traffic? My theory would say the physical interface HAS to be a trunk to pass multiple VLANs?  The world between the physical and virtual has become blurry! Smiley Happy

Cheers,

Brendan

Reply
0 Kudos
weinstein5
Immortal
Immortal
Jump to solution

TAgging is done at the virtual switch - so you will need port groups and vmkernel configured with the approriate vlan IDs - not being a Cisco Admin you will need to configure the physical ports used by the virtual switch will need to be configured as a trunk port group for both vlan 100 and 300

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
depping
Leadership
Leadership
Jump to solution

Well it doesn't need to be trunked to be honest. I have customers doing 8 - 10 nics with pairs of ports being configured as access ports with a VLAN ID. In that case you don't assign a VLAN ID to the Portgroup and don't do anything on the VM level... it is the switch port which will do the work for you. However it is far from a flexible solution.

Trunk + virtual switch tagging = the way to go!

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Interesting issue. Actually I didn't mention your physical setup in my previous post, because the trunk configuration looks ok (see http://kb.vmware.com/kb/1004074 for a sample). Can you please double check there's no typo in any of the configurations (physical switch, port group as well as the VM's IP address, gateway and subnet mask) and the IP addresses used match the ones that are routed in your physical VLAN configuration.

André

Reply
0 Kudos
BrendanMarmont
Enthusiast
Enthusiast
Jump to solution

Cheers for your response, it is a bit odd, but my issue still stands....I can't get the physical interface on the switch set as a trunk port without the ESXi host dropping off the LAN. Checked all the addressing/masks etc... I will just leave it with the secondary adapter installed, it lets me configure it as a trunk with no issues.

Thanks for you time,

Brendan

Reply
0 Kudos
Rubeck
Virtuoso
Virtuoso
Jump to solution

To me it sounds like the vmkernel interface used for the management  network isn't being tagged, as the host reponds when you define the  physical switch port as an access port in VLAN 100. So either tag the  vmkernel port with VLAN ID 100 or make VLAN 100 the native VLAN on the  physical switchport..(switchport trunk native vlan 100)

/Rubeck

Reply
0 Kudos
BrendanMarmont
Enthusiast
Enthusiast
Jump to solution

Thanks Rubeck, that was the silver bullet.

To enable the interface as a trunk to an ESXi host we used the following...

interface GigabitEthernet3/14
description SQUID
switchport access vlan 100
switchport trunk encapsulation dot1q
switchport trunk native vlan 100
switchport trunk allowed vlan 100,300
switchport mode trunk
switchport nonegotiate
spanning-tree portfast trunk

Cheers to those who responded Smiley Happy

Reply
0 Kudos