What is DHCP and How to Configure DHCP
What is DHCP
Dynamic Host Configuration Protocol (DHCP) is used to assign IP addresses dynamically in the network. By an administrator or engineer, a DHCP server can be set up with a poll of addresses that are available for assignment.
When a client device is turned on it can request an IP address from the local DHCP server, the IP address is assigned to the requested client device if the address is available in the pool. At a configurable interval, this assignment can expire because this assignment is not permanent. If an address renewal is not requested and the lease expires then the address will be put back into the poll for assignment.
How to Configure DHCP in Packet Tracer |
In the process of
assigning the IP addresses in the network we configure Mini Routers and via
Cables and Wifi, every connected computer will get a unique IP address from the
Mini router.
What is DHCP |
And except for this, layer 3 devices whether they are
switches or routers we can configure DHCP, layer 3 means more efficient
functionality as compared to old switches and it has compatibility like a
router. This process is often used in Cisco.
DHCP Configuration on Layer 3 Devices |
And except this, a DHCP
configured in one computer and then IP addresses are deployed to other
computers in Microsoft OS
environment. In short, every organization is providing DHCP services in their
network.
DHCP Configuration on Microsoft Server |
Being network administrators we have to decide the best option according to the company requirements. We always deploy that option that seems to be reliable, cheap, and efficient.
Now we are going to configure the above three types of the diagram in the Packet Tracer to examine how the DHCP is working. Except this, we will get the idea on Layer 3 switches means Cisco switches that what command will be configured to make the DHCP.
Note:
by default, the DHCP server is enabled to assign IP addresses to every
connected computer in the network.
Wireless DHCP Configuration |
Click on the Wireless
router to see the result of the automatic DHCP server enabled on the wireless
router.
Wireless Router Setting |
Now click on the PC in
the PT Lab to see the PC IP address which is assigned by the DHCP server.
Assigning IP Addresses through Wireless DHCP |
We can disable the
DHCP server by clicking on the Disable option in the Wireless router.
Enabling/Disabling Wireless DHCP |
Now click on the PC again in the PT Lab to see the
result.
DHCP IP Addresses on Computers |
APIPA (Automatic
Private IP Addressing) is an operating system feature and it is used to enable
the computers to automatically self-configure an IP address and subnet mask
when their DHCP server is not reachable or when the windows computer is not
able to communicate with the DHCP server. The range of APIPA IP addresses is
from 169.254.0.1 to 169.254.255.254 with the subnet mask of 255.255.0.0, and
these IP addresses range is used in local networks, not on the Internet.
DHCP Configuration on Server |
Now click on the
server to enable the DHCP service on the server but first, we have to configure
the static IP address.
Static IP Address on Server |
Click on the server
services option and then choose DHCP on the left side to enable DHCP services
in the network, and also will have to mention the Start and End IP address on
the server, and then click on the Save
Setting button.
Server DHCP Services |
Server DHCP Services Pool Name |
The server is a heavy configuration PC
that maintains multiple computers at a time and it has different services. The
service of the server that we will use is a DHCP server.
Now check the DHCP on PCs, click on any PC, and then enable the Check Box of DHCP.
Enable DHCP on Computers |
Here one thing is
mentioned in the above image and previous above images that the default gateway
is 0.0.0.0 because we are in the
same network but the Gateway is used to connect two or more networks.
Gateway Configuration |
We are going to add a wireless router to switch SW and disabled the DHCP server services on the router because we have deployed a server where we enabled the DHCP server services. And the router is connected to the Internet and we will configure the Gateway on PCs so that our PCs can communicate over the Internet. The Gateway will be distributed by the server to computers in the network but we have to add Gateway on the server so that the server can distribute it.
Gateway Configuration on Server |
Now click on the PCs
to check the default Gateway.
Computer Default Gateway |
Now we are going to make
a comparison between old model switches and multi-layer switches.
3. Old and Multi-Layer Switches
DHCP on OLD Switches |
DHCP Configuration on Multi-Layer Switches |
DHCP Configuration on Multi-Layer Switches |
Switch>enable
Switch #configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch (config) #hostname MLS1
MLS1
(config) # ip dhcp?
DHCP Pool |
MLS1
(config) # ip dhcp pool?
DHCP Pool Name |
MLS1 (config) # ip dhcp pool Ithome
MLS1 (dhcp-config) # network 192.168.1.0 255.255.255.0
MLS1 (dhcp-config) #
Note: We
will have to configure the IP address on MLS1 for identification of that MLS1
switch.
MLS1 (dhcp-config) # default-router 192.168.1.1
MLS1 (dhcp-config) # exit
MLS1 (config) #interface vlan 1
MLS1 (config-if) #ip address 192.168.1.1 255.255.255.0
MLS1 (config-if) # no shut
Note:
The VLAN 1 is automatically shut down so, we have to configure the command no
shut to up the VLAN 1 state.
Default VLAN Status |
MLS1 (config-if) # end
MLS1# show running-config
Show-Running Config Commands |
Now check the DHCP on
PCs, click on any PC, and then enable the Check Box of the DHCP.
DHCP Verification on Computers |
The companies that are
creating the Network devices such as Multi-Layer switches, Cisco Mini routers,
or other Mini routers that are providing the DHCP services enabled in it.
Search Tags
- DHCP configuration
- What is DHCP and how will you configure?
- What is DHCP and why is it used?
- Where is DHCP configured?
0 Comments