Router DHCP Configuration with Packet Tracer

DHCP Configuration example

Router DHCP Configuration with Packet Tracer

Before start-up I want to give some basic information about DHCP. As you know DHCP use UDP 67 and 68 ports. It has a messaging system for the communication between DHCP server and DHCP client. These messaging system’s messages and their types are mentined below:

• DHCP Discover (broadcast)
• DHCP Offer(broadcast)
• DHCP Request (broadcast)
• DHCP Ack (broadcast)
• DHCP Nak (unicast)
• DHCP Release (unicast)
• DHCP Decline (unicast)
• DHCP Inform (unicast)

DHCP Messages, DHCP Discovery, DHCP Offer, DHCP Request, DHCP ACK, DHCP NACK

DHCP Messages
You can also check DHCP Overview Article and DHCP IP Allocation Article to learn more about DHCP.

You can DOWNLOAD the Packet Tracer example with .pkt format HERE.

Here, a client sends a broadcast “DHCP Discovery” message that mentions that it need an ip address.The DHCP servers are replies with configuration offers to the client by “DHCP Offer” unicast message. After that DHCP client sends a broadcast “DHCP Request” message to the network with the “Transaction ID” of the first DHCP Server that send DHCP Offer.The other DHCP servers understand that DHCP client wants to use the DHCP server that has the related “Transaction ID”. Lastly the DHCP server sends a unicast “DHCP Acknowledgement” message to the DHCP client that mentions the ip assignment is successfully done or it send a refuse messaged named “DHCP-NACK”.

To configure a router’s DHCP, we must follow some basic steps. For this configuration the important point is broadcast domains. If we have only one broadcast domain in our topology, then our work is more basic, else we must get help from “ip-helper address” command.This command will help us to convince the router and make it pass the broadcast packets.

For One Broadcast Domain

Our one broadcast domain topology is like below. There is a router that will carry our DHCP server role beside its routing functionalities. And there is a switch for PCs.

DHCP Packet Tracer Example Topology

DHCP Example Topology (One Broadcast Domain)
On routerA, firstly we will give an ip address to the router interface that is connected to the switch.Secondly that we will create a DHCP pool named IPD. In this pool we will mention ip addresses that will be given to the DHCP clients.After that we will assign the router’s interface address as a default-router address for clients. And in the last part we will exclude some addresses that we don t want to use during this dynamic ip assignments.

RouterA# config terminal

RouterA(config)# interface fastEthernet 1/0
RouterA(config-if)# ip address
RouterA(config-if)# no shut
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up 

RouterA(config-if)# exit
RouterA(config)# ip dhcp pool IPD
RouterA(dhcp-config)# network
RouterA(dhcp-config)# default-router
RouterA(dhcp-config)# exit
RouterA(config)# ip dhcp excluded-address
RouterA(config)# ip dhcp excluded-address

After this configuration, when we check the ip address of PC0, we will see the ip address . Because it is the first available address in DHCP pool.

Other DHCP Articles:

DHCP Overview
DHCP IP Allocation Operation
Cisco DHCP Configuration With Packet Tracer
Huawei DHCP Configuration

For Multiple Broadcast Domains

Many CCNA learn that routers do not pass broadcasts. But progress in CCIE, network engineers learn that it is not true. Because you can pass broadcast traffic for many protocols as DHCP by “ip-helper address” command. Here we will refer only the broadcast of DHCP requests.We can use a router as a DHCP Server again, but I use a separate DHCP Server instead of router in this topology.

We're Sorry!
Full Access is for only IPCisco Crew...
With IPCisco Membership, You Can Access:
• All Certification Courses (Cisco, Juniper, Nokia and Huawei),
• Thousands of Questions (Lesson Quizes and Special Quiz Section),
• Carieer Consultancy, CV/Resume Check, Career Advice Meeting,
• Cheat Sheets, Job Interview Trainings, Network Tools,
You will be Member of a Big IPCisco Community,
You will Learn Network Lessons with Always,
New And Different Learning Styles!
We are waiting for you!

You can DOWNLOAD the Packet Tracer example with .pkt format HERE.

You can download “Packet Tracer” in Tools section.

I hope this post will be helpful for computer network funs ;) For deeply learn about DHCP, check also the whole DHCP articles.

Lesson tags: DHCP, cisco IOS, packet tracer, cisco packet tracer
Back to: Cisco Hands On Course (With Packet Tracer) > DHCP and NAT Configurations

Comments are closed.

Cisco Hands On Course (With Packet Tracer)