It's possible to have a vmware switch configuration that looks like
interface GigabitEthernet0/4
description Compute Node 1 eth1
switchport trunk native vlan 100
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100, 101 102
switchport mode trunk
spanning-tree portfast trunk
on the gigabitEthernet 0/4 I've got a linux machine that needs these config.
thank you!
Ah, very good. Sorry for my confusion!
Yes, you can do this.
interface GigabitEthernet0/4
Understand and document how this switchport is connected to your ESXi host. During boot, your ESXi host will enumerate its physical NICs, known as vmnics. Turn on CDP on your vSwitches (or LLDP if using a vDS) so you'll know how your ESXi host connects northbound.
description Compute Node 1 eth1
You can't configure descriptions on Standard vSwitches (you *can* configure them on a vDS). You can also, of course, name port groups however you like, with a few caveats.
switchport trunk native vlan 100
VMware virtual switches don't exactly have the concept of Native VLANs. If you want packets to leave the ESXi host untagged, you simply don't assign a VLAN to that particular port group.
switchport trunk encapsulation dot1q
VMware only uses 802.1q tagging. There's no need to configure it explicitly. Also, you can't.
switchport trunk allowed vlan 100, 101 102
Create whatever VLANs you like on the ESXi hosts using port group VLAN settings. Remember not to configure a VLAN for the port group which hosts the Native VLAN.
switchport mode trunk
ESXi hosts accept multiple VLANs on one vmnic out of the box. There's no need to configure it.
spanning-tree portfast trunk
This option is strictly for switching devices, not end-hosts like ESXi. Your ESXi NIC ports will come up as fast as possible.
-----------------------------------------
Please consider marking this answer "correct" or "helpful" if you found it useful.
Mike Brown
VMware, Cisco Data Center, and NetApp dude
Consulting Engineer
Twitter: @VirtuallyMikeB
Blog: http://VirtuallyMikeBrown.com
LinkedIn: http://LinkedIn.com/in/michaelbbrown
Moderator note: Moved to the vSphere vNetwork forum area.
That looks pretty good, except for the missing comma in "switchport trunk allow"
-----------------------------------------
Please consider marking this answer "correct" or "helpful" if you found it useful.
Mike Brown
VMware, Cisco Data Center, and NetApp dude
Consulting Engineer
Twitter: @VirtuallyMikeB
Blog: http://VirtuallyMikeBrown.com
LinkedIn: http://LinkedIn.com/in/michaelbbrown
the commands came from a cisco os how to do it on the vmware switch?
Ah, very good. Sorry for my confusion!
Yes, you can do this.
interface GigabitEthernet0/4
Understand and document how this switchport is connected to your ESXi host. During boot, your ESXi host will enumerate its physical NICs, known as vmnics. Turn on CDP on your vSwitches (or LLDP if using a vDS) so you'll know how your ESXi host connects northbound.
description Compute Node 1 eth1
You can't configure descriptions on Standard vSwitches (you *can* configure them on a vDS). You can also, of course, name port groups however you like, with a few caveats.
switchport trunk native vlan 100
VMware virtual switches don't exactly have the concept of Native VLANs. If you want packets to leave the ESXi host untagged, you simply don't assign a VLAN to that particular port group.
switchport trunk encapsulation dot1q
VMware only uses 802.1q tagging. There's no need to configure it explicitly. Also, you can't.
switchport trunk allowed vlan 100, 101 102
Create whatever VLANs you like on the ESXi hosts using port group VLAN settings. Remember not to configure a VLAN for the port group which hosts the Native VLAN.
switchport mode trunk
ESXi hosts accept multiple VLANs on one vmnic out of the box. There's no need to configure it.
spanning-tree portfast trunk
This option is strictly for switching devices, not end-hosts like ESXi. Your ESXi NIC ports will come up as fast as possible.
-----------------------------------------
Please consider marking this answer "correct" or "helpful" if you found it useful.
Mike Brown
VMware, Cisco Data Center, and NetApp dude
Consulting Engineer
Twitter: @VirtuallyMikeB
Blog: http://VirtuallyMikeBrown.com
LinkedIn: http://LinkedIn.com/in/michaelbbrown
It would look similar to this config.