DHCP is the full name of the Dynamic Host Configuration Protocol, its purpose is to reduce the TCP/IP network planning, management and maintenance of the burden of addressing the lack of IP address space. DHCP is divided into two parts: one is the server side, and the other is the client. All IP network settings are centrally managed by the DHCP server and are responsible for handling the DHCP requirements of the client, while the client uses the IP environment data that is assigned from the server. The DHCP protocol, through the concept of "lease", effectively and dynamically assigns TCP/IP settings to clients.
I. DHCPD process
DHCPD process to provide services to the network, you need to know the address and mask of the network, and also know the scope of the address assignment, which is the same as the requirements for the DHCP service under Windows System. The statement that specifies the network address and mask in the dhcpd.conf file is as follows:
Subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.10 192.168.1.253
# The DHCPD server will give the 192.168.1.0 network, assigning IP addresses from 192.168.1.10 to 192.168.1.253.
As we know from the Windows Server 2003 system DHCP server configuration process, we also need to configure the lease period for IP addresses, as well as in Linux systems. Configuring IP lease time requires only a simple two statements:
Default-lease-time # Configure Default lease time
Max-lease-time # Configure the maximum lease time that a user can get
The lease period can be from 0 seconds to an infinite length, depending on the need to set (in seconds). The default lease duration is one day, or 86,400 seconds. The following configuration sets the default lease time to 30 minutes and the maximum lease time is 8 hours:
Default-lease-time 1800;
Max-lease-time 28800;
In the Windows system DHCP server configuration, you can also configure options, such as routing, DNS servers, and so on Linux systems. It is specified with the option parameter, for example:
Option Routers 192.168.1.10 # Configure the default route to 192.168.1.10
Option domain-name-servers 192.168.1.1 # Configure DNS server address to 192.168.1.1