For your PC to communicate over a network, you must have TCP IP setting correctly set. Instead of manually managing this PC by PC, simply add to your network a DHCP
Dynamic Host Configuration Protocol server will then distribute your network addresses from your PC and record them correctly in your DNS database.
The DHCP role will allow you to do so many things with Windows Server 2008 R2. DHCP Dynamic Host Configuration Protocol allows automatic network configuration of a machine. So the server provides the TCP / IP services like:
- IP Address
- Subnet Mask
- Gateway
- The domain name
- The NetBIOS node type
These addresses are allocated by some following leases. The lease is set depending on the type of machine in your network and the number of available addresses. If you have a small range of addresses then it must be used for short leases (1-2 days). The same applies to the use of such mobile stations (wireless) and a lease shall not exceed 1 day. In the case of fixed stations Microsoft recommends lease of 8 days. Depending on your network topology that value can be changed.
- The DHCP server keeps logs of network addresses allocated to clients. It's easy to find a machine source of trouble (scan network, unauthorized access to the internet, etc)
- By default the database and logs on Windows Server 2008 are stored in C: \ Windows \ System32 \ dhcp
- Backups of Logs are when to them in C: \ Windows \ System32 \ dhcp \ backup
Setup by Wizard
- Before installing the DHCP server make sure that your server has a static IP address.
- Then add the DHCP server role from the Server Manager MMC
- Then you must indicate on what network card the server listens for requests from DHCP clients (several maps may be included)
- It should then specify the DNS domain (leave blank if absent) and the DNS server primary and secondary eventuellment). Note that by default the primary DNS server address is locahost server (127.0.0.1). Customers could not communicate with the server should the IP address of our server.
- Then if WINS is used on your network enter the IP address of the WINS server
- It must then configure the DHCP scope. Ie the IP address range and DHCP options to guests.
- If the DHCP server does not have permission to serve these clients should be indicated on the Domain Controller server. Otherwise let ol credentials by default. It should activate the scope if you have not already done so.
- Finally, if you have or you plan to install WDS server I recommend you to activate Bootp. Right click and ownership of the space, then the Advanced tab.
- If you want to change the location of the basic DHCP leases must go into the properties of the DHCP server and then specify the new location. It will restart the services for the changes to take effect.
Setup via Powershell command line:
To install the role we will use a module introduced with PowerShell V2. This module is included natively in Windows Server 2008 R2 but not in 2008. You have to install
PowerShell V2 to use it. You would get the list of services installed and available by typing Get-WindowsFeature.
To configure the server you automate the service launch on startup of the machine to activate the service:
- Set-Service-name-DHCPServer StartupType automaticly
- Set-Service-name-status running DHCPServer
To configure the server will use the Netsh command which is located in the system32 folder.
- netsh dhcp server add-TST-SRV 01.corp.test.local 000.00.0.00
It adds the address range to our previously established range :
- netsh dhcp server scope xxxxxxxxxxxxxxxx add iprange
- netsh dhcp server scope 000.00.0.0 255.255.255.0 000.00.0.00 add
By this you can add exclusion range :
- netsh dhcp server scope xxxxxxxxxxxxxxxx add excluderange
It adds to the depth Default Gateway for the subnet. It adds two DNS servers. :
- netsh dhcp server scope xxxxxxxxxxxx set optionvalue 003 IPADDRESS xxxxxxxxxxxxxxxxxxx
Bookmarks