In the MikroTik router has features that serve to distribution management IP address, namely DHCP (Dynamic Host Confguration Protocol). Among the DHCP feature that is supported by MikroTik among others DHCP Server, DHCP Client and DHCP Relay. Perhaps among us are already familiar with DHCP Server and DHCP Client on MikroTik since these two features are often used in network configuration. Now we will learn about the DHCP function.
In the MikroTik router, DHCP Relay is a method for the distribution of IP addresses to client devices by utilizing a centralized DHCP server on another router. That is to say router to DHCP relay only continue ‘DHCP Request‘ from the client to a DHCP server. This is especially helpful if client devices are not in a network with a DHCP server.
In the picture above, there is a CCR router that becomes a DHCP server and RB941 (HAP–lite) to DHCP Relay. And there are two networks that are in HAP–Lite is 192.168.1.0/24 and 192.168.2.0/24. And for the distribution of IP addresses to each network in Hap–Lite will take away from the DHCP server CCR. The configuration steps are as follows:
We will create a range of IP addresses for the two networks above is 192.168.1.0/24 and 192.168.2.0/24. Select IP menu –> Pool and we specify the range of IP addresses for each network.
Next we will make a second DHCP server for the IP address of the second distribution network above. Select the IP menu –> DHCP Server –> click Add [+]. Add and enter parameters such as the following display.
DHCP Server – The first network (192.168.1.0/24)
DHCP Server – Network Second (192.168.2.0/24)
Once we add the DHCP server on, then we will add a distribution network that will get the IP address from the DHCP server. Select IP menu –> DHCP Server –> Networks.
Network 1 (192.168.1.0/24)
Then we will configure the router acts as a DHCP Relay. Select IP menu –> DHCP Relay –> click ADD [+]. Because we have two networks, then we will add the two DHCP Relay. Fill parameters are available as in the following display.
DHCP Relay – Network 1 (192.168.1.0/24)
DHCP Relay – Network 2 (192.168.2.0/24)
At this point if the client on each network do ‘DHCP Request‘, then the allocation of IP Address will be obtained from a DHCP server in the CCR distribution.