DHCP configuration in the Linux network environment-Linux Enterprise Application-Linux server application information. For details, refer to the following section. As you know, DHCP (Dynamic Host Configuration Protocol) enables the client to automatically obtain an IP address from the server. How to configure the DHCP Server is easy to implement in Windows 2000 Server. Can it be implemented in Linux? The answer is yes. As we all know, Linux is a very good network operating system. Using it, you can easily build a high-performance DHCP server. This article describes how to use red-flag Linux Server 2.0 to set up DHCP.
First, let's take a look at the DHCP process and see what means the client obtains the IP address. When DHCP is started, TCP/IP is initialized and the client sends a dhcp discover packet to apply for an IP address from the DHCP server. After receiving dhcp discover, the DHCP server will provide it with an unallocated IP address from the address pool of the client host. The message is returned to the above host. The client then sends a packet containing the IP address provided by the DHCP server. The DHCP server sends back a response packet containing the IP address and its allocation scheme. There is a time limit for the IP address provided by the DHCP server to the client. to continue using the IP address, the DHCP Client must update and renew the IP address when the lease period ends.
The following describes how to configure the DHCP server:
The DHCP service is provided through the Program/usr/sbin/dhcpd. When the DHCP server is started, dhcpd needs to read the content of the dhcpd. conf file (dhcpd. conf stores the configuration information of the DHCP server ). Dhcpd saves the information rented by the client in the dhcpd. lease file. The lease information will be recorded in this file before the DHCP server provides an IP address for the customer. The new lease information is added to the end of dhcpd. leases. To provide DHCP services to a subnet, dhcpd needs to know the subnet network number and subnet mask. And the address range.
The following describes the content of my DHCP server configuration file.
File Name:
/Etc/dhcpd. conf
Content:
CODE: subnet 192.168.0.0 netmask 255.255.255.0 {range 192.168.0.10 192.168.0.30; default-lease-time 86400; max-lease-time 604800; option subnet-mask 255.255.255.0; option routers 192.168.0.2; option domain-name "cy.com"; option broadcast-address 192.168.0.255; option domain-name-servers 192.168.0.3 ;} |