From definition to configuration, describe the router DHCP Function

Source: Internet
Author: User
Tags resolve ip address dedicated server domain name server

In the process of learning DHCP, We need to master a lot of content, such as the configuration of these routers and switches. This time, we will systematically explain the configuration of the router DHCP function. Hope to help you.

I. vrodhcp DHCP Function

1. Dynamic Host Configuration Protocol DHCP)

Static and Dynamic IP addresses are allocated. Static allocation means that the network administrator assigns a fixed IP address for each network site, which is permanently occupied by each network site. Dynamic Host Configuration Protocol (DHCP) is used for Dynamic Allocation and allocation. DHCP is requested by the network site, the DHCP Server automatically obtains the TCP/IP attribute information related to the IP address of the default gateway, domain name, and DNS Server. After the network site exits, the address is automatically released. This dynamic IP Address Allocation method may make the network site obtain different addresses each time. Therefore, the dynamically assigned IP address is a temporary and unfixed address.

2. DHCP features

Dynamic Allocation is mostly used in a network environment where IP Address resources are lacking. Its advantage is that it reduces the workload for network administrators to manage and assign IP addresses and makes full use of IP Address resources; it simplifies the tedious program for network users to Configure TCP/IP attributes, making the configuration of TCP/IP attributes very simple. However, DHCP still cannot resolve IP address conflicts.

Ii. How DHCP works

1. DHCP Client/Server Functions

DHCP works in Client/Server mode. DHCP Server) mainly implements two functions: one is to establish and manage an IP address pool, and the address pool provides a valid and continuous set of IP addresses for DHCP clients to dynamically allocate addresses, the default gateway, subnet mask, and IP address of the domain name and Domain Name Server for each subnet are also available. Another and most important function of the DHCP server is to receive and process DHCP requests from DHCP clients.

The working principle of the DHCP Client is much simpler than that of the server. Its main function is to submit a DHCP Application and request the DHCP server to lease an IP address, and receives and uses the IP address temporarily allocated to it by the DHCP server for network connection.

2. How DHCP works

The DHCP protocol allows Multiple DHCP servers to be configured on the network. When a DHCP client sends a DHCP request, it may receive multiple responses. At this time, the DHCP Client selects only one of them, usually the first information to arrive. At the same time, the DHCP Client establishes a lease relationship with the selected DHCP server. After the lease relationship is established, the DHCP Client obtains the IP address and other TCP/IP attribute information only from the DHCP server with the lease relationship. In addition, the DHCP protocol allows you to back up the DHCP server. The DHCP server allocates and manages IP addresses for DHCP clients from the IP address pool of the router. When the address pool cannot meet the DHCP client's request, it can forward the request to one or more backup DHCP servers. The backup DHCP server can process the request to improve the reliability of DHCP.

A DHCP server can be a PC running Windows, a dedicated server running Unix, or a vro or layer-3 switch. DHCP clients are any computers or data terminals connected to the network.

All the interactions between the customer and the server are completed by the Dynamic Host Configuration Protocol DHCP control.

Iii. configuration of the router DHCP Function

Set the vrodhcp as a DHCP server. The configuration task to be completed on the vro is to set up an IP address pool and configure parameters related to the IP address pool. First, you need to configure the IP address Pool name and enter the DHCP Pool configuration mode. In DHCP Pool configuration mode, configure parameters such as the subnet address and subnet mask of the IP address Pool, default gateway, IP address of the domain name and Domain Name Server, IP address lease time, and address conflict cancellation log. The configuration of these parameters is the basic configuration for setting a vrodhcp as a DHCP server.

1. Configure the IP address pool name

The first step of DHCP Server on a vro is to create an address pool. To create an address Pool, use the "ipDHCPpool <name>" command bit address Pool to assign a name. After the command is executed, the router enters the DHCP Pool configuration mode, in this mode, DHCP parameters are suspicious. The address pool name can be a string or number. Command Format: "ipDHCPpool <name> ".

2. Configure the subnet address and subnet mask of the IP address pool.

The subnet address is the valid IP address range that the DHCP server can assign to the DHCP client. To configure the subnet address and subnet mask, run the "network <network address> <subnet mask>" command in DHCP Pool configuration mode.

The subnet mask parameter is given in two forms, one is four vertices in decimal number limit 255.0), and the other is the length of each mask prefix, and the number of mask bits as "1". For example, "255.255.255.0" can be written as "/24 ".

In global configuration mode, use the "ipDHCPexcluded-address" command to exclude the addresses to be retained from the address pool. In this way, the IP address that can be allocated to the DHCP client will be excluded.

Command Format for configuring the subnet address and subnet mask of the IP address pool for the vrodhcp DHCP function:

Network <network-number> [mask/prefix-length]

Configure the command format for IP addresses not dynamically allocated:

IpDHCPexcluded-address low-address [high-address]

3. Configure the default gateway for the IP address pool

In DHCP Pool configuration mode, run the "default-router address" command to run up to eight Gateway addresses.

Configure the Command Format of the default gateway for the IP address pool:

Default-router address [address2. .. address8]

4. Configure the Domain Name System of the IP address pool

The domain name system of the IP address pool is used to specify a Domain Name and Domain Name Server for DHCP clients. You also need to configure the Domain Name System in the TCP/IP attribute of the DHCP client. The domain name specifies the network group composed of the domain where the DHCP Client is located. The Domain Name Server supports the IP address of the server for domain name resolution for DHCP customers. The IP address Pool domain name configuration method is to use the domain-name command in DHCP Pool Mode. You can also use the "dns-server address" command in DHCP Pool Mode to configure the IP address of the Domain Name server. This command allows you to configure a maximum of eight Domain Name Server addresses. However, in practice, there are generally only two or three domain name servers.

Configure the Domain Name of the IP address pool. Command Format:

Domain-name <name>

Configure the IP address of the Domain Name Server in the IP address pool. Command Format:

Dns-server address [address2. .. adress8]

5. Configure the IP address pool IP address lease time for the router DHCP Function

The IP address lease time is mainly used to adjust the lease time of the IP address that the DHCP server assigns to the DHCP client. Generally, the default lease time is one day. You can use the "lease" command to change this value in DHCP Pool Mode.

Configure the address lease time of the IP address pool. Command Format:

Lease {days [hours] [minutes] | infinite}

6. Cancel the address conflict log

Dhcp of a vro allows you to configure a DHCP database proxy. The DHCP database proxy is a host used to store DHCP binding information. It can be an FTP, TFTP, or RCP server. You can use the "no ipDHCPconflict logging" command to cancel the record of address conflict logs.

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.