LINUX 7.4 DHCP Setup

Source: Internet
Author: User

1 DHCP

1.1 DHCP Service Introduction
DHCP (Dynamic Host Configuration Protocol), which is used to dynamically assign IP addresses and configuration of the associated network environment (gateway and DNS Server information) to hosts on a network segment, For example, we use ADSL dialing is the DHCP protocol used.
1.2 Use of DHCP
1, IP Address resources can not meet all the requirements of the subnet
2. Network with frequently changing IP addresses
1.3 How DHCP works
1. The DHCP client initializes TCP/IP and broadcasts a request message on the local physical subnet to determine the DHCP server location and its IP address. (If the DHCP server and the client are not on the same physical subnet, the BOOTP relay agent forwards the message to the DHCP server.) )
2. Because there may be more than one DHCP server on the network, any DHCP server with valid IP address information sends a proposal to the client.
3. The client selects the IP address information from the first proposal received and broadcasts a message request for the leased address.
4. The DHCP server issuing the proposal should respond to the message, specify the IP address information to the client and send a confirmation, and all other DHCP servers withdraw their proposals.
5, the client completes the TCP/IP protocol initialization and binding. Once configured, the client can use normal network communications and all IP services and applications that are used to connect to other IP hosts.

1.4 Installation configuration for DHCP
The procedure is as follows:
1.4.1 Installing the DHCP service
Yum–y Install DHCP

1.4.2 Copying profile templates
Overwrite/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example to/etc/dhcp/dhcpd.conf

1.4.3 Edit Master Profile detailed configuration DHCP address pool, Gateway
Vim/etc/dhcp/dhcpd.conf

1.4.4 Starting the DHCP service
Systemctl Restart DHCPD//Restart DHCP service
Systemctl Enable DHCPD//Restart DHCP service on next reboot
Systemctl status DHCPD//view the state of DHCP

1.4.5 Viewing DHCP ports
NETSTAT-TUNLP |grep DHCPD

1.4.6 test client gets IP address
Ifconfig

LINUX 7.4 DHCP Setup

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.