|
|
Hi guys,
I'm having an issue with a setup where I can't set static leases.
My software uses the omapi to add leases to the dhcpd.leases file but
I need to make sure I can have the same leases as "backup" on my
secondary DHCP server so if the primary fails, the secondary hands out
the same addresses to the same clients.
I was thinking about syncing the leases file but this might be not a good idea.
Is it possible what I try to do ?
Thanks,
Cheers,
Matt
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
On 6 August 2016 at 21:09, Matt . < [hidden email]> wrote:
> True, but this doesn't hand out the same IP to a client when I bring
> down my primary.
>
> Do I need to use a specific split parameter ?
You must not of configured it correctly, or your clients are not using
the same MAC address, as that is exactly what it is supposed to do
(renew the same IP address when a peer fails).
Leave split value as 128 (all it determines is which peer will hand
out the initial IP address to a client).
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
On 6 August 2016 at 21:18, Matt . < [hidden email]> wrote:
> I configured it like:
>
> https://www.madboa.com/geek/dhcp-failover/OK, so what's not working? Can you show the logs from the DHCP servers
showing what is/isn't happening?
When both peers are online and in NORMAL state, one of them will
respond to the initial DHCPDISCOVER (make sure your IP helpers are
sending the messages to both DHCP servers simultaneously), when one
peer fails and they go into COMMUNICATIONS-INTERRUPTED the one that's
remaining will renew any DHCPREQUESTs from the client (might take up
to T2 before the renewal will take place).
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
What you say happens, but when I reboot a machine with the secondary
dhcp server available only it doesn't get the same IP as it did before
failover....
You say I should see a refresh of all IP's/Mac as they were assigned
on the primary ? I need to check but I don't see that think.
2016-08-06 22:24 GMT+02:00 S Carr < [hidden email]>:
> On 6 August 2016 at 21:18, Matt . < [hidden email]> wrote:
>> I configured it like:
>>
>> https://www.madboa.com/geek/dhcp-failover/>
> OK, so what's not working? Can you show the logs from the DHCP servers
> showing what is/isn't happening?
>
> When both peers are online and in NORMAL state, one of them will
> respond to the initial DHCPDISCOVER (make sure your IP helpers are
> sending the messages to both DHCP servers simultaneously), when one
> peer fails and they go into COMMUNICATIONS-INTERRUPTED the one that's
> remaining will renew any DHCPREQUESTs from the client (might take up
> to T2 before the renewal will take place).
> _______________________________________________
> 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
|
|
On 6 August 2016 at 21:29, Matt . < [hidden email]> wrote:
> What you say happens, but when I reboot a machine with the secondary
> dhcp server available only it doesn't get the same IP as it did before
> failover....
>
> You say I should see a refresh of all IP's/Mac as they were assigned
> on the primary ? I need to check but I don't see that think.
Primary should be syncing the leases to the secondary (and vice-versa)
so both peers have the same MAC to IP mapping for the client. Normally
DHCPD doesn't purge/reuse IP addresses until it needs to, so as long
as you have sufficient IP addresses in the subnet then the client
should get the same IP it had previously.
If it's not then either your client is changing it's MAC address or
something else is causing DHCPD to reuse the lease once the client
releases it on shutdown, so it's not available when it comes back
online.
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
OK, thanks for that information, that helps.
I have both of my dhcp servers as DHCP-helper in my switches so that
should normally work the way it should.
I need to higher up my logs to see what happens in syncing and will update here.
2016-08-06 22:43 GMT+02:00 S Carr < [hidden email]>:
> On 6 August 2016 at 21:29, Matt . < [hidden email]> wrote:
>> What you say happens, but when I reboot a machine with the secondary
>> dhcp server available only it doesn't get the same IP as it did before
>> failover....
>>
>> You say I should see a refresh of all IP's/Mac as they were assigned
>> on the primary ? I need to check but I don't see that think.
>
> Primary should be syncing the leases to the secondary (and vice-versa)
> so both peers have the same MAC to IP mapping for the client. Normally
> DHCPD doesn't purge/reuse IP addresses until it needs to, so as long
> as you have sufficient IP addresses in the subnet then the client
> should get the same IP it had previously.
>
> If it's not then either your client is changing it's MAC address or
> something else is causing DHCPD to reuse the lease once the client
> releases it on shutdown, so it's not available when it comes back
> online.
> _______________________________________________
> 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
|
|
> On Aug 6, 2016, at 1:43 PM, S Carr < [hidden email]> wrote:
>
> On 6 August 2016 at 21:29, Matt . < [hidden email]> wrote:
>> What you say happens, but when I reboot a machine with the secondary
>> dhcp server available only it doesn't get the same IP as it did before
>> failover....
>>
>> You say I should see a refresh of all IP's/Mac as they were assigned
>> on the primary ? I need to check but I don't see that think.
>
> Primary should be syncing the leases to the secondary (and vice-versa)
> so both peers have the same MAC to IP mapping for the client. Normally
> DHCPD doesn't purge/reuse IP addresses until it needs to, so as long
> as you have sufficient IP addresses in the subnet then the client
> should get the same IP it had previously.
It is true that the servers don’t purge leases in general.
But if the lease is allowed to expire it will go to either
free (on the primary) or backup (on the secondary).
If the server that owns that address is unavailable then
when the other server provides an address the client
won’t be able to get the original address.
>
> If it's not then either your client is changing it's MAC address or
> something else is causing DHCPD to reuse the lease once the client
> releases it on shutdown, so it's not available when it comes back
> online.
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-usersshawn
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
Nail; This helps a lot in clearification. Shawn the same for you.
The issue is that the dynamic leases with hostname and such on the
primary are not seen on the secondary in the leases file. I would
say... somewhere had to be that information like the same ? I only see
"free" ones on the secondary where a test client which has a dynamic
entry on the master is "free" without any further information (so
hostname) on the secondary.
So that is where my lease goes wrong when I turn off the primary,
reboot the client and the secondary hands out... it just picks an
available IP from the pool/range.
2016-08-06 23:20 GMT+02:00 Shawn Routhier < [hidden email]>:
>
>> On Aug 6, 2016, at 1:43 PM, S Carr < [hidden email]> wrote:
>>
>> On 6 August 2016 at 21:29, Matt . < [hidden email]> wrote:
>>> What you say happens, but when I reboot a machine with the secondary
>>> dhcp server available only it doesn't get the same IP as it did before
>>> failover....
>>>
>>> You say I should see a refresh of all IP's/Mac as they were assigned
>>> on the primary ? I need to check but I don't see that think.
>>
>> Primary should be syncing the leases to the secondary (and vice-versa)
>> so both peers have the same MAC to IP mapping for the client. Normally
>> DHCPD doesn't purge/reuse IP addresses until it needs to, so as long
>> as you have sufficient IP addresses in the subnet then the client
>> should get the same IP it had previously.
>
> It is true that the servers don’t purge leases in general.
> But if the lease is allowed to expire it will go to either
> free (on the primary) or backup (on the secondary).
>
> If the server that owns that address is unavailable then
> when the other server provides an address the client
> won’t be able to get the original address.
>>
>> If it's not then either your client is changing it's MAC address or
>> something else is causing DHCPD to reuse the lease once the client
>> releases it on shutdown, so it's not available when it comes back
>> online.
>
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users>
> 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
|
|
Matt . < [hidden email]> wrote:
> I'm having an issue with a setup where I can't set static leases.
Define what you mean by static leases.
Do you mean a host statement with a "fixed address" statement, or a lease with the reserved flag set ?
I assume you mean the former, and that means that what you are setting isn't a "lease" in the conventional sense - host statements with fixed address do not create a lease through the normal lifetime. Normally these do not appear in the leases file at all, and I suspect that they do not get processed by failover either.
I'm assuming that they appear in the leases file when created via OMAPI as otherwise there would be no persistent storage of them.
So in this case, you need to apply the change to both servers.
Or, use reserved leases and failover which should work.
BTW - syncing the leases file is "fraught with difficulties" and is guaranteed to break things unless you use nothing but these static leases. The server you sync the file *to* will ignore it unless you stop the dhcpd service, swap out the file, and start the dhcpd service. This is because the leases file is "write only" - it is read once at service startup, and then it is only written (so there's persistent storage) - all the working data is held in ram.
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
What I mean by static leases is:
host myhostname {
hardware ethernet 00:20:00:2c:5b:7a;
fixed-address 192.168.1.250;
}
That is what I cannot do, but is no issue if the added leases my
omapi, so reserved flag as you call them, are synched to the secondary
server, and that is not happening it seems.
I need to know if it doesn't happen at all and it's not the way how
it's designed or something is just not working here.
2016-08-07 13:44 GMT+02:00 Simon Hobson < [hidden email]>:
> Matt . < [hidden email]> wrote:
>
>> I'm having an issue with a setup where I can't set static leases.
>
> Define what you mean by static leases.
>
> Do you mean a host statement with a "fixed address" statement, or a lease with the reserved flag set ?
>
> I assume you mean the former, and that means that what you are setting isn't a "lease" in the conventional sense - host statements with fixed address do not create a lease through the normal lifetime. Normally these do not appear in the leases file at all, and I suspect that they do not get processed by failover either.
> I'm assuming that they appear in the leases file when created via OMAPI as otherwise there would be no persistent storage of them.
>
> So in this case, you need to apply the change to both servers.
>
> Or, use reserved leases and failover which should work.
>
> BTW - syncing the leases file is "fraught with difficulties" and is guaranteed to break things unless you use nothing but these static leases. The server you sync the file *to* will ignore it unless you stop the dhcpd service, swap out the file, and start the dhcpd service. This is because the leases file is "write only" - it is read once at service startup, and then it is only written (so there's persistent storage) - all the working data is held in ram.
>
> _______________________________________________
> 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
|
|
This style of host declaration creates a static lease. If it set in
dhcpd.conf it does not generate an entry in the leases file, and it is not
handled by the failover protocol.
In your case, if you add the entry via omapi, then you need to do the same
operation to the second dhcp server.
The equivalent would be defining the host declarations in the dhcpd.conf
on both dhcp servers.
regards,
-glenn
On Sun, August 7, 2016 10:05 pm, Matt . wrote:
> What I mean by static leases is:
>
> host myhostname {
> hardware ethernet 00:20:00:2c:5b:7a;
> fixed-address 192.168.1.250;
> }
>
> That is what I cannot do, but is no issue if the added leases my
> omapi, so reserved flag as you call them, are synched to the secondary
> server, and that is not happening it seems.
>
> I need to know if it doesn't happen at all and it's not the way how
> it's designed or something is just not working here.
>
>
>
>
> 2016-08-07 13:44 GMT+02:00 Simon Hobson < [hidden email]>:
>> Matt . < [hidden email]> wrote:
>>
>>> I'm having an issue with a setup where I can't set static leases.
>>
>> Define what you mean by static leases.
>>
>> Do you mean a host statement with a "fixed address" statement, or a
>> lease with the reserved flag set ?
>>
>> I assume you mean the former, and that means that what you are setting
>> isn't a "lease" in the conventional sense - host statements with fixed
>> address do not create a lease through the normal lifetime. Normally
>> these do not appear in the leases file at all, and I suspect that they
>> do not get processed by failover either.
>> I'm assuming that they appear in the leases file when created via OMAPI
>> as otherwise there would be no persistent storage of them.
>>
>> So in this case, you need to apply the change to both servers.
>>
>> Or, use reserved leases and failover which should work.
>>
>> BTW - syncing the leases file is "fraught with difficulties" and is
>> guaranteed to break things unless you use nothing but these static
>> leases. The server you sync the file *to* will ignore it unless you stop
>> the dhcpd service, swap out the file, and start the dhcpd service. This
>> is because the leases file is "write only" - it is read once at service
>> startup, and then it is only written (so there's persistent storage) -
>> all the working data is held in ram.
>>
>> _______________________________________________
>> 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>
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
OK, this clears it out.
Why would it not be possible to sync the leases file then ? Or is
there some other database style file which going to be corrupted or is
it that the running proces doesn't know the synced data on the host
which hasn't have it added through omapi ?
2016-08-07 14:18 GMT+02:00 Glenn Satchell < [hidden email]>:
> This style of host declaration creates a static lease. If it set in
> dhcpd.conf it does not generate an entry in the leases file, and it is not
> handled by the failover protocol.
>
> In your case, if you add the entry via omapi, then you need to do the same
> operation to the second dhcp server.
>
> The equivalent would be defining the host declarations in the dhcpd.conf
> on both dhcp servers.
>
> regards,
> -glenn
>
> On Sun, August 7, 2016 10:05 pm, Matt . wrote:
>> What I mean by static leases is:
>>
>> host myhostname {
>> hardware ethernet 00:20:00:2c:5b:7a;
>> fixed-address 192.168.1.250;
>> }
>>
>> That is what I cannot do, but is no issue if the added leases my
>> omapi, so reserved flag as you call them, are synched to the secondary
>> server, and that is not happening it seems.
>>
>> I need to know if it doesn't happen at all and it's not the way how
>> it's designed or something is just not working here.
>>
>>
>>
>>
>> 2016-08-07 13:44 GMT+02:00 Simon Hobson < [hidden email]>:
>>> Matt . < [hidden email]> wrote:
>>>
>>>> I'm having an issue with a setup where I can't set static leases.
>>>
>>> Define what you mean by static leases.
>>>
>>> Do you mean a host statement with a "fixed address" statement, or a
>>> lease with the reserved flag set ?
>>>
>>> I assume you mean the former, and that means that what you are setting
>>> isn't a "lease" in the conventional sense - host statements with fixed
>>> address do not create a lease through the normal lifetime. Normally
>>> these do not appear in the leases file at all, and I suspect that they
>>> do not get processed by failover either.
>>> I'm assuming that they appear in the leases file when created via OMAPI
>>> as otherwise there would be no persistent storage of them.
>>>
>>> So in this case, you need to apply the change to both servers.
>>>
>>> Or, use reserved leases and failover which should work.
>>>
>>> BTW - syncing the leases file is "fraught with difficulties" and is
>>> guaranteed to break things unless you use nothing but these static
>>> leases. The server you sync the file *to* will ignore it unless you stop
>>> the dhcpd service, swap out the file, and start the dhcpd service. This
>>> is because the leases file is "write only" - it is read once at service
>>> startup, and then it is only written (so there's persistent storage) -
>>> all the working data is held in ram.
>>>
>>> _______________________________________________
>>> 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>>
>
>
> _______________________________________________
> 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
|
|
Hi Matt
If you are running failover, then the dhcpd.leases files on each system
are not the same. It records information about the state of the partner's
leases and it's own leases with different flags. If you search through the
file on each system looking for a lease for the same IP address you can
see what I mean.
There is more info in the dhcpd.leases man page, although most of the
discussion is about the file format.
regards,
-glenn
On Sun, August 7, 2016 11:58 pm, Matt . wrote:
> OK, this clears it out.
>
> Why would it not be possible to sync the leases file then ? Or is
> there some other database style file which going to be corrupted or is
> it that the running process doesn't know the synced data on the host
> which hasn't have it added through omapi ?
>
>
>
>
> 2016-08-07 14:18 GMT+02:00 Glenn Satchell < [hidden email]>:
>> This style of host declaration creates a static lease. If it set in
>> dhcpd.conf it does not generate an entry in the leases file, and it is
>> not
>> handled by the failover protocol.
>>
>> In your case, if you add the entry via omapi, then you need to do the
>> same
>> operation to the second dhcp server.
>>
>> The equivalent would be defining the host declarations in the dhcpd.conf
>> on both dhcp servers.
>>
>> regards,
>> -glenn
>>
>> On Sun, August 7, 2016 10:05 pm, Matt . wrote:
>>> What I mean by static leases is:
>>>
>>> host myhostname {
>>> hardware ethernet 00:20:00:2c:5b:7a;
>>> fixed-address 192.168.1.250;
>>> }
>>>
>>> That is what I cannot do, but is no issue if the added leases my
>>> omapi, so reserved flag as you call them, are synched to the secondary
>>> server, and that is not happening it seems.
>>>
>>> I need to know if it doesn't happen at all and it's not the way how
>>> it's designed or something is just not working here.
>>>
>>>
>>>
>>>
>>> 2016-08-07 13:44 GMT+02:00 Simon Hobson < [hidden email]>:
>>>> Matt . < [hidden email]> wrote:
>>>>
>>>>> I'm having an issue with a setup where I can't set static leases.
>>>>
>>>> Define what you mean by static leases.
>>>>
>>>> Do you mean a host statement with a "fixed address" statement, or a
>>>> lease with the reserved flag set ?
>>>>
>>>> I assume you mean the former, and that means that what you are setting
>>>> isn't a "lease" in the conventional sense - host statements with fixed
>>>> address do not create a lease through the normal lifetime. Normally
>>>> these do not appear in the leases file at all, and I suspect that they
>>>> do not get processed by failover either.
>>>> I'm assuming that they appear in the leases file when created via
>>>> OMAPI
>>>> as otherwise there would be no persistent storage of them.
>>>>
>>>> So in this case, you need to apply the change to both servers.
>>>>
>>>> Or, use reserved leases and failover which should work.
>>>>
>>>> BTW - syncing the leases file is "fraught with difficulties" and is
>>>> guaranteed to break things unless you use nothing but these static
>>>> leases. The server you sync the file *to* will ignore it unless you
>>>> stop
>>>> the dhcpd service, swap out the file, and start the dhcpd service.
>>>> This
>>>> is because the leases file is "write only" - it is read once at
>>>> service
>>>> startup, and then it is only written (so there's persistent storage) -
>>>> all the working data is held in ram.
>>>>
>>>> _______________________________________________
>>>> 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>>>
>>
>>
>> _______________________________________________
>> 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>
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|
Hi Glenn,
OK, thanks a lot.
So my best bet is to write to both servers @ the same time using the
omapi it seems ?
If so, I need to make some workaround for that.
Cheers,
Matt
2016-08-07 17:08 GMT+02:00 Glenn Satchell < [hidden email]>:
> Hi Matt
>
> If you are running failover, then the dhcpd.leases files on each system
> are not the same. It records information about the state of the partner's
> leases and it's own leases with different flags. If you search through the
> file on each system looking for a lease for the same IP address you can
> see what I mean.
>
> There is more info in the dhcpd.leases man page, although most of the
> discussion is about the file format.
>
> regards,
> -glenn
>
> On Sun, August 7, 2016 11:58 pm, Matt . wrote:
>> OK, this clears it out.
>>
>> Why would it not be possible to sync the leases file then ? Or is
>> there some other database style file which going to be corrupted or is
>> it that the running process doesn't know the synced data on the host
>> which hasn't have it added through omapi ?
>>
>>
>>
>>
>> 2016-08-07 14:18 GMT+02:00 Glenn Satchell < [hidden email]>:
>>> This style of host declaration creates a static lease. If it set in
>>> dhcpd.conf it does not generate an entry in the leases file, and it is
>>> not
>>> handled by the failover protocol.
>>>
>>> In your case, if you add the entry via omapi, then you need to do the
>>> same
>>> operation to the second dhcp server.
>>>
>>> The equivalent would be defining the host declarations in the dhcpd.conf
>>> on both dhcp servers.
>>>
>>> regards,
>>> -glenn
>>>
>>> On Sun, August 7, 2016 10:05 pm, Matt . wrote:
>>>> What I mean by static leases is:
>>>>
>>>> host myhostname {
>>>> hardware ethernet 00:20:00:2c:5b:7a;
>>>> fixed-address 192.168.1.250;
>>>> }
>>>>
>>>> That is what I cannot do, but is no issue if the added leases my
>>>> omapi, so reserved flag as you call them, are synched to the secondary
>>>> server, and that is not happening it seems.
>>>>
>>>> I need to know if it doesn't happen at all and it's not the way how
>>>> it's designed or something is just not working here.
>>>>
>>>>
>>>>
>>>>
>>>> 2016-08-07 13:44 GMT+02:00 Simon Hobson < [hidden email]>:
>>>>> Matt . < [hidden email]> wrote:
>>>>>
>>>>>> I'm having an issue with a setup where I can't set static leases.
>>>>>
>>>>> Define what you mean by static leases.
>>>>>
>>>>> Do you mean a host statement with a "fixed address" statement, or a
>>>>> lease with the reserved flag set ?
>>>>>
>>>>> I assume you mean the former, and that means that what you are setting
>>>>> isn't a "lease" in the conventional sense - host statements with fixed
>>>>> address do not create a lease through the normal lifetime. Normally
>>>>> these do not appear in the leases file at all, and I suspect that they
>>>>> do not get processed by failover either.
>>>>> I'm assuming that they appear in the leases file when created via
>>>>> OMAPI
>>>>> as otherwise there would be no persistent storage of them.
>>>>>
>>>>> So in this case, you need to apply the change to both servers.
>>>>>
>>>>> Or, use reserved leases and failover which should work.
>>>>>
>>>>> BTW - syncing the leases file is "fraught with difficulties" and is
>>>>> guaranteed to break things unless you use nothing but these static
>>>>> leases. The server you sync the file *to* will ignore it unless you
>>>>> stop
>>>>> the dhcpd service, swap out the file, and start the dhcpd service.
>>>>> This
>>>>> is because the leases file is "write only" - it is read once at
>>>>> service
>>>>> startup, and then it is only written (so there's persistent storage) -
>>>>> all the working data is held in ram.
>>>>>
>>>>> _______________________________________________
>>>>> 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>>>>
>>>
>>>
>>> _______________________________________________
>>> 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>>
>
>
> _______________________________________________
> 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
|
|
I'm discussing this with some developer of theforeman, he states that
two omapi calls will mess up the sync between the two servers, which I
strongly doubt.
Will ISC-DHCP not handle what the state is automaticly when the leases
are added to both servers, as stated before ?
2016-08-07 19:27 GMT+02:00 Matt . < [hidden email]>:
> Hi Glenn,
>
> OK, thanks a lot.
>
> So my best bet is to write to both servers @ the same time using the
> omapi it seems ?
>
> If so, I need to make some workaround for that.
>
> Cheers,
>
> Matt
>
> 2016-08-07 17:08 GMT+02:00 Glenn Satchell < [hidden email]>:
>> Hi Matt
>>
>> If you are running failover, then the dhcpd.leases files on each system
>> are not the same. It records information about the state of the partner's
>> leases and it's own leases with different flags. If you search through the
>> file on each system looking for a lease for the same IP address you can
>> see what I mean.
>>
>> There is more info in the dhcpd.leases man page, although most of the
>> discussion is about the file format.
>>
>> regards,
>> -glenn
>>
>> On Sun, August 7, 2016 11:58 pm, Matt . wrote:
>>> OK, this clears it out.
>>>
>>> Why would it not be possible to sync the leases file then ? Or is
>>> there some other database style file which going to be corrupted or is
>>> it that the running process doesn't know the synced data on the host
>>> which hasn't have it added through omapi ?
>>>
>>>
>>>
>>>
>>> 2016-08-07 14:18 GMT+02:00 Glenn Satchell < [hidden email]>:
>>>> This style of host declaration creates a static lease. If it set in
>>>> dhcpd.conf it does not generate an entry in the leases file, and it is
>>>> not
>>>> handled by the failover protocol.
>>>>
>>>> In your case, if you add the entry via omapi, then you need to do the
>>>> same
>>>> operation to the second dhcp server.
>>>>
>>>> The equivalent would be defining the host declarations in the dhcpd.conf
>>>> on both dhcp servers.
>>>>
>>>> regards,
>>>> -glenn
>>>>
>>>> On Sun, August 7, 2016 10:05 pm, Matt . wrote:
>>>>> What I mean by static leases is:
>>>>>
>>>>> host myhostname {
>>>>> hardware ethernet 00:20:00:2c:5b:7a;
>>>>> fixed-address 192.168.1.250;
>>>>> }
>>>>>
>>>>> That is what I cannot do, but is no issue if the added leases my
>>>>> omapi, so reserved flag as you call them, are synched to the secondary
>>>>> server, and that is not happening it seems.
>>>>>
>>>>> I need to know if it doesn't happen at all and it's not the way how
>>>>> it's designed or something is just not working here.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2016-08-07 13:44 GMT+02:00 Simon Hobson < [hidden email]>:
>>>>>> Matt . < [hidden email]> wrote:
>>>>>>
>>>>>>> I'm having an issue with a setup where I can't set static leases.
>>>>>>
>>>>>> Define what you mean by static leases.
>>>>>>
>>>>>> Do you mean a host statement with a "fixed address" statement, or a
>>>>>> lease with the reserved flag set ?
>>>>>>
>>>>>> I assume you mean the former, and that means that what you are setting
>>>>>> isn't a "lease" in the conventional sense - host statements with fixed
>>>>>> address do not create a lease through the normal lifetime. Normally
>>>>>> these do not appear in the leases file at all, and I suspect that they
>>>>>> do not get processed by failover either.
>>>>>> I'm assuming that they appear in the leases file when created via
>>>>>> OMAPI
>>>>>> as otherwise there would be no persistent storage of them.
>>>>>>
>>>>>> So in this case, you need to apply the change to both servers.
>>>>>>
>>>>>> Or, use reserved leases and failover which should work.
>>>>>>
>>>>>> BTW - syncing the leases file is "fraught with difficulties" and is
>>>>>> guaranteed to break things unless you use nothing but these static
>>>>>> leases. The server you sync the file *to* will ignore it unless you
>>>>>> stop
>>>>>> the dhcpd service, swap out the file, and start the dhcpd service.
>>>>>> This
>>>>>> is because the leases file is "write only" - it is read once at
>>>>>> service
>>>>>> startup, and then it is only written (so there's persistent storage) -
>>>>>> all the working data is held in ram.
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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>>>
>>
>>
>> _______________________________________________
>> 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
|
|
> I'm discussing this with some developer of theforeman, he states that
> two omapi calls will mess up the sync between the two servers, which I
> strongly doubt.
Since *there is no sync for static leases*, there is nothing to mess
up.
Steinar Haug, Nethelp consulting, [hidden email]
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
|
|