DHCP Overview
What Is DHCP?
DHCP stands for 'Dynamic Host Configuration Protocol'. DHCP is a standard way of automatically configuring client computers to access the Internet (e.g. allocating IP numbers and DNS servers). You have probably had some experience with dynamic IP allocation already. When a modem makes a PPP connection to an ISP, an IP number is often dynamically allocated to the modem.
What Does It Do?
DHCP is a means for networked computers to get their TCP/IP networking settings from a central server. Importantly, DHCP assigns IP addresses and other TCP/IP configuration parameters automatically. WinGate DHCP is different from other DHCP servers, in that it can even figure out what IP addresses to allocate without the administrator having to predefine pools of addresses (scopes). It can also figure out how to set the clients' gateway and several other parameters too, which means that not even the administrator needs to be a TCP/IP expert to operate the WinGate DHCP server. Full manual override of all automatic settings is also available in order to allow administrators to cater for their specific requirements.
Why is this better?
DHCP eases both TCP/IP and WinGate configuration. Before DHCP, all the computers on a network had to have unique private static IP addresses assigned to them and DNS also required configuration. Existing WinGate users may remember that client computer TCP/IP configuration had 6 stages, for each computer. Many options on the TCP/IP setup can be problematic, and one wrong setting can prevent a client from getting the desired access. With DHCP you simply install TCP/IP and nothing else is required, no IP number, no messing with DNS settings! The DHCP client is installed as part of TCP/IP. If you already have TCP/IP installed, you simply select "Obtain an IP address using DHCP" (Windows NT / 2000), or "Obtain an IP address automatically" (Windows 95 / 98) in Settings/Control panel/Network/Network protocols - TCP/IP / IP Address. If you want the easiest network setup, use DHCP. DHCP is recommended as insurance against IP conflict and configuration errors.
How Does It Work?
When Windows starts on a client computer, the DHCP client that is built into Windows TCP/IP sends a broadcast packet on the network requesting an IP address. Any DHCP server that hears this request sends a response, an 'offer' of an IP address. This IP address is chosen from a range of acceptable IP addresses configured in the DHCP server. Each range of IP addresses is referred to as a scope. The client can then 'accept' the IP address. Any further configuration information is also forwarded to the client at that stage, including DNS server details. When a client has had an IP lease for half the lease time, it will request a new lease. It may receive the same or a different IP number. WinGate records information about each active lease, and also integrates these with the WinGate rules, so you now have more information about the computers using WinGate.
How About My Static IP Addresses?
You do not need to worry about computers on your network that cannot use DHCP. They can still use their existing IP address. WinGate checks to see if it can ping an IP address before it will allocate it. If it can ping an address, it knows the address is in use, and so it will not allocate it to any other computer. You can also set excluded IP addresses in each scope that you create, or that WinGate creates for you (in Settings/Control panel/Network/Network protocols - TCP/IP / IP Address.)
What are Reservations?
Reservations are used if you want to guarantee that a specific computer will always be allocated a certain IP address, and that this address will not be allocated to any other computer. This is sometimes used where you have purpose-built applications that connect to specific hosts, which may themselves use DHCP to configure their networking. However, with WinGate's integration of DHCP with WinGate DNS, this will become largely redundant, as you are able to look up the IP addresses of computers by their computer name (Netbios name as opposed to their host name). Reservations are also used if you wish to specify specific TCP/IP settings on a computer-by- computer basis.
Changing to DHCP
If you have an existing network of statically assigned IP numbers, it is a simple job to change to a full DHCP network. The WinGate DHCP server is installed with default recommended settings. The WinGate server itself must have static IP addresses for its LAN cards. All other computers on your network can use DHCP. This is a fundamental requirement for all DHCP servers, not specific to WinGate. The IP addresses you allocate to your WinGate server LAN cards determine which addresses are allocated to computers on those networks. So, if you allocate 192.168.0.1 to one LAN card, all computers directly connected to that card (i.e. on the same subnet) will be allocated addresses between 192.168.0.2 and 192.168.0.254. If you have a multiple segment LAN, with routers between segments, these routers must run BOOTP relay agents (or DHCP relay agents - DHCP uses the BOOTP packet format so that DHCP packets can be forwarded by BOOTP relay agents). WinGate uses the IP address of the interface on a BOOTP forwarding agent that a request was made on to allocate addresses. Therefore, WinGate will always allocate IP addresses on the correct subnet. Network masks are taken from the RFC defining IP address ranges. Once the client computers are restarted, DHCP will take care of the IP's for you. Computers nearly always obtain the same IP they had previously.
How to Move From Manual to DHCP
For each client computer:
- In Start/Settings/Control panel/Networks/ Protocols /TCP-IP (for the LAN card), on the IP Address tab, change the selection from Specify an IP address to Obtain IP address automatically
- Click OK.
- Restart the computer. In the event of a conflict, simply restart the computer in question.
If you are currently using another DHCP server on your LAN, and wish to change over to the WinGate DHCP server, simply start the DHCP service in WinGate, and stop your other DHCP server. The client computers will attempt to renew their leases, and when they cannot communicate with their previous DHCP server, they will broadcast a request to all DHCP servers, at which stage WinGate will take over management of the lease.
DHCP Information
Configuring DHCP is easy. WinGate automatically installs a DHCP service. The default is Fully automatic DHCP mode, where IP ranges, DNS and all settings are provided. If you prefer to have more control over the settings, Manual mode allows total control.
These are some terms relating to DHCP:
- Subnet
- A subnet is a group of computers that are directly connected via coax or a hub. A computer with two network adapters will be on 2 subnets.
- Interface
- An interface is any connection to a network. This may be a Network card, modem, ISDN card or other TCP/IP capable device that is installed in a computer.
- Lease
- The length of time for which a dynamically assigned IP can be used. Before the lease expires, the client must renew the lease with the DHCP server.
- Reservation
- A Reservation is used to specify that a specific computer will always be allocated a specific IP address.
- Scope
- A Scope is a range of IP addresses, and associated TCP/IP configuration options. A DHCP scope comprises a pool of available IP addresses in a contiguous subnet. Each scope is used to define parameters for each subnet or interface. Each scope has the following properties:· Each scope is associated with an interface. This interface is the interface in WinGate that the DHCP client requests will come in on.· A scope name / description.· A subnet mask used to determine the subnet related to a given IP address.· Lease time to be assigned to DHCP clients with dynamic addresses.
- Exclusions
- Excluded IP ranges allow the administrator to say "Don't allocate these IP addresses to any computer". An exclusion range must lie within the scope. In Auto mode, the IP of the WinGate server is automatically added as exclusion.
- Option
- A DHCP option specifies a parameter that will be configured in a DHCP client, for example the DNS server, or the default gateway. There are options in DHCP on three levels. There are Global options, Scope options, and Reservation options. Reservation options override Scope options, which override global options.
Even in Fully automatic mode you are still able to manually configure any scopes and extra options. This mode simply refers to what WinGate will do automatically to help you, so if you have specific requirements, it can be useful to start out using fully automatic mode, and then do your own modifications later on.
Disabling WinGate DHCP
You can use the WinGate DHCP Server, another DHCP server, or none at all - it is completely up to you (though we recommend using WinGate DHCP). The WinGate DHCP Server will be installed and started by default.
