Pi as a secondary DHCP server

hi folks,

i am using an openwrt-based router (librerouter) as my primary router. and i want to use a raspberry pi as a secondary dhcp server if and when my primary router turns off (because its power source is not reliable as of now). is it possible to do this. and any help how to do, will be really great.

thanks

I don't see the point of having a backup DHCP server when the router and primary DHCP server is offline.
Unless there is a secondary internet uplink. Otherwise increase the lease time in order for the hosts to have an IP until the router is rebooted.

In any case it is feasible. The address pool must be split between the dhcp servers, so first server allocates 192.168.1.100-149 and the second 192.168.1.150-199. Static leases must be added to both of them.

1 Like

there are a lot of local services that my pi is hosting. so there will be users wanting to connect to the network even if the internet uplink through my primary router is down.

i don't want the pi to act as DHCP server when the primary is on. is it possible to activate only when the primary router is down?

Also, how do I increase the lease time in openwrt router?

that's not secondary... it's more like a "failover dhcp server"... and it doesn't make much practical sense.

change it ( interfaces > lan [edit] > dhcp server )

1 Like