Page 1 of 1

adding vlans for VMs on Server 2012

Posted: Mon Jul 30, 2018 10:55 am
by uts
I need VLan help please:

On a windows server, I have VMs running. server is connected through 1 network cable going to the router.
Some VM's traffic need to be on their own VLans and get ip on their seperate subnet.
Example:

Ethernet 4
Vlan 3 : Lan 192.168.3.0/24 Gateway: 192.168.3.254
Vlan 4 : Lan 192.168.4.0/24 Gateway: 192.168.4.254
Vlan 5 : Lan 192.168.5.0/24 Gateway: 192.168.5.254

Re: adding vlans for VMs on Server 2012

Posted: Mon Jul 30, 2018 12:22 pm
by usdmatt
What router do you have? I also assume that the router will act as the gateway for these vlans (you want to assign the .254 addresses to the Mikrotik?)

Re: adding vlans for VMs on Server 2012

Posted: Tue Jul 31, 2018 9:48 am
by uts
Thanks for the reply. Router is hex. Router will act as the gateway. VMs communication gets VLan tagging as needed by VM manager.

Re: adding vlans for VMs on Server 2012

Posted: Tue Jul 31, 2018 8:04 pm
by CZFan
Create the necessary Vlan's and assign these to ether4 on MT
Assign IP's to these Vlan's and if required, create DHCP on these Vlan's

On Windows / Hyper-V side, you will need to create trunking and that can only be done in Powershell, not via VM Manager, just Google it and you will find process to do this

Re: adding vlans for VMs on Server 2012

Posted: Tue Jul 31, 2018 11:46 pm
by uts
Create the necessary Vlan's and assign these to ether4 on MT
Assign IP's to these Vlan's and if required, create DHCP on these Vlan's

On Windows / Hyper-V side, you will need to create trunking and that can only be done in Powershell, not via VM Manager, just Google it and you will find process to do this
thank you for the reply, I will try. However, I have hyper-v on virtual switch that seems to allow vlans without any trunking, as a managed switch is able to pickup the vLan tags and route them to the appropriate port. This is how i had it setup previously and it was working. Now I am trying to eliminate the switch. I will try you advise and get back to you today.

Re: adding vlans for VMs on Server 2012  [SOLVED]

Posted: Wed Aug 01, 2018 12:10 am
by uts
Create the necessary Vlan's and assign these to ether4 on MT
Assign IP's to these Vlan's and if required, create DHCP on these Vlan's

On Windows / Hyper-V side, you will need to create trunking and that can only be done in Powershell, not via VM Manager, just Google it and you will find process to do this
Thank you CZFan, it worked.
I had tried this multiple times previously myself without success. Looking at your guidelines, I was over complicating this. Thanks again

For those who find this useful, know that above will work up to DHCP assignment only, there will be no internet access. You must have appropriate VLan tagging coming from the End Device or Managed Switch. Next, for internet connection, create a NAT in IP/Firewall. you can copy default Nat but have them separately configured by source address of Lans or Vlans. You may or may not need to update dns address in ip/dhcp server/networks