Summary and use of DHCP protocol commands

  
                  

For the DHCP protocol, it is something that everyone must focus on in terms of hands-on operation. So let's talk about the contents of the DHCP protocol command. Then, sometimes, DHCP services are integrated on some high-end network devices (routers, switches), and we can implement DHCP services on network devices without using a dedicated host as a DHCP server to save costs.

Below is an example of configuring DHCP on a cisco router.

DHCP Protocol Command 1. Specify the range of IP addresses not automatically assigned

ip dhcp excluded-address 10.1.1.1 10.1.1.19 //Specify from 10.1.1.1 to 10. The IP address of 1.1.19 is manually assigned.

DHCP Protocol Command 2. Set DHCP Protocol Address Pool

ip dhcp pool global //This command specifies the name of the DHCP address pool. Network 10.1.0.0 255.255.0.0 //The dynamically assigned IP address range, here is the IP address of the 10.1.0.0 network segment (except the previously specified non-automatically assigned address)

DHCP Protocol Command 3. Set DHCP protocol additional information

domain-name client.com //Configure the domain suffix dns-server for the client 10.1.1.1 10.1.1.2 //Configure the address of the DNS server for the client, here is 10 .1.1.1 and 10.1.1.2 netbios-name-server 10.1.1.5 10.1.1.6 //Configure the WINS server address for the client, here 10.1.1.5 and 10.1.1 .6 netbios-node-type h-node //Configure the node mode for the client (impact the name interpretation, such as h-node is explained first by the wins server) defaul T-router 10.1.0.100 10.1.0.101 //Configure the default gateway for the client

DHCP protocol command 4. Set the lease duration

lease 8 //Set the lease time to 8 days

DHCP protocol command 5. Sometimes we need to set the sub-address pool of the DHCP protocol server. For example, we want the client's gateway of the network segment 10.1.1.0/24 to be 10.1.1.100. We set this:

ip dhcp pool subglobal network 10.1.1.0 255.255.255.0 //global sub-address pool, inherit the domain name from global option, etc. default-router 10.1.1.100 10.1.1.101 //Configure the default gateway for the client

DHCP protocol command 6. Related DHCP debugging commands

no service dhcp //Stop DHCP protocol service show ip dhcp binding //Show address allocation show ip dhcp conflict //Show address conflicts.

Copyright © Windows knowledge All Rights Reserved