Networking Concepts: Configuring DHCP in Cisco Packet Tracer

DHCP: Dynamic Host Configuration Protocol is used for automatically assigning IP Configuration to one or more hosts. Imagine a scenario where your company has purchased 100 desktops for official use and wants you to assign IP addresses and other information on it. Now, going to all the desktops and assigning information one by one is a time taking process. Solution to this problem is a DHCP Server. There could be a specific server that provides Dynamic Host Configuration Protocol Services or we can make a router work as a DHCP Server.
DHCP Process:
So how exactly DHCP works? It work on DORA Process. DORA means DISCOVER, OFFER, REQUEST and ACKNOWLEDGEMENT. Process is as follows,
- First, a client (Host Machine) sends a DISCOVER message.
- If any (or more) DHCP Server is present in the network, it will OFFER its’ services to the client. It will send the information that are available on server like IP Address, Subnet Mask, DNS Server and other.
- Client will select the best one that fits the need. It will then REQUEST for the desired Configuration.
- Finally, DHCP server will ACKNOWLEDGE the request and send the configuration to Hosts.
Note that there could be more than one servers in a network and client can choose which one they want to get services from.
DHCP Terminology:
Following terms should be kept in mind before configuring Dynamic Host Configuration Protocol Services,
- SCOPE: It is a range of IP Addresses that can be given to clients in a subnet.
- Excluded Range: If some IP addresses are reserved for future use, they can not be assigned to any Client.
- Address Pool: IP addresses that are assignable to clients.
- Pool Name: Name of the pool from which IP Addresses can be assigned.
- Lease Time: For how long an assigned IP Address can be used by a client.
- DHCP Reservation: It is used to bind particular IP Address to a particular client.
How to Configure DHCP in Cisco Packet Tracer?
So how to configure it? First let’s take a look at configuration in the server. Create a topology like shown in figure and click on server. Go to Services tab and click DHCP. Here assign the parameters as per your need and click save.
Next, go to desktop tab and click on IP Configuration tab. Now assign an IP address to the Server. This IP address will be used as default gateway for hosts. We have already discussed about Default Gateways here.
Once everything is configured, just click on hosts and go to IP Configuration tab. There, Click on DHCP and your host will automatically get an IP Address.
As you can see, we have successfully configured DHCP Server. Now what if I want to do it on a Cisco Router.
Watch the following video for router configuration.
So, that is how you can configure Dynamic Host Configuration Protocol on a router and a server.
What if DHCP Fails?
Whenever Dynamic Host Configuration Protocol fails to give IP Information to client, APIPA is used. APIPA is Automatic Private IP Addressing. This is one of the most important question asked in various interviews. APIPA assigns a class B IP address from 169.254.0.0 to 169.254.255.255 to the client when a DHCP server is either permanently or temporarily unavailable.
As you can see APIPA is giving an IP Address to Clients and communication is still successful. That is how complete Dynamic Host Configuration Protocol works. For more detailed information click here.
Hi. It is a very nice article about DHCP. Thank you so much for sharing knowledge about networking for free online.
Can I do online training on ccna from your institute as I am in Hyderabad.? Do you have any trainings in Hyderabad? I also hear about your networking security job guarantee course, when can I attend you training and where?
Thank you.
Hi Sai,
Firstly, thanks for your appreciation.
Secondly,
1. Yes, we have online training facility also.
2. Yes, our Project Based Winter Training Program is going to held in Ameepet,Hyderabad. To know more about it please visit the below link:
http://www.wtp.ibncindia.com/winter-training-program.php
3. Please go through the below details of our 100% Job Guarantee Program. In this you will get written job guarantee.
Training Program: Job Xpert (Networking, Server & Security)
Program Contents: Networking Fundamentals + CCNA + CCNP Switching + MPLS + BGP+ ASA Firewall + VPN + MCSE +Monitoring Tools
Location is Gurgaon, Delhi NCR. Accommodation facilities are also available.
We start batches every month. So you can join us anytime. For detaided information please visit our website (www.imedita.com) or call/ whatsapp/ sms on 8750004411.
Sugandh Kansal
Sr. Training Advisor
I Medita Learning Solutions Pvt. Ltd
We believe in practical trainings.
http://www.imedita.com
http://www.ibncindia.com
What is a dhcp relay agent?
Simple, A DHCP relay agent is a router that isn’t configured as DHCP Server but it will send the DHCP Broadcast message to a known DHCP Server. DHCP Servers can provide IP Information in same subnet but if you have DHCP relay agent, it will sent the request to the DHCP server even if the client is not on the same subnet.
Surendra Singh
Sr. Network Trainer
I Medita Learning Solutions Pvt. Ltd
We believe in practical training.
http://www.imedita.com http://www.ibncindia.com