Failover static and dynamic lease

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Failover static and dynamic lease

Marcos Renato da Silva Junior
Hi,

I have a server with static lease (some hosts) and dynamic lease (range
192.168.0.100 192.168.0.110;).

I want to add a second server for redundancy. Whats the better way?
Configure failover? or just keep identical copies from the dhcpd.conf
filein both servers?

Thanks.

--
Marcos Renato da Silva Junior
Universidade Estadual Paulista - Unesp
Faculdade de Engenharia de Ilha Solteira - FEIS
Departamento de Engenharia Elétrica
15385-000 - Ilha Solteira/SP
(18) 3743-1164

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: Failover static and dynamic lease

Patrick Trapp
What sort of redundancy do you seek? Do you want the second system to automatically provide addresses if the first system fails? Or are you OK with manually starting the replacement server?

Also, having an identical copy of the dhcpd.conf is one thing, but it doesn't hold your lease information, of course.

I would suggest failover if you really want redundancy, but I won't be much help configuring it as I inherited mine and have made almost no changes to it.

Patrick
________________________________________
From: [hidden email] [[hidden email]] on behalf of Marcos Renato da Silva Junior [[hidden email]]
Sent: Wednesday, May 25, 2016 1:56 PM
To: [hidden email]
Subject: Failover static and dynamic lease

Hi,

I have a server with static lease (some hosts) and dynamic lease (range
192.168.0.100 192.168.0.110;).

I want to add a second server for redundancy. Whats the better way?
Configure failover? or just keep identical copies from the dhcpd.conf
filein both servers?

Thanks.

--
Marcos Renato da Silva Junior
Universidade Estadual Paulista - Unesp
Faculdade de Engenharia de Ilha Solteira - FEIS
Departamento de Engenharia Elétrica
15385-000 - Ilha Solteira/SP
(18) 3743-1164

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Simon Hobson
In reply to this post by Marcos Renato da Silva Junior
Marcos Renato da Silva Junior <[hidden email]> wrote:

> I have a server with static lease (some hosts) and dynamic lease (range 192.168.0.100 192.168.0.110;).
>
> I want to add a second server for redundancy. Whats the better way? Configure failover? or just keep identical copies from the dhcpd.conf filein both servers?

For the static assignments (I assume host statements with fixed-address statement), it's sufficient to just duplicate the config on both servers.

For dynamic ranges you have choices.
"Failover" is one approach. With some caveats in terms of managing state, this allows one or other server to carry on if it's partner fails - leaving all clients with the same address.
If you have enough addresses, and don't mind hosts changing address if a server fails, then you can just configure two (or more if you want) servers with non-overlapping ranges. If a server fails, then clients will be unable to renew leases and will eventually get a new lease (different address) from another server. For this to work, you need enough addresses that if a server fails, the other server(s) have enough addresses to service all the clients.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Marcos Renato da Silva Junior
In reply to this post by Patrick Trapp
Automatically.

My scenario is :

server1 :
bind (master) - working
dhcp with ddns update - working

server2 :
bind (slave) - working
dhcp with ddns update - not working yet


Thanks for the suggestion.

Now I need to learn how to implement.Will be fun :)


Em 25-05-2016 16:34, Patrick Trapp escreveu:

> What sort of redundancy do you seek? Do you want the second system to automatically provide addresses if the first system fails? Or are you OK with manually starting the replacement server?
>
> Also, having an identical copy of the dhcpd.conf is one thing, but it doesn't hold your lease information, of course.
>
> I would suggest failover if you really want redundancy, but I won't be much help configuring it as I inherited mine and have made almost no changes to it.
>
> Patrick
> ________________________________________
> From: [hidden email] [[hidden email]] on behalf of Marcos Renato da Silva Junior [[hidden email]]
> Sent: Wednesday, May 25, 2016 1:56 PM
> To: [hidden email]
> Subject: Failover static and dynamic lease
>
> Hi,
>
> I have a server with static lease (some hosts) and dynamic lease (range
> 192.168.0.100 192.168.0.110;).
>
> I want to add a second server for redundancy. Whats the better way?
> Configure failover? or just keep identical copies from the dhcpd.conf
> filein both servers?
>
> Thanks.
>
> --
> Marcos Renato da Silva Junior
> Universidade Estadual Paulista - Unesp
> Faculdade de Engenharia de Ilha Solteira - FEIS
> Departamento de Engenharia Elétrica
> 15385-000 - Ilha Solteira/SP
> (18) 3743-1164
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>

--
Marcos Renato da Silva Junior
Universidade Estadual Paulista - Unesp
Faculdade de Engenharia de Ilha Solteira - FEIS
Departamento de Engenharia Elétrica
15385-000 - Ilha Solteira/SP
(18) 3743-1164

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Marcos Renato da Silva Junior
In reply to this post by Simon Hobson
Thanks for clarifying.

In my case the second choice also work well.

My project is to use two Raspberry Pi to manage my home network.

So no problem with hosts changing address and enough addresses.


Em 25-05-2016 16:48, Simon Hobson escreveu:

> Marcos Renato da Silva Junior <[hidden email]> wrote:
>
>> I have a server with static lease (some hosts) and dynamic lease (range 192.168.0.100 192.168.0.110;).
>>
>> I want to add a second server for redundancy. Whats the better way? Configure failover? or just keep identical copies from the dhcpd.conf filein both servers?
> For the static assignments (I assume host statements with fixed-address statement), it's sufficient to just duplicate the config on both servers.
>
> For dynamic ranges you have choices.
> "Failover" is one approach. With some caveats in terms of managing state, this allows one or other server to carry on if it's partner fails - leaving all clients with the same address.
> If you have enough addresses, and don't mind hosts changing address if a server fails, then you can just configure two (or more if you want) servers with non-overlapping ranges. If a server fails, then clients will be unable to renew leases and will eventually get a new lease (different address) from another server. For this to work, you need enough addresses that if a server fails, the other server(s) have enough addresses to service all the clients.
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>

--
Marcos Renato da Silva Junior
Universidade Estadual Paulista - Unesp
Faculdade de Engenharia de Ilha Solteira - FEIS
Departamento de Engenharia Elétrica
15385-000 - Ilha Solteira/SP
(18) 3743-1164

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Simon Hobson
Marcos Renato da Silva Junior <[hidden email]> wrote:

>> For dynamic ranges you have choices.
>> "Failover" is one approach. With some caveats in terms of managing state, this allows one or other server to carry on if it's partner fails - leaving all clients with the same address.
>> If you have enough addresses, and don't mind hosts changing address if a server fails, then you can just configure two (or more if you want) servers with non-overlapping ranges. If a server fails, then clients will be unable to renew leases and will eventually get a new lease (different address) from another server. For this to work, you need enough addresses that if a server fails, the other server(s) have enough addresses to service all the clients.

> In my case the second choice also work well.
>
> My project is to use two Raspberry Pi to manage my home network.
>
> So no problem with hosts changing address and enough addresses.

A couple of things to bear in mind.

BIND doesn't have the ability (AFAIK) to run a master/master system with failover. So regardless of what you do with DHCP, DNS will always have a single master - and if that goes down, DDNS updates will fail but the slave will be able to continue serving it's copy of the zone. Ie, with the master down, the DNS zone will still be served, but won't get updates.

If you use the second option of two independent DHCP masters, then DNS updates may work "oddly". If a client is unable to renew it's lease with one server, it'll get a lease from the other. So say A is down, B will attempt a DDNS update - but this will fail because the DNS entry is "owned"* by server A. Only when A expires the lease and removes it's DNS entries will B be able to replace them next time the client renews.

So in practice, DDNS won't work well in a failure scenario as clients will change address but their DNS entries won't follow suit.

* This is what the TXT record is for. It's a hash allowing a server to identify if it was the server that put a DNS record in - and it'll refuse to remove/replace one that doesn't "belong" to it.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Shawn Routhier

> On May 26, 2016, at 12:03 AM, Simon Hobson <[hidden email]> wrote:
>
>>
>
> A couple of things to bear in mind.
>
> BIND doesn't have the ability (AFAIK) to run a master/master system with failover. So regardless of what you do with DHCP, DNS will always have a single master - and if that goes down, DDNS updates will fail but the slave will be able to continue serving it's copy of the zone. Ie, with the master down, the DNS zone will still be served, but won't get updates.
>
> If you use the second option of two independent DHCP masters, then DNS updates may work "oddly". If a client is unable to renew it's lease with one server, it'll get a lease from the other. So say A is down, B will attempt a DDNS update - but this will fail because the DNS entry is "owned"* by server A. Only when A expires the lease and removes it's DNS entries will B be able to replace them next time the client renews.
>
> So in practice, DDNS won't work well in a failure scenario as clients will change address but their DNS entries won't follow suit.
>
> * This is what the TXT record is for. It's a hash allowing a server to identify if it was the server that put a DNS record in - and it'll refuse to remove/replace one that doesn't "belong" to it.

The TXT or DHCID records are linked to the client not the server.
If a client goes through two different severs but both are calculating the record
the same way then the second sever should be able to update the forward
record.  It is basically a hash of the duid or the client id or the hardware address.

The TXT record is used for the older “interim” DDNS code while the DHCID
record is used for the newer “standard” DDNS code defined in 4701-4704.

Shawn
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Marcos Renato da Silva Junior
In reply to this post by Simon Hobson


Em 26-05-2016 04:03, Simon Hobson escreveu:

> Marcos Renato da Silva Junior <[hidden email]> wrote:
>
>>> For dynamic ranges you have choices.
>>> "Failover" is one approach. With some caveats in terms of managing state, this allows one or other server to carry on if it's partner fails - leaving all clients with the same address.
>>> If you have enough addresses, and don't mind hosts changing address if a server fails, then you can just configure two (or more if you want) servers with non-overlapping ranges. If a server fails, then clients will be unable to renew leases and will eventually get a new lease (different address) from another server. For this to work, you need enough addresses that if a server fails, the other server(s) have enough addresses to service all the clients.
>> In my case the second choice also work well.
>>
>> My project is to use two Raspberry Pi to manage my home network.
>>
>> So no problem with hosts changing address and enough addresses.
> A couple of things to bear in mind.
>
> BIND doesn't have the ability (AFAIK) to run a master/master system with failover. So regardless of what you do with DHCP, DNS will always have a single master - and if that goes down, DDNS updates will fail but the slave will be able to continue serving it's copy of the zone. Ie, with the master down, the DNS zone will still be served, but won't get updates.

After configure failover in my environment these are my observations.

I do not know if they are correct.

server1 : DNS (master) + DHCP failover with DDNS
server2 : DNS (slave)    + DHCP failover with DDNS

If server1 fail, DDNS updates fail, but DNS queries and forwarding still
working and DHCP still delivering IPs (server2).
If server2 fail, DNS queries, forwarding and DDNS update still working
and DHCP still delivering IPs (server1).

If only DHCP service on server1 fail, DNS queries, forwarding and DDNS
update still working and DHCP still delivering IPs.
If only DNS service on server1 fail, DDNS updates fail, but DNS queries
and forwarding still working and DHCP still delivering IPs.

Given the options, I think this is the best choice.

>
> If you use the second option of two independent DHCP masters, then DNS updates may work "oddly". If a client is unable to renew it's lease with one server, it'll get a lease from the other. So say A is down, B will attempt a DDNS update - but this will fail because the DNS entry is "owned"* by server A. Only when A expires the lease and removes it's DNS entries will B be able to replace them next time the client renews.
>
> So in practice, DDNS won't work well in a failure scenario as clients will change address but their DNS entries won't follow suit.
>
> * This is what the TXT record is for. It's a hash allowing a server to identify if it was the server that put a DNS record in - and it'll refuse to remove/replace one that doesn't "belong" to it.

Later I thought the same, so I used failover.

> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>

--
Marcos Renato da Silva Junior
Universidade Estadual Paulista - Unesp
Faculdade de Engenharia de Ilha Solteira - FEIS
Departamento de Engenharia Elétrica
15385-000 - Ilha Solteira/SP
(18) 3743-1164

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Failover static and dynamic lease

Simon Hobson
Marcos Renato da Silva Junior <[hidden email]> wrote:

> After configure failover in my environment these are my observations.
>
> I do not know if they are correct.
>
> server1 : DNS (master) + DHCP failover with DDNS
> server2 : DNS (slave)    + DHCP failover with DDNS
>
> If server1 fail, DDNS updates fail, but DNS queries and forwarding still working and DHCP still delivering IPs (server2).
> If server2 fail, DNS queries, forwarding and DDNS update still working and DHCP still delivering IPs (server1).
>
> If only DHCP service on server1 fail, DNS queries, forwarding and DDNS update still working and DHCP still delivering IPs.
> If only DNS service on server1 fail, DDNS updates fail, but DNS queries and forwarding still working and DHCP still delivering IPs.

Correct.
That is exactly what I'd expect.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users