How the home wireless router opens the DHCP service

Source: Internet
Author: User
Tags ack

In the process of setting up a wireless AP or wireless router, users will encounter a lot of parameters, if only to complete the general settings, to meet the general needs of the Internet, there are some parameters do not need in-depth understanding. But in some more complex network environment, we may need some parameters for the corresponding configuration, today we will take a look at the wireless router is one of the more used parameters: DHCP.

I. The role of DHCP

Let's take a look at what is dhcp,dhcp (Dynamic host Configuration Protocol), which can automatically assign IP addresses, subnet masks, and TCP/IP parameters such as default gateways and DNS server addresses to clients. In simple terms, there is a database on the DHCP server that holds the IP address, gateway, DNS, and other parameters. When a client requests to use, the server is responsible for assigning the appropriate parameters to the client. To prevent clients from manually assigning IP addresses, etc... Especially in a number of large-scale networks. The number of clients, the use of DHCP can facilitate the management of these machines, to provide clients with TCP/IP parameter configuration, such as IP address, gateway address and DNS server, not only high efficiency, and there is no IP address conflict situation. Now the wireless router defaults to DHCP, which means that a wireless router is also a DHCP server.

Second, the working process of DHCP:

So how does a client get an address from a DHCP server (that is, our wireless router or wireless AP)?

▲DHCP Work Process

1.DHCP DISCOVER: Finding servers

When a DHCP client logs on to the network for the first time or when it is powered on, the computer discovers that there are no IP address settings on this machine and then broadcasts to the network for a DHCP server. The packet's source address is 0.0.0.0, and the destination address is 255.255.255.255.

2. DHCP offer allocation IP address

When the wireless device to hear the client sent to find the server packet, it will be from those not yet assigned to the IP address, select the front of the free IP, to the client a distribution IP address, but here is only the allocation, the client has not really applied.

3. DHCP Request Requests use

The client receives the assigned IP address packet sent back by the wireless device, and the client sends an ARP packet to the network, confirming that no other machine in the network uses the IP address, and if so, repeat the action in step 1; if not, accept the IP address. and sends a DHCPREQUEST packet to the wireless router, which is the DHCP server, and requests that this address be used.

4. DHCP ACK IP Address assignment Confirmation

When the wireless device receives the client's DHCPREQUEST packet, it sends a DHCPACK response to the client to confirm that the IP address is formally in effect and ends a complete DHCP work process.

When this process completes, the DHCP client then logs on to the network without having to send the DHCP Discover discovery information, instead sending the DHCP request request information containing the previously assigned IP address directly. When the DHCP server receives this information, it attempts to have the DHCP client continue to use the original IP address and answer a DHCP ACK acknowledgement. If this IP address is no longer available to the original DHCP client, the DHCP server answers a DHCP nack denial message to the DHCP client. When the original DHCP client receives this DHCP Nack denied information, it must resend the DHCPDISCOVER discovery information to request a new IP address.

However, the IP address leased by the DHCP server to the DHCP client generally has a lease period, and the DHCP server will reclaim the leased IP address after its expiration. If the DHCP client wants to extend its IP lease, it must update its IP lease. When the DHCP client starts and the IP lease expires in half, the DHCP client automatically sends information to the DHCP server updating its IP lease.

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.