DHCP Server Configuration in MikroTik Router

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol where a DHCP server automatically provides an Internet Protocol (IP) address and other related information such as subnet mask, default gateway and DNS to DHCP clients. DHCP server and client use UDP port 67 and 68 for communication. In a network, a DHCP client (IP devices such as Desktop, Laptop, Smartphone etc.) requests for an IP lease to DHCP servers and a DHCP server responses allocating IP address and other related IP information for a certain period. So, a DHCP server reduces huge network administration tasks of a system administrator. Every MikroTik Router has a built-in DHCP service. So, system admin can easily turn MikroTik Router into a DHCP server and can easily reduce his network administration task.

MikroTik DHCP Server configuration

Generally, every MikroTik router has a built-in DHCP service. So, if you have a MikroTik router and you want to enable a DHCP server in your network with MikroTik router to reduce your administrator task, keep reading the rest of this article where I will show you how to configure a DHCP server in your MikroTik router.

Before going to start configuring a DHCP server in MikroTik router, I will show you a basic network diagram where a MikroTik router is working as a DHCP server as well as it is working as a network gateway. I hope, your network is almost same like the below network diagram and you want to enable a DHCP server in your MikroTik router.

DHCP Enabled Network Diagram with MikroTik Router
DHCP Enabled Network Diagram with MikroTik Router

In the above network diagram, the first interface (ether1 port) of MikroTik router is connected to an ISP for accessing internet and this interface is known as WAN port. All the LAN users are connected to second interface (ether2 port) of MikroTik router through a network switch. We will now enable DHCP server in this second interface so that all the LAN users will get network information (IP, Subnet mask, Gateway and DNS) dynamically from this DHCP server to access internet. But before enabling DHCP server in MikroTik router, you have to complete MikroTik router basic configuration. Basic configuration includes WAN and LAN IP assigning, Gateway IP assigning, DNS configuration and NAT rule creation. If you are a new MikroTik user, please spend some time to study my previous article about MikroTik Router Basic Configuration using Winbox and complete the basic configuration of your MikroTik router and then follow my below steps to enable DHCP server in your MikroTik router.

  1. Go to IP > DHCP Server menu from your winbox. DHCP Server window will appear.
  2. In DHCP Server window, click on DHCP Setup button and choose the interface (in this article: ether2) in which you want to setup DHCP server from DHCP Server Interface drop-down menu and then click on Next button.
  3. Now put your LAN network block in DHCP Address Space input box and click Next button. DHCP client/LAN user will get IP from this network.
  4. Choose gateway address for the given network in Gateway for DHCP Network input box and then click Next button.
  5. Provide IP range from which your DHCP client/LAN user will get IP in Address to Give Out input box and click Next button.
  6. Provide preferred DNS server IP and click Next button.
  7. Now provide IP lease time and click Next button. Default lease time is 3 days.
  8. DHCP setup is complete now and a successful message will be shown.
  9. Now connect any IP device (Desktop, Laptop, Smartphone etc.) to your network. Automatically an IP will be allocated for that device from your MikroTik DHCP server. Click Leases tab and observe IP lease status of that DHCP client.

If you follow the above steps carefully, your MikroTik router will turn into a DHCP server and your LAN users will now be able to obtain IP information from your MikroTik DHCP server. However, if you face any problem to enable DHCP server in your MikroTik router, watch my below video about DHCP Server configuration in MikroTik Router. I hope, it will help you to configure your MikroTik DHCP server successfully.

DHCP server configuration in MikroTik Router has been explained step by step in this article. A video tutorial has also been uploaded so that you can configure DHCP server in MikroTik router without any confusion. However, if you face any problem to configure a DHCP server in your MikroTik router, feel free to discuss in comment or contact with me from Contact page. I will try my best stay with you.

Why not a Cup of COFFEE if the solution?

dhcp-server-configuration-in-mikrotik-router

ABU SAYEED

I am a system administrator and like to share knowledge that I am learning from my daily experience. I usually work on MikroTik, Redhat/CentOS Linux, Windows Server, physical server and storage, virtual technology and other system related topics. Follow Me: Facebook, Twitter and Linkedin.

Your name can also be listed here. Have an IT topic? Submit it here to become a System Zone author.

11 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*