Day 2 Morning: Finally Getting Automatic IP Addresses Working


Module 3 of my MikroTik Zero to Hero Challenge
I started Day 2 with the internet working perfectly - but only if I manually set IP addresses on my devices. Time to fix this and make the network usable for normal people who just want to plug in and go online.
The Starting Problem
My laptop was still showing 169.254.86.20
- that annoying self-assigned IP address Windows gives itself when it can't find a DHCP server.
The Issue: My router could get online, but it wasn't helping other devices get IP addresses automatically.
The Goal: Make it work like a normal home router where devices just connect and everything works.
Understanding DHCP Components
Before diving in, I had to learn what pieces make DHCP work:
IP Pool: The range of addresses available to give out (like 192.168.88.100 to 192.168.88.200)
DHCP Server: The service that hands out IP addresses
DHCP Network: The configuration tells clients what gateway and DNS servers to use
DHCP Lease: The record of who has which IP address
Think of it like a hotel check-in system - you need rooms available (pool), a front desk person (server), information about hotel services (network config), and a guest registry (leases).
Setting Up My First DHCP Server
Step 1: Create the IP Pool
/ip pool add name=LAN-Pool ranges=192.168.88.100-192.168.88.200
This gives me 101 IP addresses to hand out (100-200), while keeping 1-99 free for servers and network equipment.
Step 2: Create the DHCP Server
/ip dhcp-server add name=LAN-DHCP interface=Bridge-LAN address-pool=LAN-Pool
Simple enough! Or so I thought...
Step 3: Configure Network Settings
/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=8.8.8.8,1.1.1.1
This tells DHCP clients:
Your network is 192.168.88.0/24
Your gateway (router) is 192.168.88.1
Use Google (8.8.8.8) and Cloudflare (1.1.1.1) for DNS
The Hidden Problem I Discovered
After setting everything up, my laptop was STILL getting 169.254.x.x
!
I checked the DHCP server status:
/ip dhcp-server print
And there was the problem - it showed an X flag, meaning the server was disabled!
Big Learning: MikroTik creates DHCP servers in a disabled state for safety. You have to manually enable them.
/ip dhcp-server enable LAN-DHCP
SUCCESS! My laptop immediately got 192.168.88.200
!
Making Sure My Laptop Always Gets the Same IP
For my lab work, I wanted my laptop to always get the same IP address. This is called a DHCP reservation.
First, I found my laptop's lease:
/ip dhcp-server lease print
# Showed: 192.168.88.200, MAC F4:30:B9:13:C1:55, status: bound
Then I made it permanent:
/ip dhcp-server lease make-static [find mac-address=F4:30:B9:13:C1:55]
I got an error saying "already have static lease with this IP address," - but this meant it worked! Sometimes MikroTik error messages are confusing like that.
Setting Up Time Synchronisation (NTP)
Networks need accurate time for logging, certificates, and troubleshooting. Time to set up NTP (Network Time Protocol).
My First Attempt (Failed)
/system ntp client servers add address=pool.ntp.org
Error: "bad command name servers"
Turns out my RouterOS version uses a different syntax.
Second Attempt (Also Failed)
/system ntp client set primary-ntp=pool.ntp.org
Error: "invalid value for argument ip-address"
Learning: NTP needs actual IP addresses, not domain names like "pool.ntp.org".
What Worked
/system ntp client set primary-ntp=129.6.15.28
/system ntp client set secondary-ntp=132.163.97.1
I looked up the IP addresses for reliable NTP servers and used those directly.
Checking if it worked:
/system ntp client print
# Results:
# active-server: 129.6.15.28
# last-update-before: 7s450ms
# last-adjustment: 15ms384us
Perfect! The router was now keeping accurate time.
Watching the System in Action
MikroTik has great logging. I could watch DHCP in action:
/log print where topics~"dhcp"
This showed me every time a device requested an IP address, got one, or renewed its lease. Helpful for troubleshooting!
What I Accomplished in Module 3
By the end of Module 3, I had a fully functional network:
✅ DHCP server working - Devices automatically get IP addresses
✅ IP pool configured - 192.168.88.100-200 range for automatic assignment
✅ Static reservation - My laptop always gets 192.168.88.200
✅ DNS servers configured - Clients get Google and Cloudflare DNS automatically
✅ Time synchronisation - Router keeps accurate time via NTP
✅ Network monitoring - Can watch DHCP activity in real-time
The Complete Picture
Now, when someone plugs into my network, they automatically get:
An IP address (192.168.88.100-200)
Subnet mask (255.255.255.0)
Gateway address (192.168.88.1)
DNS servers (8.8.8.8 and 1.1.1.1)
No manual configuration needed - just like a professional network!
Key Commands I Learned
# DHCP Server Setup
/ip pool add name=LAN-Pool ranges=192.168.88.100-192.168.88.200
/ip dhcp-server add name=LAN-DHCP interface=Bridge-LAN address-pool=LAN-Pool
/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=8.8.8.8,1.1.1.1
/ip dhcp-server enable LAN-DHCP
# DHCP Management
/ip dhcp-server print
/ip dhcp-server lease print
/ip dhcp-server lease make-static [find mac-address=MAC-ADDRESS]
# NTP Time Sync
/system ntp client set enabled=yes
/system ntp client set primary-ntp=129.6.15.28
/system ntp client print
# Monitoring
/log print where topics~"dhcp"
What I Learned About RouterOS
Services start disabled - Always check if you need to enable things
Error messages can be confusing - Sometimes they mean success!
Domain names don't always work - Some services need IP addresses
Logging is your friend - Use it to see what's happening
MikroTik doesn't guess - You have to be explicit about everything
From Frustration to Understanding
Module 3 was where things started feeling "normal." Instead of fighting the system, I was beginning to understand its logic.
The network was finally behaving like people expect - plug in a device, and it just works. But I knew this was still just the beginning. So far, my network has had zero security. Anyone could connect and do anything.
Time to fix that...
This is part of my MikroTik Zero to Hero challenge. We're building toward a secure, professional network step by step.
Next up: Module 4 - Firewall Fundamentals (Time to lock things down!)
Subscribe to my newsletter
Read articles from Alex Nyambura directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
