Community discussions

MikroTik App
 
uts
newbie
Topic Author
Posts: 25
Joined: Mon Jul 30, 2018 10:40 am

adding vlans for VMs on Server 2012

Mon Jul 30, 2018 10:55 am

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
 
usdmatt
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Tue Oct 29, 2013 6:18 pm

Re: adding vlans for VMs on Server 2012

Mon Jul 30, 2018 12:22 pm

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?)
 
uts
newbie
Topic Author
Posts: 25
Joined: Mon Jul 30, 2018 10:40 am

Re: adding vlans for VMs on Server 2012

Tue Jul 31, 2018 9:48 am

Thanks for the reply. Router is hex. Router will act as the gateway. VMs communication gets VLan tagging as needed by VM manager.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: adding vlans for VMs on Server 2012

Tue Jul 31, 2018 8:04 pm

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
 
uts
newbie
Topic Author
Posts: 25
Joined: Mon Jul 30, 2018 10:40 am

Re: adding vlans for VMs on Server 2012

Tue Jul 31, 2018 11:46 pm

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.
 
uts
newbie
Topic Author
Posts: 25
Joined: Mon Jul 30, 2018 10:40 am

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

Wed Aug 01, 2018 12:10 am

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