Step-by-step implementation of DHCP server in linux

Source: Internet
Author: User

Step-by-step implementation of DHCP server in linux

Environment
Redhat. Enterprise. Linux.5.8
Dhcp-3.0.5-31.el5
Content:
DHCP service Introduction
DHCP service configuration file
DHCP Service case
1. DHCP service Introduction
DHCP operation mode: the client transmits a broadcast packet to all the main sentences in the entire physical network segment. If a DHCP server exists in the LAN, the client will respond to the IP parameter requirements of the client, therefore, the DHCP server and the client must be in the same physical network segment. DHCP: network protocol configured for dynamic hosts
The connection process between the client and the DHCP server is shown in Figure 1.


1. Client: Use broadcast packets to send and search DNCP server packets
2. SERVER: provides lease options related to the client network.
3. Client: decides the network parameter lease provided by the selected DHCP server and reports it to the server.
Server
4. SERVER: record the lease and return the packet information related to the client.
2. DHCP configuration file details
The IP parameters that the DHCP server gives to the client: fixed and dynamic
Static IP: bind the NIC information of the client to the IP address to achieve the same IP address each time.
Dynamic IP: each time, a random IP address is selected from the unused IP address pool to assign to the client.
DHCP software: yum install dhcp
DHCP Data File

Main configuration file of DHCP: etc/dhcpd. conf
After the software is installed, the configuration file is not provided by default. However, a configuration sample document is provided for us. Just copy it and install it.
Cp/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample/etc/dhcpd. conf

Other Settings 2


DHCP server setup case
Demand Planning:

1. Install the dhcp service
Yum install dhcp
2. Configure the dhcp configuration file/etc/dhcpd. conf.

3. Start the dhcp service.
Service dhcpd start. If the configuration file is incorrect, the startup will fail. You can view the detailed startup information in/var/log/messages.
Figure 3, 4, and 5


4. Test
Linux host: Set to dhcp for automatic retrieval,


Restart the network service network restart and check the IP address, for example, 6, which is exactly the same as our plan ~~ Hey, I found it,


View the/var/log/messages log on the client, which records the detailed DHCP acquisition steps. Figure 7
 

View the resolve. conf file, as shown in figure 9.


Windows host test: 10


Information about the dhcp Client is recorded in/var/lib/dhcpd. leases, 11

Related Article

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.