wiki.ipfire.org

The community-maintained documentation platform of IPFire

User Tools

Site Tools


en:configuration:network:dhcp

DHCP Server

A DHCP server will provide network information such as IP address, netmask, default gateway, dns-servers, ntp-servers and other to clients automatically. Read the Wikipedia article for more information. Simply put, a booting client tries to discover a dhcp server on the network it is connected to. If there is one active, it gets an offer for an IP address, and if it is accepted, it gets the information stated above. The assigned IP address can be taken from a defined range (a 'dynamic' pool) or can be statically assigned according to the client's MAC address.

In this example we will configure a standard IPFire installation to serve an internal network (Green).

The first two fields are the start and end address of the dynamic IP address range. With the current implementation this range must fit into a /16 net (netmask 255.255.0.0). In this example the DHCP server provides IP addresses 192.168.129.225 to 192.168.129.254. This means clients will be randomly assigned an IP in this range if they use DHCP.

Next the lease duration is set. The lease duration is the amount of time, in minutes, that IPFire waits before releasing a previously assigned IP address which is no longer in use. Usually the client refreshes the association at half of this time.

The option Domain Name Suffix is simply the name of the network workgroup or domain.

Next are the DNS server addresses.

Primary DNS. Specifies what the DHCP server should tell its clients to use for their Primary DNS server. Because ipfire runs a DNS proxy, you will probably want the Primary DNS server set to the ipfire box's Green IP address. Otherwise, if you have your own DNS server then specify it here.

Secondary DNS (optional). You can also specify a second DNS server which will be used if the primary is unavailable. This could be another DNS server on your network or that of your ISP. A list of free non-compromised DNS server can be found here.

The clients can use up to two ntp-server-addresses ntp-server for time synchronisation.
Primary NTP Server (optional). If you are using ipfire as an NTP Server, or want to pass the address of another NTP Server to devices on your network, you can put its IP address in this box. The DHCP server will pass this address to all clients when they get their network parameters.

Secondary NTP Server (optional). If you have a second NTP Server address, put it in this box. The DHCP server will pass this address to all clients when they get their network parameters.

Enter the WINS Server address in the next field. It provides windows name resolution for your network. If you have samba with WINS support running on your IPFire and you don't have a dedicated WINS server, you should enter the IPFire address here.

The fields next-server and filename are used to supply an operating system to diskless workstations (see RFC2131).

Configure options on the Interface

In the second section additional options for DHCP can be configured, activated and deactivated. Also, DHCP can be set to listen on a specific interface, typically the Green interface or use a global scope. The button “List options” shows a lot of additional options, that can be used. In this section one can specify the WPAD information.

Assign fixed IP Addresses

This section is responsible for the static allocation of IP addresses. Using the MAC Address of a network card, the same IP address can be assigned every time the client boots. This gives you the benefits of a static IP without having to configure anything on the client. All clients not listed here, get their IP address from the 'dynamic' range set above.

You must not use an IP out of the range for dynamic allocation defined above for static assigment!

Show Leases

In this last section, dynamic leases are listed with the associated MAC addresses and expiration time. Clients that already have a “MAC assigned” address (fixed leases) and clients with a static IP address (manually set) will not be listed. The “Add” button will add the client definition (MAC address) to the set of fixed leases. This definition should be edited to assign an IP address not in the dynamic address pool.

Translations of this page?:
en/configuration/network/dhcp.txt · Last modified: 2016/07/28 23:21 by sanex