Set detailed procedures and configuration commands for the DHCP server

Source: Internet
Author: User

We usually use DHCP servers through routers and switches. Here we will learn about setting up DHCP server instances on the Cisco650 device. A customer wants to migrate the dhcp server to the msfc of the 6509 switch. Don't use tears to touch love. The requirements are quite complicated:

1. Allocate addresses for multiple VLAN clients at the same time

2. Some IP addresses in a VLAN are manually allocated.

3. Specify the gateway and Wins server for the customer

4. The IP address lease term for VLAN 2 is one day, and the other is three days.

5. assign a specified IP address to a specific user based on the MAC address

The final configuration is as follows:

 
 
  1. Ip dhcp excluded-address 10.1.1.1 10.1.1.19 // address not used for Dynamic address Allocation
  2. Ip dhcp excluded-address 10.1.1.240 10.1.1.254
  3. Ip dhcp excluded-address 10.1.2.1 10.1.2.19
  4. !
  5. Ip dhcp pool global // global is the pool name, which is specified by the user
  6. Network 10.1.0.0 255.255.0.0 // dynamically assigned address segment
  7. Domain-name client.com // configure the domain suffix for the client
  8. Dns-server 10.1.1.1 10.1.1.2 // configure the dns server for the client
  9. Netbios-name-server 10.1.1.5 10.1.1.6 // configure the wins server for the client
  10. Netbios-node-type h-node // configure the node mode for the client to affect the smooth interpretation of the name, for example, h-node = explain through the wins server first ...)
  11. Lease 3 // address lease period: 3 days
  12. Ip dhcp pool vlan1
  13. Network 10.1.1.0 255.255.255.0 // This pool is a global sub-pool. Why can't we afford it? We will inherit domain-name and other options from the global pool.
  14. Default-router 10.1.1.100 10.1.1.101 // configure the default gateway for the client
  15. !
  16. Ip dhcp pool vlan2 // pool configured for another VLAN
  17. Network 10.1.2.0 255.255.255.255.0
  18. Default-router 10.1.2.100 10.1.2.101
  19. Lease 1
  20. !
  21. Ip dhcp pool vlanw.john // always allocates a... address for the host whose MAC address is...
  22. Host 10.1.1.21 255.255.255.0
  23. Client-identifier 010050. bade.6384 // client-identifier = 01 with the client NIC address
  24. !
  25. Ip dhcp pool vlan1_tom
  26. Host 10.1.1.50 255.255.255.0
  27. Client-identifier 010010.3ab1.eac8

Related DHCP Debugging commands:

 
 
  1. No service dhcp // stop the DHCP service [DHCP service is enabled by default]
  2. Sh ip dhcp binding // displays Address allocation information
  3. Show ip dhcp conflict // display address conflict
  4. Debug ip dhcp server {events | packets | linkage} // observe the working status of the DHCP server

If the DHCP client is not assigned an IP address, there are two common causes. The first case is that the port connecting to the client is not set to Portfast. After the MS Client is started, it checks that the network adapter is connected normally. When the Link is UP, it starts to send the DHCPDISCOVER request. At this time, the switch port is undergoing Spanning Tree computing and generally takes 30-50 seconds to enter the forwarding status, alfred was cologne for men on a rainy day. If the MS client does not receive a response from the dhcp server, it will set a 169.169.X.X IP address for the NIC, skf bearing. The solution is to set the switch port to Portfast mode: CatOS (4000/5000/6000): set spantree portfast mod_num/port_num enable, club cohiba san antonio; IOS (2900/3500 ): interface ...; spanning-tree portfast.

In another case, the DHCP server and the DHCP workstation are not in the same VLAN. In this case, ip helper-address is usually set to solve the problem:

 
 
  1. Interface vlan1
  2. Ip address 10.1.1.254 255.255.255.0 // set the DHCP server address to 10.1.1.8)
  3. Interface Vlan2
  4. Ip address 10.1.2.254 255.255.255.0
  5. Ip helper-address 10.1.1.8 // assume this is the VLAN of the DHCP Client

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.