MediaWiki:Welcome to the Howto page/Cisco/DHCP

From wiki
< MediaWiki:Welcome to the Howto page‎ | Cisco
Revision as of 22:07, 25 December 2013 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The basic configuration for a Dynamic Host Resolution Protocol server is to create a pool, fill it with IP addresses, define a main gateway and DNS server to distribute and exclude certain 'static' addresses that need to be protected.

The basic command for creating the DHCP pool is: ip dhcp pool poolname

The 'network' statement then defines the range of addresses, designated by the subnet mask. As an example: network means that there would be a total of 128 addresses in the pool starting from address Of course the network address and broadcast address cannot be used and automatically are not distributed as such meaning that a total of 126 addresses maybe distributed via the DHCP protocol.

Since it is also needed to include a gateway address in the network which would generally be a router IP address or a managed VLAN IP address, it is necessary to use the: ip dhcp excluded-address command to exclude the router or L3 switched VLAN address.

The 'import all' statement simply means that the 'pool' will import all possible DHCP options into it.

Where DNS server's are required using the: dns-server command followed by: server1 server2 can be issued which should be the case for most switched and routed networks of today.

Sample code for creating a DHCP server can be seen below:

no ip dhcp use vrf connected

ip dhcp excluded-address

ip dhcp pool dpool1
   import all