A Step-by-Step Guide to Configuring DHCP on Windows Server 2016 Using GUI and PowerShell.
Với GUI
1. Chạy các DHCP console từ danh sách ứng dụng. Hướng đến IPv4\Server Options. There we config Server options for all scopes;
2. Nút chuột phải bấm vào Server Options và bấm vào Configure Options;
3. Select option 006 DNS Servers, đi vào an IP address, và bấm vào Thêm vào;
4. Select option 015 DNS Domain Name, enter the domain name, và bấm vào ĐƯỢC RỒI;
5. New options added;
6. Nút chuột phải bấm vào IPv4 và bấm vào New Scope;
7. Nhấp chuột Kế tiếp;
8. Đi vào Tên (and if you wish Sự miêu tả), và bấm vào Kế tiếp;
9. Đi vào the Start IP address, End IP address, Và Subnet mask, và bấm vào Kế tiếp;
10. On this page, you may exclude the IP range from DHCP. Nhấp chuột Kế tiếp;
11. Bộ Lease Duration và bấm vào Kế tiếp;
12. You may select Đúng and configure Scope Options for this scope. tôi chọn KHÔNG, nhấp chuột Kế tiếp;
13. Nhấp chuột Hoàn thành;
14. Scope created, but we must Activate it;
15. Nút chuột phải click at the scope and click Activate;
16. Scope activated and worked!
17. If you Nút chuột phải bấm vào Leased IP Address, you may Add to the reservation Add to the filter, or even Xóa bỏ it;
Với PowerShell
1. Chạy PowerShell với tư cách là Quản trị viên. To get active scopes enter:
Get-DhcpServerv4Scope -cn <dhcp server name> | select scopeid, name, description
2. To add new scope, đi vào:
Add-DhcpServerv4Scope -Name ‘<scope name>’ -StartRange <start IP Address> -EndRange <end IP Address> -SubnetMask <subnet mask> -Description ‘<description>’ –cn <dhcp server name>
3. Before scope delete Thực hành tốt nhất is run the command with WhatIf tham số:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name> -WhatIf
4. Then run without the WhatIf tham số:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name>
5. Scope removed.