2

I would like to configure the DHCP server on CISCO 3850, and reserve around 100 static IP for servers After doing research found that I need to create individual pool for each static maping like below( for 100 static entry 3*100 line of CLI), or is there any better option please suggest?

ip dhcp pool static
   host 192.168.1.74 255.255.255.0
   hardware-address 0011.f526.516b
4
  • 2
    A better option is to avoid using a switch, router, or firewall as a DHCP server unless you have absolutely no alternative. It's always better to run DHCP on something like a domain controller or other host. In addition to not needing to set a separate pool for each reservation, it allows for other things like excluding non-contiguous IP addresses, support for more DHCP options, etc. – Jesse P. Jul 10 '19 at 19:59
  • That being said, OSI layers 4-7 are off limits here. You can try asking on Super User, if you'd like. – Jesse P. Jul 10 '19 at 20:03
  • 1
    Also, using the hardware-address may not work with DHCP clients. See this question about that problem. – Ron Maupin Jul 11 '19 at 1:48
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer. – Ron Maupin Dec 31 '20 at 20:41
4

Firstly create DHCP pool for specific subnet in Cisco 3850 layer3 switch as below

Switch (config)# ip DHCP pool "name of scope"

Switch(config)# network 192.168.1.0 255.255.255.0

Switch(config)#ip default -gateway 192.168.1.1

Switch(config)#dns server 8.8.8.8

As per your requirement to allocate 100 static ip address from this pool . 100 ip address need to exclude from DHCP pool .And further allocate ip address statically to host .

Switch(config)# ip DHCP excluded address 192.168.1.0 0.0.0.127

2

The DHCP servers built into the network equipment are rudimentary, and they are not designed for large or complex DHCP implementations. To do what you want, you want a stand-alone DHCP server, which will have far better options. You also really do not want to burden your network devices with unnecessary protocols (let the routers concentrate on routing and the switches concentrate on switching).

In any case, the Cisco DHCP server built into the network devices are as you describe, and it is not really designed for what you want to do.


...is there any better option please suggest?

Product or resource recommendations are explicitly off-topic, except on Software Recommendations and Hardware Recommendations.

Also, host/server configurations are off-topic here, but you could ask about that on Server Fault.

0
1

Cisco IOS, PIX, and ASA have the most primitive DHCP engines I've ever seen. In a pinch, they can get the job done -- my home LAN is run from an IOS dhcpd -- but there are huge limitations. You've hit on one of the big ones. The only way around this is to populate a pool from a file:

ip dhcp pool local
 network 192.168.1.0 255.255.255.0
 ...
ip dhcp pool local-static
 origin file tftp://some.server.ip/path/to/local-db

That local-db will look like:

*time* Oct 08 2004 05:54 PM
*version* 2
!
!IP address        Type  Hardware address   Lease expiration    VRF
191.168.1.101 /24  1     00a0.xxxx.xxxx     Infinite ! by MAC
192.168.1.102 /24  id    0100.9027.xxxx.xx  Infinite ! by Windows client-id
*end*
2
  • Does the orgin file ... file have to be off-box? If not, origin file bootflash:/path/to/local-db might be an option. – Marc 'netztier' Luethi Jul 11 '19 at 9:00
  • 1
    The help text just says "URI". I keep it off-box because it's easier to edit anywhere else. – Ricky Jul 11 '19 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.