Skip to content
Back to Blog
MikroTik

DHCP Server Setup on MikroTik from Scratch

Configure a DHCP server on MikroTik to automatically assign IP addresses to clients — pool setup, gateway, DNS, lease times.

Feb 2026
9 min read

Setting Up a DHCP Server on MikroTik RouterOS

A DHCP server automatically assigns IP addresses to devices on your network. Without it, every device would need a manually configured IP address — which is impractical for most networks. This guide shows you how to set up a complete DHCP server on RouterOS v7.

How DHCP Works (Brief Overview)

When a device connects to your network, it sends a broadcast message saying "I need an IP address." The DHCP server hears this, picks an available IP from its pool, and sends it to the device along with:

  • The assigned IP address
  • Subnet mask
  • Default gateway (usually your router IP)
  • DNS server addresses
  • Lease time (how long the device can keep the IP)

The Three Components of RouterOS DHCP Server

To set up DHCP in RouterOS you need three things:

  1. IP Pool — the range of addresses to hand out
  2. DHCP Server — the service that listens for requests and assigns IPs
  3. DHCP Server Network — tells the DHCP server what gateway and DNS to send to clients

Step 1: Create an IP Pool

An IP pool defines the range of addresses available for DHCP assignment.

TEXT
/ip pool add name=lan-pool ranges=192.168.1.100-192.168.1.200

This creates a pool named lan-pool that can hand out addresses from .100 to .200 — that is 101 addresses.

View your pools:

TEXT
/ip pool print

Step 2: Create the DHCP Server

TEXT
/ip dhcp-server add name=dhcp-lan interface=bridge address-pool=lan-pool disabled=no

Parameters explained:

  • name=dhcp-lan — a name for this DHCP server instance (you can have multiple)
  • interface=bridge — which interface to listen on (use your LAN interface — often a bridge)
  • address-pool=lan-pool — which pool to draw addresses from
  • disabled=no — enable it immediately

View the DHCP server:

TEXT
/ip dhcp-server print

Step 3: Configure the DHCP Server Network

This tells the DHCP server what network information to send to clients:

TEXT
/ip dhcp-server network add address=192.168.1.0/24 gateway=192.168.1.1 dns-server=8.8.8.8,8.8.4.4

Parameters:

  • address=192.168.1.0/24 — the network this DHCP server serves
  • gateway=192.168.1.1 — the default gateway clients should use (your router LAN IP)
  • dns-server=8.8.8.8,8.8.4.4 — DNS servers for clients

View the network configuration:

TEXT
/ip dhcp-server network print

Verifying It Works

Connect a device to your LAN and let it get an address automatically. Then check active leases:

TEXT
/ip dhcp-server lease print

You will see something like:

TEXT
 #   ADDRESS         MAC-ADDRESS       HOST-NAME    STATUS
 0   192.168.1.100   AA:BB:CC:DD:EE:FF my-laptop    bound

Viewing and Managing Leases

See All Current Leases

TEXT
/ip dhcp-server lease print

See Detailed Lease Information

TEXT
/ip dhcp-server lease print detail

Remove a Lease Manually

TEXT
/ip dhcp-server lease remove 0

Static DHCP Leases

A static DHCP lease (also called a DHCP reservation) assigns the same IP address to a specific device every time, based on its MAC address. This is useful for printers, servers, and other devices that need a predictable IP.

Adding a Static Lease

TEXT
/ip dhcp-server lease add address=192.168.1.50 mac-address=AA:BB:CC:DD:EE:FF server=dhcp-lan comment=my-printer

Parameters:

  • address=192.168.1.50 — the IP to always assign to this device
  • mac-address=AA:BB:CC:DD:EE:FF — the MAC address of the device
  • server=dhcp-lan — which DHCP server this lease belongs to
  • comment=my-printer — optional label for readability

Converting an Existing Dynamic Lease to Static

If a device already has a dynamic lease and you want to make it permanent:

TEXT
/ip dhcp-server lease make-static 0

(where 0 is the lease number from print)

This converts the lease to static so that device always gets the same IP.

Complete DHCP Setup in One Go

Here is a full example for a typical home network where the router LAN interface is a bridge with IP 192.168.1.1/24:

TEXT
# Step 1: Create IP pool
/ip pool add name=lan-pool ranges=192.168.1.100-192.168.1.200

# Step 2: Create DHCP server
/ip dhcp-server add name=dhcp-lan interface=bridge address-pool=lan-pool disabled=no

# Step 3: Configure network info for clients
/ip dhcp-server network add address=192.168.1.0/24 gateway=192.168.1.1 dns-server=8.8.8.8,1.1.1.1

Lease Time

The default lease time in RouterOS is 10 minutes for the offer and 3 days for the actual lease. You can change it per DHCP server network:

TEXT
/ip dhcp-server network set 0 lease-time=1d

Or set it at the DHCP server level:

TEXT
/ip dhcp-server set dhcp-lan lease-time=12h

Common values: 30m, 1h, 12h, 1d, 3d

DHCP Server on Multiple Interfaces

If your router has multiple LAN segments, you can run separate DHCP servers for each:

TEXT
# Pool for VLAN 10
/ip pool add name=vlan10-pool ranges=10.10.10.100-10.10.10.200

# DHCP server for VLAN 10 interface
/ip dhcp-server add name=dhcp-vlan10 interface=vlan10 address-pool=vlan10-pool disabled=no

# Network info for VLAN 10
/ip dhcp-server network add address=10.10.10.0/24 gateway=10.10.10.1 dns-server=8.8.8.8

Using the DHCP Server Setup Wizard

RouterOS also includes a quick setup command that does all three steps automatically:

TEXT
/ip dhcp-server setup

This runs an interactive wizard asking for interface, address pool range, gateway, and DNS. It is the fastest way if you just want a quick setup.

Summary

DHCP setup in RouterOS requires three steps:

  1. Create a pool: /ip pool add
  2. Create the server: /ip dhcp-server add
  3. Configure network info: /ip dhcp-server network add

Use static leases for devices that need a fixed IP. Use /ip dhcp-server lease print to monitor what addresses have been assigned.