Community discussions

MikroTik App
 
someone2
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Sun Jan 07, 2018 9:52 pm

Dhcp relay and dhcp server

Sun Mar 28, 2021 11:08 am

I want to set both dhcp relay and dhcp server on a router. I mean when the remote dhcp server is reachable , the clients get ip from dhcp relay and when the remote server is unreachable, the router itself can provide ip for client with dhcp server configuration.
Is it ppssible?
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 991
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: Dhcp relay and dhcp server

Sun Mar 28, 2021 11:44 am

Perhaps you want to make sure you have 2 "relays" configured ?
And then arrange things on the DHCP-server side. There are various ways to make a solid DHCP-architecture depending on the type of DHCP-server in use.

Alternatively I think could configure some "netwatch" entry on the Mikrotik to "ping" the remote DHCP-server it is "alive". (but that does not guarantee the correct operation of the DHCP-service itself)

If that goes down you could fire of a routerOS command to enable the local DHCP-server. The problem is that is does not have a clue about what leases have been allocated by your remote DHCP server etc. So you need to think this through, use some scope-splitting or whatever.

Who is online

Users browsing this forum: Bing [Bot], iaming, jajo10, johnson73, KpuCko, mwm1x, pepe262 and 122 guests