DHCP Configuration
DHCP Server
Section titled “DHCP Server”| Setting | Value |
|---|---|
| Server | srv-dc-zrh-01 |
| IP | 10.30.30.10 |
Installation
Section titled “Installation”# Install DHCP roleInstall-WindowsFeature DHCP -IncludeManagementTools
# Authorize in ADAdd-DhcpServerInDC -DnsName "srv-dc-zrh-01.microsoftlab.ch" -IPAddress 10.30.30.10
# Flag as configuredSet-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\ServerManager\Roles\12" -Name "ConfigurationState" -Value 2Scope: zrh-srv-v30 (VLAN 30)
Section titled “Scope: zrh-srv-v30 (VLAN 30)”# Create scopeAdd-DhcpServerv4Scope -Name "zrh-srv-v30" ` -StartRange 10.30.30.100 ` -EndRange 10.30.30.200 ` -SubnetMask 255.255.255.0 ` -LeaseDuration 8.00:00:00 ` -State Active
# Set optionsSet-DhcpServerv4OptionValue -ScopeId 10.30.30.0 -Router 10.30.30.1Set-DhcpServerv4OptionValue -ScopeId 10.30.30.0 -DnsServer 10.30.30.15, 10.30.30.10Set-DhcpServerv4OptionValue -ScopeId 10.30.30.0 -DnsDomain "corp.microsoftlab.ch"Scope: zrh-clt-v40 (VLAN 40)
Section titled “Scope: zrh-clt-v40 (VLAN 40)”# Create scope (/22 subnet)Add-DhcpServerv4Scope -Name "zrh-clt-v40" ` -StartRange 10.40.40.100 ` -EndRange 10.40.43.254 ` -SubnetMask 255.255.252.0 ` -LeaseDuration 8.00:00:00 ` -State Active
# Set optionsSet-DhcpServerv4OptionValue -ScopeId 10.40.40.0 -Router 10.40.40.1Set-DhcpServerv4OptionValue -ScopeId 10.40.40.0 -DnsServer 10.30.30.15, 10.30.30.10Set-DhcpServerv4OptionValue -ScopeId 10.40.40.0 -DnsDomain "corp.microsoftlab.ch"DHCP Relay
Section titled “DHCP Relay”DHCP relay is configured on UniFi Gateway to forward DHCP requests from VLANs 30 and 40 to srv-dc-zrh-01.