8.2 DHCP server
Prev | Chapter 8 Configuration of network services | Next

## 8.2 DHCP server

The DHCP protocol (Dynamic Host Configuration Protocol) is used for easy TCP/IP configuration of hosts within the network. Upon an operation system start-up, the client host sends a configuration request that is detected by the DHCP server. The DHCP server selects appropriate configuration parameters (IP address with appropriate subnet mask and other optional parameters, such as IP address of the default gateway, addresses of DNS servers, domain name, etc.) for the client stations. All client parameters can be set at the server only — at individual hosts, enable the option that TCP/IP parameters are configured automatically from the DHCP server. For most operating systems (e.g. Windows, Linux, etc.), this option is set by default — it is not necessary to perform any additional settings at client hosts.

The DHCP server assigns clients IP addresses within a predefined scope for a certain period (lease time). If an IP address is to be kept, the client must request an extension on the period of time before the lease expires. If the client has not required an extension on the lease time, the IP address is considered free and can be assigned to another client. This is performed automatically and transparently.

So called reservations can be also defined on the DHCP server — certain clients will have their own IP addresses reserved. Addresses can be reserved for a hardware address (MAC) or a host name. These clients will have fixed IP address. These addresses are configured automatically.

Using DHCP brings two main benefits. First, the administration is much easier than with the other protocols as all settings may be done at the server (it is not necessary to configure individual workstations). Second, many network conflicts are eliminated (i.e. one IP address cannot be assigned to more than one workstation, etc.).

### DHCP Server Configuration

To configure the DHCP server in WinRoute go to Configuration → DHCP Server. Here you can define IP scopes, reservations or optional parameters, and view information about occupied IP addresses or statistics of the DHCP server.

The DHCP server can be enabled/disabled using the DHCP Server enabled option (at the top). Configuration can be modified even when the DHCP server is disabled.

### Definition of Scopes and Reservations

To define scopes including optional parameters and to reserve IP addresses for selected clients go to the Scopes dialog. The tab includes two parts — in one address scopes and in the other reservations are defined:

Figure 8.5. DHCP server — IP scopes

In the Item column, you can find subnets where scopes of IP addresses are defined. The IP subnet can be either ticked to activate the scope or unticked to make the scope inactive (scopes can be temporarily switched off without deleting and adding again). Each subnet includes also a list of reservations of IP addresses that are defined in it.

In the Default options item (the first item in the table) you can set default parameters for DHCP server.

Figure 8.6. DHCP server — default DHCP parameters

Lease time

  Time for which an IP address is assigned to clients. This IP address will be automatically considered free by expiration of this time (it can be assigned to another client) unless the client requests lease time extension or the address release.

DNS server

  Any DNS server (or multiple DNS servers separated by semicolons) can be defined. We recommend you to use the WinRoute's DNS module as the primary server (first in the list) — IP address of the WinRoute host. The DNS module can cooperate with DHCP server (see chapter 8.1 DNS module) so that it will always use correct IP addresses to response to requests on local host names.

WINS server

  IP address of the WINS server.

Domain

  Local Internet domain. Do not specify this parameter if there is no local domain.

Advanced

  Click on this button to open a dialog with a complete list of advanced parameters supported by DHCP (including the four mentioned above). Any parameter supported by DHCP can be added and its value can be set within this dialog.

Default parameters are automatically matched with address scopes unless configuration of a particular scope is defined (the Address Scope → Options dialog). The same rule is applied on scopes and reservations (parameters defined for a certain address scope are used for the other reservations unless parameters are defined for a specific reservation). Weight of individual parameters corresponds with their position in the tree hierarchy.

Select the Add → Scope option to view the dialog for address scope definition.

Note: Only one scope can be defined for each subnet.

Figure 8.7. DHCP server — IP scopes definition

Description

  Comment on the new address scope (just as information for WinRoute administrator).

First address, Last address

  First and last address of the new scope.

  Note: If possible, we recommend you to define the scope larger than it would be defined for the real number of users within the subnet.

Subnet mask

  Mask of the appropriate subnet. It is assigned to clients together with the IP address.

  Note: The Administration Console application monitors whether first and last address belong to the subnet defined by the mask. If this requirement is not met, an error will be reported after the confirmation with the OK button.

Lease time

  Time for which an IP address is assigned to clients. This IP address will be automatically considered free by expiration of this time (it can be assigned to another client) unless the client requests lease time extension or the address release.

Exclusions

  WinRoute enables the administrator to define only one scope in within each subnet. To create more individual scopes, follow these instructions:

  - create address scope covering all desired scopes

  - define so called exclusions that will not be assigned

  ### Example

  In `192.168.1.0` subnet you intend to create two scopes: from `192.168.1.10` to `192.168.1.49` and from `192.168.1.61` to `192.168.1.100`. Addresses from `192.168.1.50` to `192.168.1.60` will be left free and can be used for other purposes.

  Create the scope from `192.168.1.10` to `192.168.1.100` and click on the Exclusions button to define the scope from `192.168.1.50` to `192.168.1.60`. These addresses will not be assigned by the DHCP server.

  Figure 8.8. DHCP server — IP scopes exceptions

Parameters

  In the Address Scope dialog, basic DHCP parameters of the addresses assigned to clients can be defined:

  - Default Gateway — IP address of the router that will be used as the default gateway for the subnet from which IP addresses are assigned. IP address of the interface the network is connected to. Default gateway of another network would be useless (not available to clients).

  - DNS server — any DNS server (or more DNS servers separated with semicolons). We recommend you to use the WinRoute's DNS module as the primary server (first in the list) — IP address of the WinRoute host. The DNS module can cooperate with DHCP server (see chapter 8.1 DNS module) so that it will always use correct IP addresses to response to requests on local host names.

  - WINS server

  - Domain — local Internet domain. Do not specify this parameter if there is no local domain.

    ### Warning

    This parameter is not used for specification of the name of Windows NT domain!

Advanced

  Click on this button to open a dialog with a complete list of advanced parameters supported by DHCP (including the four mentioned above). Any parameter supported by DHCP can be added and its value can be set within this dialog. This dialog is also a part of the Address Scopes tab.

  Figure 8.9. DHCP server — DHCP settings

To view configured DHCP parameters and their values within appropriate IP scopes see the right column in the Address Scope tab.

Note: Simple DHCP server statistics are displayed at the right top of the Address Scope tab. Each scope is described with the following items:

- total number of addresses within this scope

- number and percentage proportion of leases

- number and percentage proportion of free addresses

Figure 8.10. DHCP server — statistics (leased and free IP addresses within the scope)

### Lease Reservations

DHCP server enables the administrator to book an IP address for any host. To make the reservation click on the Add → Reservations button in the Scopes folder.

Figure 8.11. DHCP server — reserving an IP address

Any IP address included in a defined subnet can be reserved. This address can but does not have to belong to the scope of addresses dynamically leased, and it can also belong to any scope used for exceptions.

IP addresses can be reserved for:

- hardware (MAC) address of the host — it is defined by hexadecimal numbers separated by colons, i.e.

  `00:bc:a5:f2:1e:50`

  or by dashes— for example:

  `00-bc-a5-f2-1e-50`

  The MAC address of a network adapter can be detected with operating system tools (i.e. with the `ipconfig` command) or with a special application provided by the network adapter manufacturer.

- host name — DHCP requests of most DHCP clients include host names (i.e. all Windows operating systems), or the client can be set to send a host name (e.g. the Linux operating system).

Click Advanced to set DHCP parameters which will accompany the address when leased. If the IP address is already included to a scope, DHCP parameters belonging to the scope are used automatically. In the Lease Reservation dialog window, additional parameters can be specified or/and new values can be entered for parameters yet existing.

Note: Another way to reserve an IP address is to go to the Leases tab, find the IP address leased dynamically to the host and reserve it (for details, see below).

### Leases

IP scopes can be viewed in the Leases tab. These scopes are displayed in the form of trees. All current leases within the appropriate subnet are displayed in these trees.

Figure 8.12. DHCP server — list of leased and reserved IP addresses

Note: Icon color represents address status (see below). Icons marked with `R` represent reserved addresses.

Columns in this section contain the following information:

- Leased Address — leased IP address

- Lease Expiration — date and time specifying expiration of the appropriate lease

- MAC Address — hardware address of the host that the IP address is assigned to (including name of the network adapter manufacturer).

- Hostname — name of the host that the IP address is assigned to (only if the DHCP client at this host sends it to the DHCP server)

- Status — status of the appropriate IP address; Leased (leased addresses), Expired (addresses with expired lease — the client has not asked for the lease to be extended yet), Declined (the lease was declined by the client) or Released (the address has been released by the client).

  Note:

  1. Data about expired and released addresses are kept by the DHCP server and can be used later if the same client demands a lease. If free IP addresses are lacked, these addresses can be leased to other clients.

  2. Declined addresses are handled according to the settings in the Options tab (see below).

The following columns are hidden by default (for details on showing and hiding columns, see chapter 3.2 Administration Console - view preferences):

- Last Request Time — date and time when the recent request for a lease or lease extension was sent by a client

- Lease Remaining Time — time remaining until the appropriate Lease Expiration

Use the Release button to release a selected IP address immediately (independently of its status). Released addresses are considered free and can be assigned to other clients immediately.

Click on the Reserve button to reserve a selected (dynamically assigned) IP address based on the MAC address or name of the host that the address is currently assigned to. The Scopes tab with a dialog where the appropriate address can be leased will be opened automatically. All entries except for the Description item will be already defined with appropriate data. Define the Description entry and click on the OK button to assign a persistent lease for the IP address of the host to which it has been assigned dynamically.

Note: The MAC address of the host for which the IP is leased will be inserted to the lease reservation dialog automatically. To reserve an IP address for a hostname, change settings of the Reservation For and Value items.

### DHCP server — advanced options

Other DHCP server parameters can be set in the Options tab.

Figure 8.13. DHCP server — advanced options

BOOTP

  If this option is enabled, the DHCP server will assign IP addresses (including optional parameters) also to clients of BOOTP protocol (protocol used formerly to DHCP— it assigns configurations statically only, according to MAC addresses).

Windows RAS

  Through this option you can enable DHCP service for RAS clients (Remote Access Service). You can also specify time when the service will be available to RAS clients (an IP address will be assigned) if the default value is not convenient.

  ### Warning

  1. DHCP server cannot assign addresses to RAS clients connecting to the RAS server directly at the WinRoute host (for technical reasons, it is not possible to receive DHCP queries from the local RAS server). For such cases, it is necessary to set assigning of IP addresses in the RAS server configuration.

  2. The RAS service in Windows leases a new IP address for each connection (even if requested by the same client). WinRoute includes RAS clients in total number of clients when checking whether number of licensed users has been exceeded (see chapter 4.6 User counter). This implies that repeated connection of RAS clients may cause exceeding of the number of licensed users (if the IP scope for the RAS service is too large or/and an address is leased to RAS clients for too long time). Remote clients will be then allowed to connect and communicate with hosts in the local network, while they will not be allowed to connect to the Internet via WinRoute.

Declined options

  These options define how declined IP addresses (DHCPDECLINE report) will be handled. These addresses can be either considered released and assigned to other users if needed (the Offer immediately option) or blocked during a certain time for former clients to be able to use them (the Declined addresses can be offered after timeout option).

Prev | Up | Next
8.1 DNS module | Contents | 8.3 Dynamic DNS for public IP address of the firewall