Community discussions

MikroTik App
 
tkgit
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Sun Dec 23, 2012 8:32 am
Location: Dunedin, NZ
Contact:

[ASK] multi DHCP servers for failover purpose

Sun Jan 06, 2013 3:38 pm

i have 2 routerboard to be used as failover dhcp servers, is there any option/menu/script for this?
if there isn't any facility for this,can i request for the next version?
 
Dobby
Member
Member
Posts: 400
Joined: Wed Jan 11, 2012 12:07 am
Location: Hogwarts

Re: [ASK] multi DHCP servers for failover purpose

Sun Jan 06, 2013 5:32 pm

Deleted because not related.
Last edited by Dobby on Mon Mar 11, 2013 2:07 am, edited 1 time in total.
 
User avatar
cbrown
Trainer
Trainer
Posts: 1842
Joined: Thu Oct 14, 2010 8:57 pm
Contact:

[ASK] multi DHCP servers for failover purpose

Sun Jan 06, 2013 6:18 pm

You could use authoritative and delay threshold to make the backup answer if the primary doesn't. But that won't help if the board has failed and has other functions.

http://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server
C.Brown

cbrown[at]cbrown.co
Telegram: @chris4brown
MTCNA - MTCRE - MTCWE - MTCTCE
MTCSE - TRAINER-0179
 
tkgit
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Sun Dec 23, 2012 8:32 am
Location: Dunedin, NZ
Contact:

Re: [ASK] multi DHCP servers for failover purpose

Sun Jan 06, 2013 10:52 pm

can i use ip->dhcp-server->alert option mixed with netwatch?

note:this routers for dhcp-server purpose only, not the backbone router running VRRP
 
User avatar
devi1
Trainer
Trainer
Posts: 19
Joined: Fri Aug 21, 2015 2:01 pm
Location: Russia, Chelyabinsk
Contact:

Re: [ASK] multi DHCP servers for failover purpose

Mon Aug 14, 2017 11:51 am

On Russian http://www.bubnovd.net/2017/07/dhcp-fai ... teros.html

Main DHCP server:
if ([:len [/file find name=leases.rsc]]>0) do={/file remove leases.rsc}
/ip dhcp-server lease export file=leases.rsc

Backup DHCP server:
if ([:len [/file find name=leases.rsc]]>0) do={/file remove leases.rsc}
/tool fetch mode=ftp address=192.168.1.1 src-path=leases.rsc user=FTP password=http://bubnovd.net
if ([:len [/file find name=leases.rsc]]>0) do={
foreach i in=[/ip dhcp-server lease find ] do={
/ip dhcp-server lease remove $i
};
import leases.rsc;
}
MTCNA, MTCRE, MTCTCE, MTCWE, MTCINE http://bubnovd.net
 
pe1chl
Forum Guru
Forum Guru
Posts: 6961
Joined: Mon Jun 08, 2015 12:09 pm

Re: [ASK] multi DHCP servers for failover purpose

Mon Aug 14, 2017 11:57 am

Instead of using methods to transfer the lease data, you can also allocate a subnet sufficiently large to hold
two times the number of hosts, and then just install 2 DHCP servers each with half of the usable space in the pool.
Of course the address of a system will change when it tries to renew its lease and the DHCP server that issued
the original lease is down.
 
troy
Member
Member
Posts: 310
Joined: Thu Jun 30, 2005 6:47 pm

Re: [ASK] multi DHCP servers for failover purpose

Wed Jan 17, 2018 6:52 pm

Great little script for that... appreciate it!

pe1chl, it's necessary because many of us make the leases static for IP assignment, rate limiting, or address-list assignments. Probably other reasons too...
 
nbctcp
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Tue Sep 16, 2014 7:32 pm

Re: [ASK] multi DHCP servers for failover purpose

Fri Oct 16, 2020 2:31 pm

@cbrown
I am not clear on this
1. "You could use authoritative and delay threshold to make the backup answer if the primary doesn't"
Do you mean 2xDHCP Server+delay threshold won't work as Active-Active meaning only Active-Standby.
if yes that mean I prefer not to use that solution

2. "But that won't help if the board has failed and has other functions"
Do you mean if whole host and not just DHCP1 service down, DHCP2 won't activate?
What will happen with DHCP2 if DHCP1+SSH service in HOST1 down

UPDATE1:
1. after reading this
https://maulanashio23.blogspot.com/2017 ... engan.html
clearly that delay-threshold is Active-Passive
2. so I think not too large subnet. just enough to handle total user, should be good
https://community.spiceworks.com/topic/ ... rge-subnet


You could use authoritative and delay threshold to make the backup answer if the primary doesn't. But that won't help if the board has failed and has other functions.

http://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server

Who is online

Users browsing this forum: andynorwich and 122 guests