Router DHCP Configuration with Packet Tracer


DHCP Packet Tracer Configuration

In this DHCP Cisco Packet Tracer example, we will focus on DHCP Configuration in Cisco Packet Tracer. In other words, we will see how to configure a DHCP Server with Packet Tracer.

Here, we will learn how to enable DHCP on router, how to create DHCP Pool on Packet Tracer, how to use ip helper cisco command and more.

DHCP Messages

Before start-up I want to give some basic information. As you know DHCP uses 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:

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

DHCP Messages

• You can also check DHCP Overview Lesson and DHCP IP Allocation Lesson to learn more.

• You can Reach All Cisco Packet Tracer Labs and DOWNLOAD the Packet Tracer Examples with .pkt format.

• You can DOWNLOAD this lessons Packet Tracer Example with .pkt format HERE.

Firstly, a client sends a broadcast “DHCP Discovery” message that mentions that it need an ip address.

Then, the DHCP servers reply 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 Offer. The other servers understand that client wants to use the server that has the related “Transaction ID”.

Lastly, the Server sends a unicast “Acknowledgement” message to the client that mentions the ip assignment is successfully done or it send a refuse messaged named “DHCP-NACK”.

What is Cisco IP Helper Command?

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, our work is simpler, else we must get help from “ip-helper address” command.

What is ip helper address command? Ip helper address command is the command that helps us to convince the router and make it pass the broadcast packets.

Now, let’s go to our two different configuration topology and see how to configure a server in packet tracer for DHCP, how to configure a DHCP Server in packet tracer.

DHCP Server Configuration For One Broadcast Domain

Firstly, let’s see How to Configure a DHCP Server in Packet Tracer for One Broadcast Domain. For this first case of our DHCP Cisco packet tracer example, the One Broadcast Domain topology that we will use, is like below. There is a router that will carry out Server role beside its routing functionalities. And there is a switch for PCs.

DHCP Packet Tracer Example Topology

DHCP Example Topology (One Broadcast Domain)

IP Address Configuration

On routerA, firstly we will give an ip address to the router interface that is connected to the switch.

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 

DHCP Pool Configuration

Secondly we will create an IP 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.

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

IP DHCP Excluded Address Command

And in the last part, we will exclude some addresses with “ip dhcp excluded address” command, that we don’t want to use during this dynamic ip assignments. With “ip dhcp excluded address” command, the mentined addresses will not used in the pool.

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.

We can also check the pool information with Cisco “show ip dhcp pool” command.

DHCP Server Configuration For Multiple Broadcast Domains

Our second case is how to enable DHCP on router for multiple broadcast domains. In our second Cisco packet tracer example, we will use ip helper, cisco command “ip helper-address“. So, what is ip helper address?

• You can also check DHCP Overview Lesson and DHCP IP Allocation Lesson to learn more.

• You can Reach All Cisco Packet Tracer Labs and DOWNLOAD the Packet Tracer Examples with .pkt format.

• You can DOWNLOAD this lessons Packet Tracer Example with .pkt format HERE.

Many CCNAs 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 have used a separate 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!

Lesson tags: DHCP, cisco packet tracer
Back to: CCNP Route > DHCP and DNS

Comments are closed.

CCNP Route