VMware Cloud Community
LMT
Enthusiast
Enthusiast

Switch configuration to support dot1q

Can anyone help me with the exact switch configuration for the following scenario:

An ESX Server plugged into port 6 on a Cisco 3750.

On this ESX Server there is a Virtual Switch with a Service Console PortGroup without VLAN ID set and a PortGroup that has VLAN ID 622 set.

Attached to the PortGroup with VLAN ID 622 is a Virtual Machine with Windows 2003.

I'm having trouble getting the correct configuration on the switch to allow communication to VLAN 622 for the Virtual Machine without loosing communication to the Service Console. Is this the correct configuration:

!

interface GigabitEthernet1/0/6

description description

switchport access vlan 145

switchport trunk native vlan 145

switchport trunk allowed vlan 145,622,623

switchport mode access

spanning-tree portfast

!

Shouldn't there be "switchport trunk encapsulation dot1q" somewhere or how should it really look to get this to work?

Thanks for any comments or suggestions

Marten

0 Kudos
9 Replies
acr
Champion
Champion

see if this helps.. Page 8..

http://www.vmware.com/pdf/esx3_vlan_wp.pdf

0 Kudos
esiebert7625
Immortal
Immortal

This white paper documents it very well...

http://www.vmware.com/pdf/esx3_vlan_wp.pdf

0 Kudos
LMT
Enthusiast
Enthusiast

Thanks for the information. I have read that white paper and things are starting to work now. However I cannot seem to get the native VLAN communication to work. As far as I understand it, if no VLAN ID is set it should default to a specified VLAN and be able to communicate there.

All I need to set on the switch would then be:

vlan dot1q tag native and

switchport trunk encapsulation dot1q

and then on the port

switchport trunk native vlan XXX

Where XXX is the VLAN I would like it to default to.

Is this right

Thanks

Marten

0 Kudos
esiebert7625
Immortal
Immortal

Well the native VLAN is typically 1. We were able to get ours to work using those settings in our Cisco switch. Then we just created a port group in the vSwitch with a VLAN ID of 1.

To see if your NIC sees VLAN 1 you can go to Configuration, Network Adapters in the VIC, then click on the NIC and hover over the Networks column and it should show you all the VLANs it sees.

LMT
Enthusiast
Enthusiast

How do you build the server if you want it to get a DHCP assigned address? If the port is "locked" to a VLAN and won't allow communication without one defined. And it's not possible to set VLAN ID at that point of time. Thanks Marten

0 Kudos
esiebert7625
Immortal
Immortal

Check this guide, module 4 gives the commands to set vSwitch info from the command line on the ESX host.

http://www.rtfm-ed.eu/docs/vmwdocs/esx3.x-vc2.x-serviceconsole-guide.pdf

0 Kudos
LMT
Enthusiast
Enthusiast

To set vSwitch info from the command line on the ESX host, the ESX host must be running. This is in the initial build stage where I don't get a DHCP address. Does anyone have a switch config that I could have a look at?

Regards,

Marten

0 Kudos
LMT
Enthusiast
Enthusiast

It was a combination of us needing spanning-tree portfast enabled when port configured as accessport to get build working and then setting a different native VLAN when using trunk.

Thanks for all your help

0 Kudos
amit40
Contributor
Contributor

s3(config)#int port-channel1

s3(config-if)#switchport trunk encapsulation dot1q

s3(config-if)#switchport trunk allowed vlan all

s3(config-if)#switchport mode trunk

s3(config-if)#switchport trunk native vlan XXX

\----


s3(config)#int gi0/6

s3(config-if)#switchport trunk encapsulation dot1q

s3(config-if)#switchport trunk allowed vlan all

s3(config-if)#switchport mode trunk

s3(config-if)#switchport trunk native vlan XXX

\----


\- Change the native VLAN on this port to something else ( may be 1 are differnet one as the Tagging will not happen for Native VLAN )

\- Second imp thing is you have specified that both the Service console & VM are on the same switch (please put them in the same port group are differnent progroup with the VLAN ID that are existing in the Physical switch ) it will pick up the IP from DHCP since you are allowing all the VLAN on the trunk .

How many NICS u have in the server ????

0 Kudos