MikroTik DHCP Server Configuration in RouterOS v7

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 sending broadcast message over 67/UDP port to any DHCP server and a DHCP server responses over 68/UDP 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 RouterOS including RouterOS v7 has a built-in DHCP service. So, system admin can easily turn MikroTik RouterOS into a DHCP server and can easily reduce his network administration task.




In my previous article, I discussed elaborately how to configure a MikroTik RouterOS v7 first time and in this article I am going to show how to configure a DHCP Server in MikroTik RouterOS v7.




MikroTik DHCP Server Setup in RouterOS 7




DHCP Service is built-in in MikroTik RouterOS v7 but not enabled by default. So, if we want to use DHCP Server in our network with MikroTik RouterOS v7, we have to setup and configure it.






But before going to start DHCP Server configuration in MikroTik RouterOS v7, I will show a basic network diagram as an example where a MikroTik Router is working as a DHCP Server as well as it is working as a network gateway. I hope, your network will be almost similar like the following network diagram and you will be able to run a smooth DHCP Server in your network with MikroTik RouterOS v7.




MikroTik DHCP Configuration
MikroTik DHCP Server Enabled Network




In the above network diagram, the ether1 interface of MikroTik Router is connected to an ISP for accessing internet and this interface is known as WAN. All LAN users are connected to ether2 interface through a network switch.




We will now enable DHCP Server on the ether2 interface so that all LAN users will get network information (IP, Subnet mask, Gateway and DNS) dynamically from this DHCP Server. But before enabling DHCP server in MikroTik RouterOS 7, we have to complete MikroTik RouterOS basic configuration. MikroTik RouterOS 7 basic configuration using Winbox or command was discussed in the previous article. So, follow that article for basic RouterOS 7 configuration and then follow the following steps for DHCP Server configuration using Winbox.







  • Go to IP > DHCP Server menu item from Winbox. DHCP Server window will appear.
  • In DHCP Server window, click on DHCP Setup button and choose the interface (in this article: ether2) on which you want to setup DHCP server from DHCP Server Interface drop-down menu and then click on Next button.
  • 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.
  • Choose gateway address for the given network in Gateway for DHCP Network input box and then click Next button.
  • Provide IP range from which DHCP client/LAN user will get IP in Address to Give Out input box and click Next button.
  • Provide preferred DNS server IP and click Next button.
  • Provide IP lease time and click Next button. Default lease time is 3 days.
  • DHCP setup is now complete and a successful message will be shown.




Now connect any IP device (Desktop, Laptop, Smartphone etc.) to your network. An IP will automatically be allocated for that device from MikroTik DHCP Server. Click Leases tab and observe IP lease status of that DHCP client.




DHCP Server configuration in MikroTik RouterOS7 has been explained step by step in this article. I hope, you will be able to configure DHCP Server in your network with MikroTik Router OS v7. However, if you face any confusion to configure a DHCP server in MikroTik Router OS7, feel free to discuss in comment or contact with me from Contact page. I will try my best stay with you.



2022-05-18T12:29:50
MikroTik DHCP Server Configuration Guides