DHCP Past Life

Source: Internet
Author: User

What is DHCP?

DHCP, Dynamic Host Configuration Protocol, is a LAN protocol that belongs to the seventh layer of the OSI model, the highest layer, the application layer, which uses the UDP protocol to work

The main function is centralized management, assigning IP address, so that the host in the network environment to obtain the IP address, gateway address, DNS server address and other information, and can improve the use of the address.

The DHCP protocol adopts the client/server model (the common C/S model), and the dynamic assignment task of host address is driven by the network host. When the DHCP server receives the information from the network host request address, it sends the related address configuration information to the network host to realize the dynamic configuration of the network host address information.

DHCP supports three types of address assignment:

1. Automatic allocation method: DHCP assigns a permanent IP address to the host, and once the DHCP client has successfully leased from the DHCP server to the IP addresses for the first time, it will use this address 2 forever. Dynamic allocation mode: DHCP gives the host a "time limit (lease)" IP address, to the time (lease expiration) or the host explicitly give up this address (host active disconnection), this address can be used by other hosts, of course, the client can be more priority than other host continuation (renew) lease, or lease a different IP address 3. Manual allocation method: the IP address of the host is specified by the network administrator, it can be fixed by the MAC address to assign IP address,DHCP only the specified IP addresses to the host, equivalent to a Mac and IP was statically bound.

Three address assignment methods, only dynamic allocations can reuse addresses that clients no longer need.

Where do you use DHCP in your life?

The most common is the router, every person who has set up the router will enter the following familiar interface:


After the Setup wizard configuration is complete, there is no problem, but if you want the router to allow multiple wireless devices to be networked, you must go to the next step: Enable DHCP server on the DHCP server. Once enabled, the router restarts so that wireless devices can be networked.


At this point, in order to see the effect of the DHCP service, you can press the "win+r" shortcut to enter the state:


Enter cmd and OK to enter the following interface:


 

Input Ipconfig/all and enter to get the following interface:


 
 

You will find that the IPV4 address is 192.168.1.100, and this is due to the DHCP enabled feature mentioned above.

Now to differentiate between DHCP and DNS

DHCP is dynamic IP address assignment, DNS is the domain name resolution, the local connection inside the DNS is wrong to browse the Web.

Take the LAN as an example, do DNS is to visit the intranet site convenient and do. Because DNS is a domain name resolution, you can resolve the domain name to an IP address, so that we do not need to enter the Web site difficult to remember the IP address, as long as the site address, you can access. The local area network uses the DHCP server, is in order to let the LAN machine from the network DHCP server specified IP range automatically obtains the IP address, obtains the IP is the private network IP. And we use the automatic access, like the local area network, but the IP and DNS address is a public network from the DHCP server to obtain the dynamic public IP.

When using DHCP, you must have a DHCP server on the network, while other machines perform DHCP clients. When a DHCP client program issues a message that requires a dynamic IP address, the DHCP server provides an available IP address and subnet mask to the client based on the address that is currently configured.

DHCP allows the server to dynamically provide IP addresses to other servers in the network, and by using DHCP, it can no longer set up and maintain static IP addresses on any server in the intranet, except DHCP, DNS, and WINS servers, thus greatly simplifying the configuration of the client's tcp/ IP work, especially when certain TCP/IP parameters change, such as a large-scale reconstruction of the network, resulting in changes in IP addresses and subnet masks.

If you want to have a better understanding of the DHCP protocol, you can learn the format and content of the DHCP data message, preferably with the help of Wireshark and other software practice.

DHCP Past Life

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.