Hi all
Hope someone can give me some pointers here.
We have an ESXi 5.1 host connected to an HP switch, but due to shoddy planning, the ESX host has only one NIC. The problem now is that I've been tasked with connecting a VM on this ESX host to a certain VLAN (let's call it 18), with the other VMs connected to the default VLAN (1).
I've been trying to test and simulate this as far as I can, but unfortunately due to not having a test environment whatsoever (see previous mention of shoddy planning), I'm forced to test this on a live environment.
From what I understand, I need to create a new vSwitch and assign VLAN 18 to it, with the port that the ESX host connects to needing to be configured as a TRUNK port with VLANs 18 (tagged) and VLAN 1 (untagged). What I'm not sure about at all though is can I have multiple vSwitches attached to the same NIC, each with its own unique VLAN? Would this cause any issues?
Is there anything else I need to keep an eye out for that I'm not considering?
Thanks in advance
Yes, one vSwitch for each VLAN.
On the switch side, I would not go for a trunk, as you might in the future, not want all VLAN's to go to the host. Instead just add the VLAN's that you want to use as "tagged" (no untagged VLAN's) on the port where the host is connected.
As you can see in the picture above, in my lab I run a single nic with multiple VLAN's and it works just fine.
Hope this helps.
Yes, one vSwitch for each VLAN.
On the switch side, I would not go for a trunk, as you might in the future, not want all VLAN's to go to the host. Instead just add the VLAN's that you want to use as "tagged" (no untagged VLAN's) on the port where the host is connected.
As you can see in the picture above, in my lab I run a single nic with multiple VLAN's and it works just fine.
Hope this helps.
Hi tophe75
Thank you so much for the quick feedback, appreciate it. I'm going to give this a try and see how it goes, but you just saved me from getting a sizable amount of additional grey hairs
Thanks again for the fast help.
Cheers
Just to confirm, that's not a vSwitch per VLAN. You want to have 1 vSwitch with 1 uplink, and then have multiple port groups connected to the single vSwitch. You do the VLAN tagging within the port group.
Cheers, Matt.
My bad.
Matt is correct, you only need one vSwitch and then add port groups with your VLAN ID on it to your vSwitch.
Hi Matt
Thanks for the heads-up. Just to confirm that I have the correct train of thought here, does the below look more or less correct?
1) Select host, navigate to Configuration tab, select networking
2) Edit an existing vSwitch
3) Under the Ports tab, select Add...
4) Connection type is "Virtual Machine"
5) Provide a descriptive Network Label
6) Specify VLAN ID 18 as an example
7) Next through to Finish
From here on, I suspect I would create a new NIC for the VM I need and specify the network I created in step 5 above, then assign the correct IP and subnet to that NIC?
Sorry for the high amount of questions, but I just really want to make sure that I grasp this concept correctly.
Yep, that looks ok, with the exception of:
From here on, I suspect I would create a new NIC for the VM I need and specify the network I created in step 5 above, then assign the correct IP and subnet to that NIC?
If your VM already has a NIC, you don't necessarily need to create a new one. You can just change the port group it is assigned to, and assign it to the port group you created in the steps you outlined.
Cheers, Matt.
Hi Matt
I implemented something similar to what was recommended here in our live environment yesterday, and so far it seems to work as we'd hoped.
Thanks for the help with this, really appreciate it
Cheers