Learn this information to learn to configure a Home windows Server 2022 server as a router – connecting two separate networks.
Overview and Necessities
Configuring a Home windows Server as a router requires two community adapters on the server. One community adapter must be linked to every community that the router can be routing visitors to and from.
For this information, I’m configuring a Home windows Server to route visitors to and from my AZ-800 lab (172.16.0.0/24) and my residence community (192.168.0.0/24).
The house community has entry to the web. So, the router connects my AZ-800 lab community to the web whereas isolating the 2 networks.
After establishing the Home windows Server as a router, the computer systems within the 172.16.0.0/24 community will use the IP deal with of the server (172.16.0.1) as their default gateway.
Step 1: Configure Community Adapters
On this part, I’ll rename the community adapter linked to the 172.16.0.0/24 community as AZ-800-net. Equally, I’ll rename the community adapter linked to the 192.168.0.0/24 community as home-net.
After that, I’ll configure the TCP/IP settings of every adapter with the configurations proven under:
Community Adapter | IP Tackle | Subnet Masks/Default Gateway | DNS Server |
---|---|---|---|
AZ-800-net | 172.16.0.1 | 255.255.255.0 | 172.16.0.12 |
home-net | 192.168.0.120 | 255.255.255.0/192.168.0.1 | 192.168.0.80 |
Step 1.1: Rename the Community Adapters
- Open PowerShell or CMD and run the IPConfig command to find out the community adapter linked to every community.
The results of the command exhibits that “Ethernet 2” is linked to my residence community. Then again, “Ethernet 3” is linked to my AZ-800 lab community.
To rename the community adapters, full these steps:
- From Server Supervisor, click on the Native Server node, then, click on the IPv4 deal with assigned by DHCP hyperlink.
- From the results of the IPConfig command, I do know that that “Ethernet 2” is linked to my residence community whereas “Ethernet 3” is linked to my AZ-800 lab community.
So, I’ll rename “Ethernet 2” to home-net and “Ethernet 3” to AZ-800-net. To rename a community adapter, right-click it and select Rename.
Step 1.2: Configure the NIC’s TCP/IP
Configure the TCP/IP settings of the online adapters based mostly on the desk your created earlier. Here’s a copy on your reference.
Community Adapter | IP Tackle | Subnet Masks/Default Gateway | DNS Server |
---|---|---|---|
AZ-800-net | 172.16.0.1 | 255.255.255.0 | 172.16.0.12 |
home-net | 192.168.0.110 | 255.255.255.0/192.168.0.1 | 192.168.0.80 |
The quickest strategy to configure the TCP/IP settings is to run the next PowerShell instructions – open PowerShell as administrator.
#Configure IP settings for the "home-net" adapterGet-NetAdapter -Title "home-net" | New-NetIPAddress -IPAddress 192.168.0.110 -PrefixLength 24 -DefaultGateway 192.168.0.1
#Assign the DNS server to the "home-net" adapter
Get-NetAdapter -Title "home-net" | Set-DnsClientServerAddress -ServerAddress 192.168.0.80
#Configure IP settings for the "AZ-800-net" adapter
Get-NetAdapter -Title "AZ-800-net" | New-NetIPAddress -IPAddress 172.16.0.1 -PrefixLength 24
#Assign the DNS server to the "AZ-800-net" adapter
Get-NetAdapter -Title "AZ-800-net" | Set-DnsClientServerAddress -ServerAddress 172.16.0.12
Step 2: Set up the Routing Position
Open PowerShell as Administrator and run the command under to put in the Home windows Server routing position.
Set up-WindowsFeature -Title Routing -IncludeManagementTools -IncludeAllSubFeature
Watch for the position to put in and return a affirmation message.
Step 3: Configure the Server as a Router
- Whereas logged in to the server you put in the routing position, open Server Supervisor. If it was already open once you put in the Routing position, refresh Server Supervisor.
- After that, click on the Server Supervisor’s Instruments menu and select Routing and Distant Entry.
- Then, right-click the Server node and select Configure and Allow Routing and Distant Entry. On the primary web page of the wizard, click on Subsequent.
- Then, choose Community Tackle Translation (NAT) choice. On the NAT Web connection web page, click on on the community adapter that’s linked to the web to pick out it.
- Lastly, evaluation the settings and click on End to arrange NAT on the chosen community adapter. In case you obtain a warning concerning the wizard not having the ability to configure Home windows Firewall ports, click on OK.
Step 4: Configure Home windows Firewall
- Seek for an open Home windows Defebder Firewall. Then, click on Superior settings.
- Click on the Inbound Guidelines node, then find the Routing and Distant Entry rule group, maintain down the shift key and choose all. After that, right-click the principles and select Allow Rule.
Step 5: Take a look at the Router
To verify that the router works, I created a VM within the 172.16.0.0/24 community and configured its TCP/IP settings as proven within the screenshot under. As seen within the screenshot, the VM is linked to the web.
I used the DNS server on the 192.168.0.0/24 community as a result of I had not configured a DNS server on the 172.16.0.0/24 community once I carried out this check.
To verify that the VM connects to the intert by way of the router, 172.16.0.1, see the results of my tracert command. As proven within the end result, the connection’s first hop is the router IP deal with.
Conclusion
Home windows Server provides a easy router that you need to use to separate your private home out of your lab community. On this information, I defined the steps to configure Home windows Server 2022 as a router.
Thanks for studying the information and I hope you discovered it useful. In case you did, let me know by responding to the “Was this web page useful?” suggestions request under.
You may additionally discover the articles within the “Associated Articles” part under tremendous useful. Thanks once more for stopping by.