Router DHCP Configuration with Packet Tracer

DHCP Configuration example

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 in 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 and Cisco IP Helper Command

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:

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


dhcp-messages-DORA
DHCP Messages



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

• 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 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, 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 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 we will create a DHCP pool named IPD. In this DHCP 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. DHCP Pool configuration on Packet Tracer will be done like this.

RouterA# config terminal
RouterA(config)# interface fastEthernet 1/0 
RouterA(config-if)# ip address 192.168.10.1 255.255.255.0 
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 192.168.10.0 255.255.255.0 
RouterA(dhcp-config)# default-router 192.168.10.1 
RouterA(dhcp-config)# exit 
RouterA(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10 
RouterA(config)# ip dhcp excluded-address 192.168.10.12 192.168.10.14

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

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 about DHCP.

• 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 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!

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

Leave a Reply

Your email address will not be published. Required fields are marked *




CCNA