why primary and secondary allocate same IP?

jw354 jw354 at cornell.edu
Fri Aug 11 13:12:07 UTC 2006


On Aug 10, 2006, at 11:54 PM, VKR V wrote:

> In my network I have primary and secondary DHCP server. Both the 
> servers are in sync with NTP. I am observing some peculiar problem in 
> my DHCP server i.e. when client makes request for IP address both the 
> servers  are allocating same IP to him :-(. This is intermittent 
> problem. The failover configuration on primary is -
> failover peer "secondary" {
> primary;
> address 172.162.1.2;
> port 519;
> peer address 172.162.1.3;
> peer port 519;
> max-response-delay 60;
> max-unacked-updates 10;
> mclt 500;
> split 128;
> load balance max seconds 3;
> }
>
>
> I avoid seondary configuration, which is simple, for brevity. Below 
> are logs and lease info.
>
>
> DHCP Primary
> ---------------------
> Aug  7 12:56:21 BRAS-DHCP-PRI/BRAS-DHCP-PRI dhcpd: [ID 702911 
> local7.info] DHCPDISCOVER from 00:10:d0:4a:a9:b7 (nice-1) via 
> 125.162.1.29
> Aug  7 12:56:21 BRAS-DHCP-PRI/BRAS-DHCP-PRI dhcpd: [ID 702911 
> local7.info]DHCPOFFER on 220.226.167.134 to 00:10:d0:4a:a9:b7  
> (p2j5l1) via
> 125.162.1.29
>
>
> DHCP  Secondary
> ---------------------------
> Aug  7 12:56:21 BRAS-DHCP-SEC/BRAS-DHCP-SEC dhcpd: [ID 702911
> local7.info]
> DHCPDISCOVER from 00:10:d0:4a:a9:b7 (nice-1) via 125.162.1.29
> Aug  7 12:56:21 BRAS-DHCP-SEC/BRAS-DHCP-SEC dhcpd: [ID 702911
> local7.info]
> DHCPOFFER on 220.226.167.202 to 00:10:d0:4a:a9:b7  (nice-1) via
> 125.162.1.29
>
>
> The lease file on both the servers are -
>
> DHCP PRIMARY
> -------------------------
> lease 125.162.1.32 {
>   starts 1 2006/08/07 09:00:38;
>   ends 1 2006/08/07 09:02:38;
>   tstp 0 2006/08/06 12:13:06;
>   tsfp 0 2006/08/06 13:13:06;
>   atsfp 0 2006/08/06 13:13:06;
>   cltt 1 2006/08/07 09:00:38;
>   binding state free;
>   hardware ethernet 00:10:d0:4a:a9:b7;
>   uid "\001\000\260\320M\251\267";
>   client-hostname "nice-1";
> }
>
>
> DHCP SECONDRY
> -----------------------------
> lease 125.162.1.32 {
>   starts 1 2006/08/07 07:26:21;
>   ends 1 2006/08/07 07:28:21;
>   tstp 0 2006/08/06 04:37:14;
>   tsfp 0 2006/08/06 16:24:43;
>   atsfp 0 2006/08/06 16:24:43;
>   cltt 1 2006/08/07 07:26:21;
>   binding state backup;
>   hardware ethernet 00:10:d0:4a:a9:b7;
>   uid "\001\000\260\320M\251\267";
>   client-hostname "nice-1";
> }
>
>
> Has anyone discover this? Why both the servers are allocating the same 
> IP, when hash result by both the servers is different?
>
>
> Regards
> VK
>

Perhaps you do not have a problem.  The two DISCOVER log lines you show 
are offering different
addresses.  This is normal.

The two lease entries you show are for different times: one starts a 
after the other is done, thus
they represent lease staate at two different times.  This is strange if 
they are
the current lease entries.  Normally, the lease entries should be the 
same in terms of start
and end times because the servers keep each other up to date and both 
servers hold all
the lease information.

However, perhaps you aren't showing us the last lease entry in each 
file for the IP address.
It is the last lease entry in the file that has the current data.

If they are indeed the last entries, then you want to make sure the two 
servers are communicating.
The log should show state changes, or the omapi client can be made to 
show it.

John Wobus



More information about the dhcp-users mailing list