Beginner’s Guide: Configuring a DHCP Server on MikroTik Print

  • Mikrotik
  • 27

Hello again! It’s Emmanuel Corels from Emmanuel Corels Creatives, here to walk you through one of the fundamental tasks for any network administrator—setting up a DHCP server on your MikroTik router. Whether you’re running a home lab, a small office network, or simply want to automate IP address assignments for your devices, this guide will show you how to do it in a straightforward, beginner-friendly way.


Understanding DHCP

DHCP (Dynamic Host Configuration Protocol) is what automatically assigns IP addresses to devices on your network. Without DHCP, every device would need a static IP manually configured—a time-consuming and error-prone process. With DHCP, your MikroTik router handles this for you, making it easier to add new devices without any extra hassle.


Configuring a DHCP Server Using WinBox

Step One: Set Up Your LAN IP

Before you create a DHCP server, make sure your router’s LAN interface (or bridge) has an IP address. For example, you might assign an IP like 192.168.88.1/24 to your LAN bridge.

  • Open WinBox and go to IP → Addresses.
  • If there isn’t an IP already assigned, click the “+” and add one. Use an address range that suits your network (for example, 192.168.88.1/24).

Step Two: Create the DHCP Server

Now that your LAN has an IP, it’s time to create the DHCP server:

  • Navigate to IP → DHCP Server.
  • Click on the DHCP Setup button.
  • In the setup wizard, select the interface that represents your LAN (often a bridge like bridge-lan).
  • The wizard will prompt you for details such as the local address (the gateway, e.g., 192.168.88.1), the address pool for DHCP leases (for example, 192.168.88.10-192.168.88.254), and the DNS servers you wish to use.
  • Follow the wizard through each prompt until you finish the setup.

The DHCP server will now begin assigning IP addresses to devices that connect to your network automatically.


Configuring a DHCP Server via the CLI

If you prefer using the command line, MikroTik makes it just as easy:

  1. Assign the LAN IP (if not already set):

    /ip address add address=192.168.88.1/24 interface=bridge-lan
    
  2. Create an IP Pool for DHCP:

    /ip pool add name=dhcp_pool ranges=192.168.88.10-192.168.88.254
    
  3. Set Up the DHCP Server:

    /ip dhcp-server add address-pool=dhcp_pool disabled=no interface=bridge-lan lease-time=10m name=dhcp1
    
  4. Configure the DHCP Server Network:

    /ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=8.8.8.8,8.8.4.4
    

These commands create a DHCP pool, start the DHCP server on your LAN interface, and set the network parameters that devices will use.


Troubleshooting Tips

  • No IP Assigned?
    Verify that the correct interface is selected in the DHCP server settings. Check that your LAN interface has an assigned IP and that no other DHCP server is conflicting on the same network.

  • Incorrect Lease Range?
    Make sure the address pool you create doesn’t overlap with any static IP addresses on your network. This prevents IP conflicts.

  • DNS Issues?
    If clients aren’t able to browse the internet even after receiving an IP, double-check the DNS servers provided in the DHCP network settings. You can always use public DNS like 8.8.8.8 and 8.8.4.4.

  • Lease Time Considerations:
    For a home or small office, a lease time of 10 minutes to a few hours is usually sufficient. Adjust according to how frequently devices join and leave your network.


Final Thoughts

Setting up a DHCP server on your MikroTik router is a foundational step that makes managing your network much more convenient. With just a few clicks in WinBox or a few simple CLI commands, your router will automatically assign IP addresses to all connected devices—no manual intervention required.

As you get more comfortable with MikroTik, you can explore advanced options like DHCP option settings, reservation of IP addresses for specific devices, or even integrating with a RADIUS server for added security. For now, enjoy the simplicity and efficiency that DHCP brings to your network!


Guided with clarity by
Emmanuel Corels – Admin, Emmanuel Corels Creatives


Does this help?

« Back