Windows Server as router?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

aag

Member
Jun 4, 2016
74
5
8
I am setting up a Supermicro Xeon with Windows Server 2016, with a bunch of linux VMs. Does it make sense to use the Supermicro as a Router/DHCP server/LAN DNS server in addition to all its other tasks? It does have two ethernets, so one could interface the web and the other could go to the LAN. If so, would you set up the router within the guest OS, or in a separate VM?
 

doup93

New Member
Feb 26, 2013
23
3
3
General recommandation is if you have Hyper-V running on a server, don't install other roles.
 
Jul 2, 2016
62
13
8
39
Iceland
This might help you getting a overview on how to setup a Pfsense router in a Hyper-v environment.





Tutorial: how can you set up a VirtualBox virtual machine environment in you're own home network without IP conflict of you're home router (for example if you decide to install-a DHCP role-i in the Windows Server development environment / test lab) .

Network design - Overview:

Asus Router home WAN (DHCP - Gets public IP address from ISP)
Asus Router home LAN: 192.168.1.1 - 192.168.1.254


Virtualbox virtual environment running on conventional desktop machine at home.

Pfsense WAN (em0): 192.168.1.200/24 (static IP)
Pfsense LAN (em1): 10.2.0.1/8 (static IP)
Windows Server 2012 virtualization servers: 10.2.0.X (Servers get a static IP address)
Windows 8.1 / 10 machines: 10.2.0.X (Windows client machines get IP addresses from the Windows 2012 DHCP server on virtualbox Pfsense LAN)


On the pictures below is how i configured the Virtualbox networking adapters for the Pfsense Router,Windows Server 2012 and Windows 8 client machine.




1) Pfsense virtual router - VirtualBox network adapter settings

Pfsense WAN (em0): 192.168.1.200/24 (this text is a information to explain the role of this network adapter ).

Pfsense virtual router - Network settings "adapter 1"



2)Pfsense LAN (em1): 10.2.0.1/8 (this text is a information to explain the role of this network adapter ).

Pfsense virtual router - Network settings "adapter 2"






3) Pfsense virtual-router running in virtualbox (Finished Installing pfsense and assigning the virtual network interface and assign static IP addresses for the network interfaces)





4) Windows Server 2012 virtualbox virtual machine Using the same internal network adapter "adapter 2" same as the Pfsenserouter is using IE LAN (em1): 10.2.0.1/8





5) Windows server 2012 assigned with static IP - and has the DNS and DHCP role installed.





6) Connected to the Pfsense router Dashboard on the Windows server 2012 virtual machine




7) Windows 8 client Machine gets assigned DHCP address from The DHCP role on the Windows Server 2012 virtual machine


 
  • Like
Reactions: Patrick

aag

Member
Jun 4, 2016
74
5
8
Thank you, this is very friendly and extremely useful. The only thing is, I use Hyper-V instead of VirtualBox. Hyper-V VMs can only be attached to Virtual Switches of the "external" variety. The virtual switch can then be attached to a physical ETH port. I guess that I would connect the PfSense VM to two virtual switches, one attached to a LAN-connected ETH port and one attached to a WAN-connected ETH port. Right?
 
Jul 2, 2016
62
13
8
39
Iceland
Hi aag

I´m not using Hyper-v much these days (mainly working in a Vmware environment). Hopefully someone familiar with Hyper-v can help you out.
BTW i'm actually looking for a good Freenas server and Hyper-v server hardware (to muck around with at home) and try out Docker and get up to date on setting up a Hyper-V server environment.

Good luck though
 

aag

Member
Jun 4, 2016
74
5
8
yes and no. For the moment I have placed DHCP and DNS server onto a WinServer2016 tech preview, and they run fine. For the gateway, I am using a Netgear Nighthawk R8000. Despite being an allegedly high-end router, the Nighthawk is very cumbersome to configure and does not even have a CLI or a way to upload tables, hence I may go for Pfsense after all. However, that necessitates running an ETH cable to the basement and another one to the top. Both cables are present but it's still a pain. Also, I'd like to see how stable the SuperMicro goes for the next couple of months: if it crashes and everything depends on it, I'd be out of luck...
 

Jrezz

New Member
Jul 21, 2016
2
0
1
46
Thank you, this is very friendly and extremely useful. The only thing is, I use Hyper-V instead of VirtualBox. Hyper-V VMs can only be attached to Virtual Switches of the "external" variety. The virtual switch can then be attached to a physical ETH port. I guess that I would connect the PfSense VM to two virtual switches, one attached to a LAN-connected ETH port and one attached to a WAN-connected ETH port. Right?
You would be correct. Two vSwitches labeled accordingly. For the vSwitch servicing the WAN interface, be sure to uncheck the "Allow management operating system to share this network adapter" box.
 

aag

Member
Jun 4, 2016
74
5
8
I regret to say that I have hit a concrete (fire)wall.
  • I have installed pfSense on a Hyper-V VM, attached it to 2 VirtualSwitches as described above, and given a static LAN address.
  • The LAN side works fine and the webConfigurator is available.
  • Both ethernet ports are enabled in WinServer. LEDs light up on both WAN and LAN ports, and the cable modem shows that the server is attached.
  • The diagnostics says that both WAN and LAN are up (but it still reports the WAN as up even if I pull out the cable, probably because it reports attachment to the Virtual Switch).
However, I cannot ping anything on the WAN. I tried to virtualize the Ethernet adapter with SRV-I/O but that did not help either. If I simply pull out the plug from the modem to the pfSense WAN port and connect it to the Netgear router instead, everything works fine.

I should say that there is a potential anomaly though. When I run a port scan in the LAN, the WAN adapter shows up - even if it physically not attached to the LAN (I checked it three times). DHCP assigns an IP address to it, and if I point my browser it offers me a "supermicro login" webpage (something hardcoded in the supermicro server)! How can that possibly be??? To me, this suggests that somehow the Ethernet port is on the wrong network, but I have no good idea to make it behave.
 

ttabbal

Active Member
Mar 10, 2016
747
207
43
47
That supermicro login is the IPMI Web page. Many boards will allow or even require that the management interface share a port with the main system. It's transparent to you. You should check the BIOS and see if you can set it to only use the dedicated port. The IPMI BMC is a completely separate computer on the motherboard. You want it to be on the LAN, though I would assign a static IP to it. Make certain you can't see it on the WAN though. That would be bad.

I don't do windows server, so can't help with the other stuff really. Can you use VT-D to pass the nic into the VM? That way Windows can't be doing any "helpful" stuff with it...
 

aag

Member
Jun 4, 2016
74
5
8
Thanks. VT-d is enabled in BIOS and I tried to bind a virtual switch via Single Root I/O Virtualization (SR-IOV). Still no joy. I'd be grateful for any hints!
 

aag

Member
Jun 4, 2016
74
5
8
In an act of desperation, I hooked up both LAN and WAN nics to the same LAN switch. Lo-and-behold, the WAN interface immediately received a DHCP IP address. This tells me that there is nothing fundamentally wrong with the system (I guess). However, if I hook the WAN interface to the Modem, it never receives an IP address.
 

ttabbal

Active Member
Mar 10, 2016
747
207
43
47
You might try connecting a normal computer to the modem. Was something else connected before? Some cable modem system lock to the MAC address. You might need to clone the old address..
 

aag

Member
Jun 4, 2016
74
5
8
Incidentally I wanted to say that the people in this forum are kind, helpful, and non-judgmental. I really feel helped and guided, and I am grateful to you all. What a gigantic difference from the server-fault forum, where everybody seems to be out to get at you and downvote as soon as you admit to any kind of weakness...
 
  • Like
Reactions: Jrezz and JayG30