To set up a Windows Server 2019 domain controller, file server, small services, simple router with NAT, DHCP, DNS, and support for 2-3 VLANs on a single LAN port, follow the steps below:
Prerequisites
- Ensure you have a clean installation of Windows Server 2019.
- Prepare the necessary hardware, including a minimum of 2 network adapters: one for the management network (Domain Controller and DHCP) and another for the data network (File Server, Router, and VLANs).
Install Role and Features
- Press
Win + Xand selectWindows PowerShell (Admin). - Run the following command to install the Active Directory Domain Services (AD DS), DHCP Server, DNS Server, Routing and Remote Access, and File and iSCSI Services roles:
Install-WindowsFeature -Name AD-Domain-Services,DHCP-Server,DNS-Server,Routing,File-Services,iSCSI-Target -IncludeManagementTools
- Restart the server if prompted.
Configure DHCP Server
- Open the Server Manager and navigate to
DHCP > DHCP Server > Action > Configure DHCP scope. - Create a new scope for the data network, specify the IP address range, subnet mask, default gateway, and DNS servers.
- Assign the IP address of the management network interface as the DHCP server IP address.
- Click
Nextand complete the wizard.
Configure DNS Server
- Open the Server Manager and navigate to
DNS > Action > Configure the primary DNS server. - Click
Nexton the introduction page and selectConfigure the primary DNS server on this computer. - Select the appropriate IP addresses for the forwarders and root hints.
- Click
Nextand complete the wizard.
Configure Routing and Remote Access
- Open the Server Manager and navigate to
Routing and Remote Access > Routing and Remote Access Server Setup. - Click
Nexton the introduction page and selectCustom configuration. - Select the data network interface and click
Next. - Select
Routingand clickNext. - Click
Finish. - Open the Routing and Remote Access Manager console and navigate to
IP Routing > General > Action > New Routing Protocol. - Select
Routing Information Protocol (RIP) for IPand clickNext. - Select the data network interface and click
Next. - Click
Finish. - Create VLANs by right-clicking on the data network interface and selecting
Properties. - Under the
Advancedtab, clickNew VLAN IDand enter the VLAN ID number. - Repeat steps 10-11 for additional VLANs.
- Click
OKto save the changes.
Configure Active Directory Domain Services
- Open the Server Manager and navigate to
Active Directory Domain Services > Action > Install Active Directory Domain Services. - Follow the wizard to install the AD DS role.
- Restart the server if prompted.
- After the restart, open the Active Directory Domains and Trusts console and promote the server to a domain controller.
Configure File Server
- Open the Server Manager and navigate to
File and iSCSI Services > Shares > Action > New Share. - Create a new share for the data network, specify the share name, and select the data network folder.
- Click
Nextand complete the wizard.
Summary
This article provided a step-by-step guide to setting up a Windows Server 2019 domain controller, file server, small services, simple router with NAT, DHCP, DNS, and support for 2-3 VLANs on a single LAN port.