Difference between revisions of "Cisco IOS DHCP Server configuration"

From wikieduonline
Jump to navigation Jump to search
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
[[Cisco IOS]] [[Dynamic Host Configuration Protocol|DHCP]] Server configuration: https://study-ccna.com/configure-cisco-router-as-dhcp-server/
 
[[Cisco IOS]] [[Dynamic Host Configuration Protocol|DHCP]] Server configuration: https://study-ccna.com/configure-cisco-router-as-dhcp-server/
  
<pre>
+
Global configuration, not local to dhcp pool.
cisco_ios_sw(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.47
+
cisco_ios_sw(config)#[[ip dhcp excluded-address]] 192.168.0.1 192.168.0.47
cisco_ios_sw(config)#ip dhcp pool YOUR_DHCP_POOLNAME
+
cisco_ios_sw(config)#[[ip dhcp excluded-address]] 192.168.5.47
cisco_ios_sw(dhcp-config)#network 192.168.0.0 255.255.255.0
 
cisco_ios_sw(dhcp-config)#default-router 192.168.0.1
 
cisco_ios_sw(dhcp-config)#dns-server 192.168.0.1
 
</pre>
 
  
 +
cisco_ios_sw(config)#ip dhcp pool YOUR_DHCP_POOLNAME
 +
cisco_ios_sw(dhcp-config)#network 192.168.0.0 255.255.255.0
 +
cisco_ios_sw(dhcp-config)#default-router 192.168.0.1
 +
cisco_ios_sw(dhcp-config)#dns-server 192.168.0.1
  
<code>[[show running-config]]</code>
 
  
 +
[[show running-config]]
 
  .../...
 
  .../...
  ip dhcp pool YOUR_POOL_NAME
+
  [[ip dhcp]] pool YOUR_POOL_NAME
 
   [[import]] all
 
   [[import]] all
   network 10.10.10.0 255.255.255.0
+
   [[network]] 10.10.10.0 255.255.255.0
 
   default-router 10.10.10.1  
 
   default-router 10.10.10.1  
 
   domain-name YOUR_DOMAIN.COM
 
   domain-name YOUR_DOMAIN.COM
   dns-server 10.10.10.1  
+
   dns-server 10.10.10.1 [[8.8.8.8]]
 
   [[lease]] 2
 
   [[lease]] 2
 
  .../...
 
  .../...
  
  
 
+
== [[Cisco IOS: Static IPs in DHCP]] ==
  
 
== Commands ==
 
== Commands ==
Line 32: Line 31:
 
* <code>[[show dhcp server]]</code>
 
* <code>[[show dhcp server]]</code>
 
* <code>[[show ip dhcp conflict]]</code>
 
* <code>[[show ip dhcp conflict]]</code>
* <code>[[lease]]</code>
+
* <code>[[lease]]</code> (duration of the lease in days <ref>https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr/command/ipaddr-cr-book/ipaddr-l1.html#wp3986925401</ref>)
 
* <code>[[lease infinite]]</code>
 
* <code>[[lease infinite]]</code>
 
* <code> [[nbtstat]]</code>
 
* <code> [[nbtstat]]</code>
 
* <code>[[debug ip]] [[dhcp]] server packet</code>
 
* <code>[[debug ip]] [[dhcp]] server packet</code>
debug ip dhcp server
+
* <code>[[debug ip dhcp server]]</code>
  
 
== Activities ==
 
== Activities ==
Line 44: Line 43:
 
== Related terms ==
 
== Related terms ==
 
* <code>[[client-identifier]]</code>
 
* <code>[[client-identifier]]</code>
 +
* <code>Jun  6 14:50:40.456: %DHCPD-4-PING_CONFLICT: '''DHCP address conflict''':  server pinged 10.10.xxx.xxx.</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 08:09, 22 April 2021

Cisco IOS DHCP Server configuration: https://study-ccna.com/configure-cisco-router-as-dhcp-server/

Global configuration, not local to dhcp pool.

cisco_ios_sw(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.47
cisco_ios_sw(config)#ip dhcp excluded-address 192.168.5.47
cisco_ios_sw(config)#ip dhcp pool YOUR_DHCP_POOLNAME
cisco_ios_sw(dhcp-config)#network 192.168.0.0 255.255.255.0
cisco_ios_sw(dhcp-config)#default-router 192.168.0.1
cisco_ios_sw(dhcp-config)#dns-server 192.168.0.1


show running-config
.../...
ip dhcp pool YOUR_POOL_NAME
 import all
 network 10.10.10.0 255.255.255.0
 default-router 10.10.10.1 
 domain-name YOUR_DOMAIN.COM
 dns-server 10.10.10.1 8.8.8.8
 lease 2
.../...


Cisco IOS: Static IPs in DHCP[edit]

Commands[edit]

Activities[edit]

Related terms[edit]

  • client-identifier
  • Jun 6 14:50:40.456: %DHCPD-4-PING_CONFLICT: DHCP address conflict: server pinged 10.10.xxx.xxx.

See also[edit]

  • https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr/command/ipaddr-cr-book/ipaddr-l1.html#wp3986925401
  • Advertising: