Community discussions

MikroTik App
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 2:27 am

Hi, i have a network of over 300 dhcp clients and i want to use 3 routers with one dhcp each. Clients should get an ip from one router , but be able to talk to the other clients that have acquired ip from an other dhcp. No internet, its just an intranet.
How to set up this please?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19325
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 2:47 am

How many ISPs do you have and what is their throughput.........
which 3 routers are you using.
what is the price of tea in china,
What is the airspeed velocity of an unladen swallow,,,,,,
do you mean the european swallow or the african swallow................
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1280
Joined: Tue Jun 23, 2015 2:35 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 3:52 am

u can play with delay threshold, but be careful, do small lab and test it first.
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 9:34 am

Thanks for the reply.
3x RB951G running mipsbe and one dhcp each. No ISP. Just plain intranet.
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 9:36 am

How many ISPs do you have and what is their throughput.........
which 3 routers are you using.
what is the price of tea in china,
What is the airspeed velocity of an unladen swallow,,,,,,
do you mean the european swallow or the african swallow................
Thanks for the reply.
3x RB951G running mipsbe and one dhcp each. No ISP. Just plain intranet. i just need my clients to get an ip and see each other. nothing more.
Last edited by ccz117 on Tue Mar 07, 2023 9:40 am, edited 1 time in total.
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 9:38 am

u can play with delay threshold, but be careful, do small lab and test it first.
Thanks for the tip. but im a beginner, i need to do some other steps first. can you quide a little? thanks
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 990
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 9:44 am

Since it is only "Intranet" you can deal with the failover/redudancy by using a larger scope and divide it across the 3

Eg. 172.16.0.0/16 , so this is a large IP-space, especially for only 300 devices.

On all 3 , the "network" would be 172.16.0.0/16 , but the differences will be in the ip-pools
Router 1 : Have it distribute 172.16.1.1 up to 172.16.2.254 , provide mask 255.255.0.0 and the gateway if needed ? (eg. gateway 172.16.0.1) and create such interface on your LAN
Router 2 : Have it distribute 172.16.3.1 up to 172.16.4.254 , provide mask 255.255.0.0
Router 3 : Have it distribute 172.16.5.1 up to 172.16.6.254 , provide mask 255.255.0.0

So, the client will cry for a dhcp-offer and the first to respond will make it happen, IF even 2 of your routers are "out", 1 router still has a "pool" large enough to provide for 300 clients.

Don't worry about "load balancing" , 300 clients is ... nothing ....if you would say I have 10.000 or 30.000 endpoint then you need to make some solid dhcp-architecture too.
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 10:28 am

Since it is only "Intranet" you can deal with the failover/redudancy by using a larger scope and divide it across the 3

Eg. 172.16.0.0/16 , so this is a large IP-space, especially for only 300 devices.

On all 3 , the "network" would be 172.16.0.0/16 , but the differences will be in the ip-pools
Router 1 : Have it distribute 172.16.1.1 up to 172.16.2.254 , provide mask 255.255.0.0 and the gateway if needed ? (eg. gateway 172.16.0.1) and create such interface on your LAN
Router 2 : Have it distribute 172.16.3.1 up to 172.16.4.254 , provide mask 255.255.0.0
Router 3 : Have it distribute 172.16.5.1 up to 172.16.6.254 , provide mask 255.255.0.0

So, the client will cry for a dhcp-offer and the first to respond will make it happen, IF even 2 of your routers are "out", 1 router still has a "pool" large enough to provide for 300 clients.

Don't worry about "load balancing" , 300 clients is ... nothing ....if you would say I have 10.000 or 30.000 endpoint then you need to make some solid dhcp-architecture too.
thank you so much for the reply.
So, like this my clients can see each other, even if they get an ip from a different dhcp server?
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 990
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 10:45 am

Since it is only "Intranet" you can deal with the failover/redudancy by using a larger scope and divide it across the 3

Eg. 172.16.0.0/16 , so this is a large IP-space, especially for only 300 devices.

On all 3 , the "network" would be 172.16.0.0/16 , but the differences will be in the ip-pools
Router 1 : Have it distribute 172.16.1.1 up to 172.16.2.254 , provide mask 255.255.0.0 and the gateway if needed ? (eg. gateway 172.16.0.1) and create such interface on your LAN
Router 2 : Have it distribute 172.16.3.1 up to 172.16.4.254 , provide mask 255.255.0.0
Router 3 : Have it distribute 172.16.5.1 up to 172.16.6.254 , provide mask 255.255.0.0

So, the client will cry for a dhcp-offer and the first to respond will make it happen, IF even 2 of your routers are "out", 1 router still has a "pool" large enough to provide for 300 clients.

Don't worry about "load balancing" , 300 clients is ... nothing ....if you would say I have 10.000 or 30.000 endpoint then you need to make some solid dhcp-architecture too.
thank you so much for the reply.
So, like this my clients can see each other, even if they get an ip from a different dhcp server?
They are all in 1 large IP-space so they can communicate with each other, and the DHCP-server does not matter.
Can you draw how these 300 clients are connected ? I mean, you must have various LAN-switches and somewhere these 3 RB915G's must also be in that same IP-space.
As long as you provide a 255.255.0.0 "mask" to each client within that large 172.16.x.x "block" you are good.
I assume you do not have anything like VLAN's ? Just 1 "flat" network ?
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 11:00 am


thank you so much for the reply.
So, like this my clients can see each other, even if they get an ip from a different dhcp server?
They are all in 1 large IP-space so they can communicate with each other, and the DHCP-server does not matter.
Can you draw how these 300 clients are connected ? I mean, you must have various LAN-switches and somewhere these 3 RB915G's must also be in that same IP-space.
As long as you provide a 255.255.0.0 "mask" to each client within that large 172.16.x.x "block" you are good.
I assume you do not have anything like VLAN's ? Just 1 "flat" network ?
Hi. yes, its plain flat. the reason i am using 3x dhcp is frequent power cuts that can affect one or two routers...so at least one can serve the clients remaining.
Question: the clients will not need a gateway? if an assign one, and its the one going down what happens?
Thank you again for your time.
 
wiseroute
Member
Member
Posts: 352
Joined: Sun Feb 05, 2023 11:06 am

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 12:09 pm

hi.
Question: the clients will not need a gateway? if an assign one, and its the one going down what happens?
did you mean: each dhcp server provides it's own gateway?

sure. no problem. each dhcp server in the same subnet needs separate block to offer, along with their specific setting. but unfortunately it doesn't work smoothly on session based traffic.

you can specify as many gateway as you want in dhcp server gateway options settings for your clients use, but that method won't work magically for any fail over for dhcp clients.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19325
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 12:42 pm

It seems what you need are three UPS, more than anything.
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 990
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 9:46 pm

Hi. yes, its plain flat. the reason i am using 3x dhcp is frequent power cuts that can affect one or two routers...so at least one can serve the clients remaining.
Question: the clients will not need a gateway? if an assign one, and its the one going down what happens?
Thank you again for your time.
Ahhh..that is not going to work ;-) You cannot gain failover with regards to that aspect.
If you have 1 "flat" network why not look at VRRP ?
If you network is flat and you don't have Internet ... WHAT IS the gateway ? You need one ? Is any of these 3 routers a gateway to somewhere ??
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19325
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 10:02 pm

No, dont tell me you need to see a network diagram and a better understanding of the requirements.....
JV now fully engaged in playing whackamole LOL ( not even a full config seen yet )
 
ccz117
just joined
Topic Author
Posts: 20
Joined: Thu Jan 26, 2023 6:07 pm

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 10:51 pm


Hi. yes, its plain flat. the reason i am using 3x dhcp is frequent power cuts that can affect one or two routers...so at least one can serve the clients remaining.
Question: the clients will not need a gateway? if an assign one, and its the one going down what happens?
Thank you again for your time.
Ahhh..that is not going to work ;-) You cannot gain failover with regards to that aspect.
If you have 1 "flat" network why not look at VRRP ?
If you network is flat and you don't have Internet ... WHAT IS the gateway ? You need one ? Is any of these 3 routers a gateway to somewhere ??
Hi again, i have tried without a gateway and it seems to work. VRRR seems nice though, i ll give it a try. thanks my friend.
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 990
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: How to use 3 DHCP for load balancing and Failover

Tue Mar 07, 2023 11:07 pm


Ahhh..that is not going to work ;-) You cannot gain failover with regards to that aspect.
If you have 1 "flat" network why not look at VRRP ?
If you network is flat and you don't have Internet ... WHAT IS the gateway ? You need one ? Is any of these 3 routers a gateway to somewhere ??
Hi again, i have tried without a gateway and it seems to work. VRRR seems nice though, i ll give it a try. thanks my friend.
If you only need to communicate among your 300 clients you do not need a gateway. Case closed and this solution will work.
If you have some requirement for some concept of gateway, please post a drawing because things can get more complex quickly.

Who is online

Users browsing this forum: No registered users and 115 guests