Use of DHCP hosts

Source: Internet
Author: User

We know that the DHCP protocol is very powerful. in the network, it can handle a lot of IP Address Allocation work. We have also introduced the construction of DHCP servers in the previous article. Here we will mainly explain some applications of DHCP hosts.

What is the main purpose of DHCP?

The main purpose of a DHCP host is to automatically allocate network parameters to the Client computer to reduce possible IP conflict problems in the domain and reduce the headache of network administrators for checking errors everywhere!

What are the two main IP Address Allocation Modes of DHCP?

The two main allocation modes are Dynamic IP and Static IP respectively. Static IP is compared through MAC, as for Dynamic IP, is the distribution of Client directly using unused IP addresses in the domain?

The following network parameters must be configured for accessing the Internet in Linux:

IP, netmask, network, broadcast, gateway, DNS IP

IP, netmask, network, broadcast, and gateway are both in/etc/sysconfig/network-scripts/ifcfg-eth [0-n]

The DNS address is set in/etc/resolv. conf. can I access the Internet using the NAT host function?

The main task of a DHCP (Dynamic Host Configuration Protocol) Host is to have a Host automatically allocate all network parameters to computers in the network? That is, the network parameters are automatically allocated to each computer in the domain, so that the computer on the user end can automatically set the network parameter value at startup, can these parameter values include IP addresses? Netmask? Network? Gateway and DNS address?

DHCP operation mode:

DHCP is usually a communication protocol in the regional network. It transmits broadcast packets to all hosts in the entire physical network segment through the client. If there is a DHCP host in the regional network, will it respond to the client's IP parameter requirements? Therefore, should the DHCP server and the client be in the same physical network segment? The procedure for obtaining IP Parameters on the client can be simplified as follows:

1. The client needs to use broadcast packets to send DHCP requests:

If the client sets DHCP to be used to obtain the IP address (in Windows, the IP address is automatically obtained), when the client starts up or restarts the network card, will the client host send DHCP requests to all computers in the physical network segment? The target IP address of this packet will be 255.255.255.255. Therefore, generally, the host will directly discard the packet after receiving the packet. But what will happen if there is a DHCP server in the regional network?

2. DHCP host Response Message:

After receiving the requirements of the client, the DHCP host performs the following operations on the hardware address (MAC) and configuration information of the client:

Go to the server logon file to check whether the user has used an IP address before. If there is an IP address that is not currently in use, provide the IP address to the user;

If the configuration file provides additional static IP addresses for the MAC, the IP address is set;

If the two conditions are not met, the unused IP address is randomly used and recorded?

The client accepts parameters provided by the DHCP server and sets its network environment:

If everything is fine, the client will accept the obtained IP address and start to process its own network environment, including rewriting/etc/resolv. conf and so on. Will a confirmation packet be sent to the DHCP server to confirm that this parameter has been accepted?

The DHCP server records the lease behavior:

After the user side returns a message to establish a lease, the lease appointment is recorded in the logon file of the host and the lease timing starts! When the lease will expire and the contract will be canceled, you can think like this:

Offline client: whether it is to disable the network interface (ifdown )? Restart (reboot )? Shutdown and other behaviors are considered offline. At this time, the Server recycles the IP address and places it in the Server's standby zone for future use;

Client lease expiration: As mentioned earlier, the IP address issued by the DHCPserver has a validity period. When the client uses this IP address to reach the specified validity period and does not submit a DHCP Application again, you need to pay back the IP address! This will cause a disconnection, and the user can request another IP Address Allocation to the DHCP host?

The above is the operation status of the DHCP protocol on the Server and Client. From the above operation status, we can know that as long as the Server is set to no problem, in addition, the Server and Client are confirmed to be OK on the hardware connection, so the Client can directly obtain network parameters for Internet access through the Server. Of course, as long as these administrators can do well? Correct management of DHCP makes it easy to set up the Internet!

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.