Cisco Router as DHCP Server
A DHCP Server assigns IP addresses to client computers and other TCP/IP-based network devices. This is very often used in enterprise networks to reduce configuration efforts, security stuffs and others. All IP addresses of all devices are stored in a database that resides on a server.
In this article, we will focus how configure a DHCP Service on Cisco Router.
R1#config t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#service dhcp R1(config)#
R1(dhcp-config)#default-router 172.30.1.1 R1(dhcp-config)#dns-server 172.30.100.250 172.30.100.251 R1(dhcp-config)#domain-name icttowers.com R1(dhcp-config)#lease 0 1 30 R1(dhcp-config)#exit R1(dhcp-config)#
- default-router: Defines the client’s gateway
- dns-server: Lists the DNS servers in order of preference
- domain-name: Defines the domain name the client should use
- lease: Defines the lease duration (default is 24 hours)
R1(config)#ip dhcp excluded-address 172.30.1.1 172.30.1.10 R1(config)#
R1#show ip dhcp binding Bindings from all pools not associated with VRF: IP address Client-ID/ Lease expiration Type Hardware address/ User name 172.30.1.11 0063.6973.636f Sep 04 2014 08:11 AM Automatic 172.30.1.12 0063.6973.7aab Sep 04 2014 09:20 AM Automatic 172.30.1.13 0063.6973.3f5a Sep 04 2014 09:21 AM Automatic 172.30.1.14 0063.6973.be51 Sep 04 2014 09:50 AM Automatic R1#