Cisco Router as DHCP server

Published:
A Cisco router can be configured as a DHCP Server. There are advantages and disadvantages in making your Cisco router work as DHCP Server. Almost all the features for windows DHCP can be configured on Cisco-based DHCP server. Some of the features mentioned below at Setting IP Range, DNS, IP reservation and excluding IP address

Advantages: Best suited for satellite location or office connected through low bandwidth connectivity. Installing a Windows DHCP Server  or DHCP relay can consume the bandwidth. No addition hardware or software licensing required. Another advanthage is ease of configuration. It can be configured in two ways using the CLI (Command line interface) or SDM (Security Device Manager). SDM provide the GUI interface for your router. And the best part is that CISCO has also included debug commands in their IOS for troubleshooting.

Disadvantage: Will increase the load on the router, as it does the work of a router plus DHCP Server. But for a small network the load is negligible. Best suited for network that support 10 to 15 users.

Notice: The parts of the config/commands are open to variation (not specifically required keywords or commands).

Router> enable
                      Router# config t
                      Router(config)# ip dhcp pool LANPOOL
                      Router(dhcp-config)# network 192.168.1.0 255.255.255.0
                      Router(dhcp-config)# domain-name mycompany.com
                      Router(dhcp-config)# default-router 192.168.1.1
                      Router(dhcp-config)# dns-server 4.4.4.2
                      Router(dhcp-config)# netbios-name-server 192.168.1.2
                      Router(dhcp-config)# host 192.168.1.10
                      Router(dhcp-config)# hardware-address 0101.A800.0432 75A2
                      Router(dhcp-config)# client-name MyPC
                      Router(dhcp-config)# exit
                      Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
                      
                       Each command line interpreted below.
                      Router> enable
                      Router# config t
                      
                      # Define  name to IP Pool
                      Router(config)# ip dhcp pool LANPOOL
                      
                      #Define network range
                      Router(dhcp-config)# network 192.168.1.0 255.255.255.0
                      
                      #Domain to prefix to client
                      Router(dhcp-config)# domain-name mycompany.com
                      
                      #Gateway IP that get assigned to client
                      Router(dhcp-config)# default-router 192.168.1.1
                      
                      #Define the dns server for the clients
                      Router(dhcp-config)# dns-server 4.4.4.2
                      
                      #Define a WINS server if you have one
                      Router(dhcp-config)# netbios-name-server 192.168.1.2
                      
                      #IP Address to be reserved to the HOST
                      Router(dhcp-config)# host 192.168.1.15
                      
                      #MAC Address of the cient
                      Router(dhcp-config)# hardware-address 0101.A800.0432 75A2
                      
                      #Optional – Full name of the client(Not to include client name).
                      Router(dhcp-config)# client-name MyPC
                      Router(dhcp-config)# exit
                      
                      #IP Exclude has to be given from config mode
                      Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
                      
                      #Enables debugging on DHCP service
                      Router# debug ip dhcp server {events | packets | linkage}

Open in new window

2
6,386 Views

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.