Installation and configuration of dhcp service on CentOS

Source: Internet
Author: User

1. Single-scope dhcp service in linux

(The infrastructure of this training is the host of the linux enterprise 5.4 System and the host of winxp in the VMware Workstation Virtual Machine)

1. Mount the CD and install the dhcp software package.

2. Run rpm-ql dhcp | less to view various files generated after the software package is installed.


3. Copy the sample file of the configuration file to the configuration file and modify it accordingly.


After configuring the dhcp configuration file, enter service dhcpd start to start the service.

4. Enable the client and enable the address auto-retrieval function. In addition, you must note that the virtual machine originally provides the dhcp service. In order not to affect our experiment, here we need to configure in the Virtual Machine editing --- Virtual Network Editor (as shown in), and set the network connection mode to host-only.

5. Check the server logs and find that the IP address 192.168.2.253 is assigned to the client. (the working principle of the dhcp service and other basic knowledge can be found in another blog 《Talking about the dhcp service)


View Client IP addresses and other parameters


6. Release the client and obtain the IP address again.

On the client command line interface, enter ipconfig/release to release the IP address and observe the log on the server.



Enter ipconfig/renew in the command line interface of the client to obtain the IP address again and observe the log on the server.




7. address exclusion and address binding

Sometimes some addresses do not need to be assigned to the customer, so we need to write the addresses in segments to exclude them. In addition, if some client addresses require static configuration, We need to bind the ip address to the mac address.

Configure parameters in the dhcp configuration file

8. Release the IP address again on the client, and then observe the log on the server.


2. Implement super-scope dhcp service on linux

(The infrastructure for this training is the linux enterprise 5.4 System host, winxp host, and win2003 host in the VMware Workstation Virtual Machine)

1. When the network environment is large, the scope of the Order is obviously not enough. In this case, the super scope is used to merge Multiple scopes into a large scope. After the client selects the addresses in one scope, it selects the addresses from another scope. Due to the limited environment, we can only set one address for the address pool in the scope, configure the following in the dhcp configuration file:

Restart the service after Configuration

2. Enable the client of the XP system and release and obtain the address again. The log on the server is as follows:


Enable the win2003 client and set it to automatically obtain the ip address. The log on the server is as follows:



This article is from the "xiaoxiaozhou" blog, please be sure to keep this source http://xiaoxiaozhou.blog.51cto.com/4681537/1291954


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.