Configuring DHCP Server

What is a DHCP Server and why to use one?

The Dynamic Host Configuration Protocol (DHCP) is a standardized network protocol used on Internet Protocol (IP) networks. The DHCP is controlled by a DHCP server that dynamically distributes network configuration parameters, such as IP addresses, for interfaces and services. A DHCP server enables computers to request IP addresses and networking parameters automatically, reducing the need for a network administrator or a user to configure these settings manually. In the absence of a DHCP server, each computer or other device on the network would need to be statically assigned to an IP address.

In the network below there is one router, one end-user computer, and a DNS Server. In real world deployments a network could have dozens or hundreds of routers or devices depending on the scale of the network. Regardless of the network complexity DHCP serves the same role in that its purpose is to dynamically assign IP address. With even a small number of devices static IP addressing can be very cumbersome. Hence, the creation of DHCP. A DHCP Server can also serve as a mechanism to provide DHCP options for technologies like Voice over IP (VoIP).

Steps to configure a DHCP Server

Step 2: Configure a DHCP Server on the network route, assign a default-router, domain-name, dns-server, and lease duration. Lease duration is configured in the format of days and hours. In this example the lease is configured for 8 hours.

Step 3: Configure any DHCP exclusion necessary. If an exclusion is not configured all static IP addresses used on the network to which the DHCP Server is configured to provide addressing the DHCP Server will assign overlapping addresses. In this example we are exclusng the IP address of the router (DHCP Server) and the DNS Server.

TIP: You can also use IP SLA with route-maps in order to track and failover a route. In this scenario you can avoid specifying a single next-hop in the route-map and instead specify a primary and backup next-hop. The command would look like set ip next-hop 10.2.0.1 10.3.0.1. Without using IP SLA the secondary next-hop will never become active. You can reach more about how to make use of Route Failover using IP SLA here.

Verify the configuration

Now that the configuration is finished lets verify the DHCP Server configuration. Using the show run and show ip dhcp binding commands you can verify the DHCP Server settings and view any clients to which the DHCP Server has assigned an IP address.

Related Posts

What is load sharing and why to use it?Load balancing with BGP is not possible in a multihomed environment with two ISPs. BGP selects only the single best path to a destination among the BGP Read more…

What is a Dynamic Multipoint VPN and why to use it?DMVPN provides the capability for creating a dynamic-mesh VPN network without having to pre-configure (static) all possible tunnel end-point peers, including IPsec (Internet Protocol Security) Read more…