A DHCP server can distribute IP addresses to client computers, but also other information such as: the DNS server to use, the address of the gateway (router), a boot file to download for a PXE boot network, ...
- For the clients receive IP addresses only from your DHCP server, you must connect your server and clients on a Switch (don't use a router). If you use a router, you must disable his DHCP server.
- For your clients can access the Internet, you have 2 options :
1. Enter the IP address of a router as the default gateway for your clients (by using the option 003 Router of your DHCP server).
2. Turn your server into a router by follow this (to do after the installation and the DHCP server configuration) : "Windows Server 2012 - NAT and network routing"
In this case, you'll need at least 2 NICs (Network Cards). One connected to the Switch (private network) and the other to the modem, switch, or the router where Internet is connected.
Before starting the tutorial, we will first set an IP address for the server. This IP address must be in the same IP address range that customers so that machines can communicate.
To do this, go to : Start Menu -> Control Panel -> Network Connections and right-click on "Local Area Connection".
In this tutorial, we will create a class scope A (10.x.x.x).
Here is the configuration of the Local Area Connection that we will use :
In the "Server Manager" window, click "Add roles and features."
Select "Application based on a role or a feature".
Select the server where you want to install your DHCP server.
Select the "DHCP Server" role.
The wizard displays a description of the DHCP server.
Small difference compared to Windows Server 2008, a small automatic configuration is required after installing the DHCP server. Click on the "Finish the DHCP configuration" link.
The wizard create security groups needed for the DHCP server.
The DHCP server is installed. Click Close.
To configure the DHCP server, launch the DHCP program.
Right click on the IP protocol to be used (in our case : IPv4) and click "New Scope".
Specify a name and a description, if you wish.
Specify the range of IP addresses to distribute to network computers.
Indicate the IP addresses to exclude from the range of IP addresses.
You create a range of IP addresses "10.0.0.2 to 10.0.0.50" but a server is configured with a static IP address "10.0.0.24". To prevent tha a computer receives this IP address (which would cause an IP address conflict), specify the IP address (in this example : 10.0.0.24) in the "Start IP Address" case. Then, click "Add".
Indicate the lifetime of an IP address. After this time, the client computer must request a new IP address from the DHCP server.
Choose "Yes, I want to configure these options now".
Enter the IP address of the router that clients use.
In our case, we will transform our server into a router. We have therefore indicated the IP address of our server as a router, but you can also use a physical router.
If you have an Active Directory installed on your network, you can specify the domain as the parent domain. (this isn't required)
For the DNS server, you can specify :
The WINS server translates NetBIOS computer names into IP addresses.
This is similar to the DNS server that translates domain names into IP addresses.
Select "Yes, I want to activate this scope now".
The new scope is configured.
In the DHCP window you will find :
To test our DHCP server, we connect a machine with Windows 7 on the same switch that our server. The network card of this machine is configured to automatically receive an IP address by DHCP (default configuration of a machine running Windows, Linux, ...)
As you can see, our client computer has received IP address "10.0.0.2" for him and IP address "10.0.0.1" as the default gateway and as a DNS server.
Note : If your client computer doesn't have Internet access, check that :
If you want to turn your server router, follow our tutorial : Windows Server 2012 - NAT and network routing
Windows Server 4/28/2012
Windows Server 8/8/2012
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2020 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.