[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dhclient changes IP address



Hi Bob,

thanks for your response.

On Monday 23 June 2014 01:58:33 Bob Proulx wrote:
> Rainer Dorsch wrote:
> > my fritz.box is a DSL router from AVM, which unfortunately does not give
> > me
> > access to syslog.
> 
> Oh.  I didn't realize that.  The way you talked about it I thought it
> was another Debian system.
> 
> > What I noticed is that 192.168.178.87 shows up without MAC address
> > in the list of network devices of the fritz.box
> 
> That is almost certainly an important clue to the problem.
> 
> > I think I will try first to get support from AVM on that topic.
> 
> Good luck!  However I am pessimistic about support from companies.  In
> general they like to sell you things but unless you are a notable
> customer with deep pockets they tend not to want to spend time
> supporting you.  Every vendor is unique however.
> 
> In general a dhcp server will always assign the same IP address to the
> same client.  Everyone knows this is based upon the client ethernet
> address.  But many people do not know this is also based upon the uid
> the client offers.  (It might be client hostname.  I don't remember
> and have no time to research the precise thing.)  If a client offers
> different uids then the dhcp server is obligated to assign a different
> IP address.  The idea was that a multiple booting system would have
> different uids and wouldn't share the same IP address even though it
> had the same ethernet hardware address.

That is interesting information. The manpage of dhclient contains some 
references on that.

> 
> Is it possible that your client is somehow producing a DHCP request
> but using different client parameters with the different requests and
> therefore receiving different IP assignments in return?  Since you are
> getting different IP assignments and it must be for some reason then I
> suspect this possible case.  Assuming that the dhcp server is
> standards conforming.
> 
> Do you keep getting different IP assignments every day?

Actually the lease time is 8 days and I am still re-booting more frequently 
;-)

Another non-standard behavior might be that the system (Cubox-i) has no RTC, 
i.e. when the system boots, it always thinks it is in Jan 1st, 1970. Then when 
NTP eventually updated the time (and even then some hours later) it request 
once a new IP address. I have seen that it go in the first assignment 
192.168.178.87 and then changes to 192.168.178.88 and the other way round.

Here are the logs from the client side:

root@bokocube:/var/log# zgrep "dhclient" syslog.5.gz  syslog.4.gz 
syslog.5.gz:Jan  1 01:00:07 bokocube dhclient: Listening on 
LPF/eth0/d0:63:b4:00:32:5c
syslog.5.gz:Jan  1 01:00:07 bokocube dhclient: Sending on   
LPF/eth0/d0:63:b4:00:32:5c
syslog.5.gz:Jan  1 01:00:07 bokocube dhclient: Sending on   Socket/fallback
syslog.5.gz:Jan  1 01:00:07 bokocube dhclient: DHCPREQUEST on eth0 to 
255.255.255.255 port 67
syslog.5.gz:Jan  1 01:00:10 bokocube NetworkManager[333]: <info> dhclient 
started with pid 429
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: Internet Systems Consortium 
DHCP Client 4.3.0
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: Copyright 2004-2014 Internet 
Systems Consortium.
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: All rights reserved.
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: For info, please visit 
https://www.isc.org/software/dhcp/
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: 
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: Listening on 
LPF/eth0/d0:63:b4:00:32:5c
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: Sending on   
LPF/eth0/d0:63:b4:00:32:5c
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: Sending on   Socket/fallback
syslog.5.gz:Jan  1 01:00:10 bokocube dhclient: DHCPDISCOVER on eth0 to 
255.255.255.255 port 67 interval 7
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: DHCPREQUEST on eth0 to 
255.255.255.255 port 67
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: DHCPOFFER from 192.168.178.1
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: DHCPACK from 192.168.178.1
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: bound to 192.168.178.88 -- 
renewal in 379228 seconds.
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: DHCPREQUEST on eth0 to 
255.255.255.255 port 67
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: DHCPACK from 192.168.178.1
syslog.5.gz:Jan  1 01:00:11 bokocube dhclient: bound to 192.168.178.88 -- 
renewal in 418840 seconds.
syslog.4.gz:Jun 23 03:45:01 bokocube dhclient: DHCPDISCOVER on eth0 to 
255.255.255.255 port 67 interval 7
syslog.4.gz:Jun 23 03:45:01 bokocube dhclient: DHCPDISCOVER on eth0 to 
255.255.255.255 port 67 interval 5
syslog.4.gz:Jun 23 03:45:02 bokocube dhclient: DHCPREQUEST on eth0 to 
255.255.255.255 port 67
syslog.4.gz:Jun 23 03:45:02 bokocube dhclient: DHCPOFFER from 192.168.178.1
syslog.4.gz:Jun 23 03:45:02 bokocube dhclient: DHCPACK from 192.168.178.1
syslog.4.gz:Jun 23 03:45:02 bokocube dhclient: bound to 192.168.178.88 -- 
renewal in 415195 seconds.
syslog.4.gz:Jun 23 03:45:02 bokocube dhclient: DHCPREQUEST on eth0 to 
255.255.255.255 port 67
syslog.4.gz:Jun 23 03:45:02 bokocube dhclient: DHCPOFFER from 192.168.178.1
syslog.4.gz:Jun 23 03:45:03 bokocube dhclient: DHCPACK from 192.168.178.1
syslog.4.gz:Jun 23 03:45:03 bokocube dhclient: bound to 192.168.178.87 -- 
renewal in 415153 seconds.
root@bokocube:/var/log# 



> > If that is not successful, I will look in more detail into the
> > tcpdumps (although since I have to take that on the client side,
> > that might be difficult during the startup phase).
> 
> Note that dhcpdump can still be used on your client.  It would require
> some patience but it would capture the exchange.  Easier than
> wireshark and specific to the domain at hand.  It would be on my list
> to try to capture what the differences are when getting the different
> IP assignments.

I will do that next.

Thanks,
Rainer

-- 
Rainer Dorsch
http://bokomoko.de/


Reply to: