Networking Forums

Networking Forums > Computer Networking > Linux Networking > Failover DHCP - Only secondary serving?

Reply
Thread Tools Display Modes

Failover DHCP - Only secondary serving?

 
 
Simon Dean
Guest
Posts: n/a

 
      10-15-2004, 10:06 AM
I managed to get a Failover DHCP working yesterday on FEDORA RC2. It
didn't work at first because the time of the two computers was about by
a lot and I wasn't seeing any errors until I viewed the log file.

Now its working. Sort of.

The servers see each other, the states are reported as normal in
dhcpd.leases and yet, I see primary offering an address, but the client
never accepts it. So then the secondary offers an address, and the
client grabs it.

Now why is this happening?

Is it because my primary is 10.0.0.15 and secondary 10.0.0.10?

Are my clients (Windows XP) seeing two DHCP servers and goes with the
first address in numeric order??? That would be bizarre. Certainly the
DHCP server under WinXP ipconfig /all says its using 10.0.0.10

Or maybe the secondary is a few seconds ahead of the primary?

Any ideas gratefully received.

Thanks
Simon
 
Reply With Quote
 
 
 
 
Gareth Ansell
Guest
Posts: n/a

 
      10-15-2004, 12:40 PM
The clients will be doing a broadcast, so it is unlikely that only one is
responding all the time. However, once a client has a lease, it tries to
renew the lease it has. This may be why it is not accepting the offer of
a new IP address, and accepting the offer of the IP address it had
previously.

The way that IP address space spltting works in DHCP means that only the
original server can renew the lease for the IP address, unless it fails
and the other server is then set into PARTNER_DOWN state, in which case it
will then allocate all the available IP address space.

Gareth Ansell
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      10-15-2004, 12:41 PM
Bernhard Kastner wrote:

> Simon Dean schrieb:
>
>> Or maybe the secondary is a few seconds ahead of the primary?

>
>
> I think thats it.
> IIRC, DHCPs send Broadcasts every few [timeout] seconds. So try to start
> the primary DHCP first and then the secondary
>
> On the other hand it would be a strange coincidence that you _always_
> get the IP from the secondary...
>
>


Hrm. I sure I did start the primary first, but I'll try restarting the
services tonight. No, Im just wondering though if its because the
secondary has time of like "11:12:05" and the primary has a time of
"11:12:02" or something bizarre. Wouldn't be the first time a clock
issue has caused me problems... as I say, when the secondary was out of
sync by about 3 hours, the servers wouldn't synchronise or even talk to
each other.

Cya
Simon
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      10-15-2004, 01:35 PM
Gareth Ansell wrote:

> The clients will be doing a broadcast, so it is unlikely that only one is
> responding all the time. However, once a client has a lease, it tries to
> renew the lease it has. This may be why it is not accepting the offer of
> a new IP address, and accepting the offer of the IP address it had
> previously.
>
> The way that IP address space spltting works in DHCP means that only the
> original server can renew the lease for the IP address, unless it fails
> and the other server is then set into PARTNER_DOWN state, in which case it
> will then allocate all the available IP address space.
>
> Gareth Ansell


Yes, I understand what you were saying. I have set up an IP Range going
10.0.0.50 to 10.0.0.100.

I noticed that my laptop got an IP address of .77. while my desktop was
on .55.

I further noticed the laptop was using the seondary (.10) for its DHCP
addresses, while my desktop was using the primary (.15) for its DHCP
addresses.

Confused, I flushed everything from the two computers, released all DNS
addresses, and did a renew. This time, both computers are using .77 and
..78 and collecting addresses from the secondary!


These are the logs from the secondary:
Oct 14 18:42:42 neil dhcpd: DHCPDISCOVER from 00:10:4b:41:29:a3 via eth0
Oct 14 18:42:43 neil dhcpd: DHCPOFFER on 10.0.0.78 to 00:10:4b:41:29:a3
(simon) via eth0
Oct 14 18:42:47 neil dhcpd: DHCPDISCOVER from 00:10:4b:41:29:a3 (simon)
via eth0
Oct 14 18:42:47 neil dhcpd: DHCPOFFER on 10.0.0.78 to 00:10:4b:41:29:a3
(simon) via eth0
Oct 14 18:42:52 neil dhcpd: DHCPDISCOVER from 00:10:4b:41:29:a3 (simon)
via eth0
Oct 14 18:42:52 neil dhcpd: DHCPOFFER on 10.0.0.78 to 00:10:4b:41:29:a3
(simon) via eth0
Oct 14 18:42:55 neil dhcpd: DHCPDISCOVER from 00:10:4b:41:29:a3 (simon)
via eth0
Oct 14 18:42:55 neil dhcpd: DHCPOFFER on 10.0.0.78 to 00:10:4b:41:29:a3
(simon) via eth0
Oct 14 18:43:03 neil dhcpd: DHCPDISCOVER from 00:10:4b:41:29:a3 (simon)
via eth0
Oct 14 18:43:03 neil dhcpd: DHCPOFFER on 10.0.0.78 to 00:10:4b:41:29:a3
(simon) via eth0
Oct 14 18:43:03 neil dhcpd: Unable to add forward map from
simon.simtext.plus.com to 10.0.0.78: connection refused
Oct 14 18:43:03 neil dhcpd: DHCPREQUEST for 10.0.0.78 (10.0.0.10) from
00:10:4b:41:29:a3 (simon) via eth0
Oct 14 18:43:03 neil dhcpd: DHCPACK on 10.0.0.78 to 00:10:4b:41:29:a3
(simon) via eth0

From the primary:
Oct 14 18:42:15 geddy dhcpd: DHCPRELEASE of 10.0.0.55 from
00:10:4b:41:29:a3 (simon) via eth0 (found)
Oct 14 18:43:00 geddy dhcpd: DHCPDISCOVER from 00:10:4b:41:29:a3 via eth0
Oct 14 18:43:01 geddy dhcpd: DHCPOFFER on 10.0.0.55 to 00:10:4b:41:29:a3
(simon) via eth0

Due to the fact that the clock on the secondary server is a few seconds
slow it appears from the logs, the client is making contact with the
secondary server first then eventually getting 10.0.0.78, and then a
couple of seconds later, the primary server tries to offer 10.0.0.55.

So still perplexed.

Cheers
Simon
 
Reply With Quote
 
Bernhard Kastner
Guest
Posts: n/a

 
      10-15-2004, 02:04 PM
Simon Dean schrieb:
> Or maybe the secondary is a few seconds ahead of the primary?


I think thats it.
IIRC, DHCPs send Broadcasts every few [timeout] seconds. So try to start the
primary DHCP first and then the secondary

On the other hand it would be a strange coincidence that you _always_ get the IP
from the secondary...


--
Bernhard | theEdge
-Linux User #368478-
http://www.alf.at.tc
Austrian Linux Forum
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      10-15-2004, 08:51 PM
Simon Dean wrote:

> Bernhard Kastner wrote:
>
>> Simon Dean schrieb:
>>
>>> Or maybe the secondary is a few seconds ahead of the primary?

>>
>>
>>
>> I think thats it.
>> IIRC, DHCPs send Broadcasts every few [timeout] seconds. So try to
>> start the primary DHCP first and then the secondary
>>
>> On the other hand it would be a strange coincidence that you _always_
>> get the IP from the secondary...
>>
>>

>
> Hrm. I sure I did start the primary first, but I'll try restarting the
> services tonight. No, Im just wondering though if its because the
> secondary has time of like "11:12:05" and the primary has a time of
> "11:12:02" or something bizarre. Wouldn't be the first time a clock
> issue has caused me problems... as I say, when the secondary was out of
> sync by about 3 hours, the servers wouldn't synchronise or even talk to
> each other.
>


I've corrected the time on the servers, no effect. Shut down the DHCP
Services on both machines, cleared out the leases, restarted DHCP in
order, same issues.

So then I swapped the "primary" and the "secondary" in the
/etc/dhcpd.conf files and the clients still get the IP addresses from
the secondary server. So it's not an IP issue. So Im confused.

It's not because Im still running 3.0.1 rc12 is it on this FEDORA RC2 boxes?

Cheers
Simon
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      10-15-2004, 09:43 PM
>
> Why do you need them in the correct order? Isn't it enough that there
> _is_ a second DHCP if the primary (which ever this is) fails?
>



Well I was under the impression, that the primary DHCP server, will be
the primary DHCP server, until it goes down, then the secondary one will
take over. When things don't work as advertised, that usually means
there's something wrong.

Also, its taking a long time for DHCP requests to be granted...

I get a load of bounces for about five seconds, and the client does a
DHCP DISCOVER and the secondary server does an DHCP OFFER. Then the
client contacts the primary and the secondary, they both offer an IP
address, and the client accepts the one from the secondary server. Well,
something like that according to the logs.

This behaviour seems a little odd. I know when I was running one DHCP
server, there wasn't an issue with speed.

Something screwy is going on somewhere.

Cheers
Simon
 
Reply With Quote
 
Bernhard Kastner
Guest
Posts: n/a

 
      10-15-2004, 11:01 PM
Simon Dean schrieb:
>
> I've corrected the time on the servers, no effect. Shut down the DHCP
> Services on both machines, cleared out the leases, restarted DHCP in
> order, same issues.
>
> So then I swapped the "primary" and the "secondary" in the
> /etc/dhcpd.conf files and the clients still get the IP addresses from
> the secondary server. So it's not an IP issue. So Im confused.
>


Why do you need them in the correct order? Isn't it enough that there _is_ a
second DHCP if the primary (which ever this is) fails?

--
Bernhard | theEdge
-Linux User #368478-
http://www.alf.at.tc
Austrian Linux Forum
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      10-16-2004, 02:42 PM

>
> Why do you need them in the correct order? Isn't it enough that there
> _is_ a second DHCP if the primary (which ever this is) fails?
>


Also, say, in Outlook by Microsoft, it doesn't give you any control over
the formatting of an email. If you receive a HTML email and try and
reply, it defaults to HTML. Change the format to Plain Text, and it
strips out your quotation reply marks, the ">" symbols.

Now, i dont like being told what to do by software, having software that
doesn't work right but being told its normal and there's no problem if
it should by all accounts be doing something else.

Of course though, something I have stupidly forgotten, is the load
balancing! You might be right the first time about the coincidences.

Im still concerned about the amount of time it takes however for a
client to get an IP address, and the constant DHCPDISCOVER, DHCPOFFER
(never acknowledged for 5 seconds).

Cheers
Simon
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP not serving 2nd scope Bruce Johnson Windows Networking 5 05-29-2009 06:21 PM
secondary dns server in dhcp scope option tree leafs Windows Networking 3 11-10-2008 10:52 AM
Server 2003 DHCP not serving addresses Rich M Windows Networking 3 09-06-2006 05:12 PM
What's the Policy on Secondary DHCP Servers? razor Windows Networking 4 10-07-2005 04:02 PM
Dhcp 3 (isc.org): serving multiple subnets on different interfaces Pr. Stephen Falken Linux Networking 1 11-05-2004 10:36 AM



1 2 3 4 5 6 7 8 9 10 11