<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dimasqi Ramadhani</title>
    <description>The latest articles on DEV Community by Dimasqi Ramadhani (@dimasqiramadhani).</description>
    <link>https://dev.to/dimasqiramadhani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3448080%2Faf7e2d7d-0873-4c8e-9f6f-9edf2c8db8a0.jpg</url>
      <title>DEV Community: Dimasqi Ramadhani</title>
      <link>https://dev.to/dimasqiramadhani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dimasqiramadhani"/>
    <language>en</language>
    <item>
      <title>Cisco Packet Tracer Tutorial: DHCP Server Configuration Explained</title>
      <dc:creator>Dimasqi Ramadhani</dc:creator>
      <pubDate>Wed, 20 Aug 2025 14:42:18 +0000</pubDate>
      <link>https://dev.to/dimasqiramadhani/cisco-packet-tracer-tutorial-dhcp-server-configuration-explained-160c</link>
      <guid>https://dev.to/dimasqiramadhani/cisco-packet-tracer-tutorial-dhcp-server-configuration-explained-160c</guid>
      <description>&lt;p&gt;when setting up a network in Cisco Packet Tracer, manually assigning IP addresses to every client can be time-consuming and prone to errors. That's where &lt;strong&gt;DHCP (Dynamic Host Configuration Protocol)&lt;/strong&gt; comes in. DHCP automatically assigns IP addresses and other network parameters (like subnet mask, default gateway, and DNS) to devices, making network management easier.&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll walk through how to configure a &lt;strong&gt;DHCP server&lt;/strong&gt; in Cisco Packet Tracer and test it with client PCs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is DHCP?
&lt;/h2&gt;

&lt;p&gt;DHCP (Dynamic Host Configuration Protocol) is a network service that automatically provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IP address&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subnet Mask&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Default Gateway&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DNS Server&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of configuring each client manually, the DHCP server takes care of assigning IP addresses dynamically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lab Topology Setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1 Router&lt;/strong&gt; (acts as DHCP server)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1 Switch&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 PCs&lt;/strong&gt; (DHCP Clients)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can expand this later by adding more PCs or even configuring a dedicated DHCP server device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Basic Device Setup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Drag and drop a &lt;strong&gt;Router&lt;/strong&gt;, &lt;strong&gt;Switch&lt;/strong&gt;, and &lt;strong&gt;2 PCs&lt;/strong&gt; in Cisco Packet Tracer.&lt;/li&gt;
&lt;li&gt;Connect them using copper straight-through cables: 

&lt;ul&gt;
&lt;li&gt;Router -&amp;gt; Switch -&amp;gt; PCs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Configure Router Interfaces
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Click on the router -&amp;gt; &lt;strong&gt;CLI&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enter the following commands:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Router&amp;gt; enable
Router# configure terminal
Router(config)# interface fastEthernet 0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the router's interface will act as the &lt;strong&gt;gateway&lt;/strong&gt; for our network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Configure DHCP on the Router
&lt;/h2&gt;

&lt;p&gt;Now let's set up the DHCP pool&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Router(config)# ip dhcp pool **LAN**
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 8.8.8.8
Router(dhcp-config)# exit
Router(config)# end
Router# write
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The DHCP pool is named LAN&lt;/li&gt;
&lt;li&gt;IP range will be in the &lt;code&gt;192.168.1.0 /24&lt;/code&gt; network&lt;/li&gt;
&lt;li&gt;Default gateway is the router &lt;code&gt;192.168.1.1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;DNS server is set to Google's DNS &lt;code&gt;8.8.8.8&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Exclude IP Addresses
&lt;/h2&gt;

&lt;p&gt;You might want to &lt;strong&gt;reserve some IPs&lt;/strong&gt; (for example, for the router itself or servers).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensure IPs from &lt;code&gt;.1&lt;/code&gt; to &lt;code&gt;.10&lt;/code&gt; are not assigned to clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Configure PCs as DHCP Clients
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Click on a &lt;strong&gt;PC&lt;/strong&gt; -&amp;gt; go to &lt;strong&gt;Desktop&lt;/strong&gt; -&amp;gt; &lt;strong&gt;IP Configuration&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;DHCP&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The PC should automatically receive an IP address, subnet mask, gateway, and DNS.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do this for both PCs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Verify DHCP Assignment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;On the PC's &lt;strong&gt;Command Prompt&lt;/strong&gt;, type:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ipconfig /all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see an IP address like &lt;code&gt;192.168.1.11&lt;/code&gt; (since &lt;code&gt;.1&lt;/code&gt; to &lt;code&gt;.10&lt;/code&gt; are excluded).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Try pinging the router:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ping 192.168.1.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you get replies, you DHCP setup is working correctly!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we learned how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure a router interface as a gateway&lt;/li&gt;
&lt;li&gt;Set up a DHCP pool in Cisco Packet Tracer&lt;/li&gt;
&lt;li&gt;Excluded IP addresses from DHCP assignment&lt;/li&gt;
&lt;li&gt;Verify that clients successfully receive IP addresses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using DHCP not only saves time but also reduces the chance of IP conflicts in larger networks.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Step:&lt;/strong&gt; Try configuring &lt;strong&gt;multiple DHCP pools&lt;/strong&gt; on a router with a sub-interfaces (for VLANs). That's a more advanced setup for larger enterprise environments.&lt;/p&gt;

</description>
      <category>dhcp</category>
      <category>cisco</category>
      <category>network</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
