Re: DHCP lease and dhclient.eth0.leases.



On Mon, 2007-04-09 at 10:04 -0400, Ed Jabbour wrote:
On April 8 2007 13:20, Greg Folkert wrote:
On Sun, 2007-04-08 at 13:06 -0400, Ed Jabbour wrote:
/var/lib/dhcp3/dhclient.eth0.leases has dates in it that do not
seem to relate to anything. It has two entries. one stating that
the DHCP lease expired two days ago, and another that states it
will expire in 2038:

renew 5 2007/4/6 17:38:58;
rebind 5 2007/4/6 17:38:58;
expire 5 2007/4/6 17:38:58;

renew 2 2038/1/19 03:14:07;
rebind 2 2038/1/19 03:14:07;
expire 2 2038/1/19 03:14:07;

First off, are you having any problem?

OK, I'll try to pretend I understand this stuff.

I intermittently lose connection and have to unplug/replug the modem,
which as I understand it, gets me a new lease. I suspected that the
Netgear router was failing to properly negotiate a new lease on its own
when one came down from Comcast. This was mentioned on Netgear's site,
and following their recommendation, I upgraded the firmware. While
trying to investigate the lease, I was led to the above file with the
funny lease times. The router itself shows that the lease was given 4
days ago and expires in 3 days plus some odd. The difference makes me
wonder if there's a software problem someplace.

Look further down for troubleshooting, of if you want it to be fixed in
a right away try this on your Linux machine, of course as root:

/etc/init.d/networking restart

This should fix your problem, unless your router is still screwing up.

Second, where are you getting your DHCP ack and reply from (Comcast,
a router or a real DHCP server on you LAN?

The router is a client vis-a-vis Comcast and a server vis-a-vis the LAN.
So, I get the lease from the router which gets it from Comcast.

Actually, if you have a Router/Firewall you are using NAT (Network
Address Translation). Your Router gets a DHCP lease from Comcast. Period
end of story there. If it has an IP Address on the Public side of the
router, it is functioning properly, in that area.

Now as for the Private side of your router, that may be another matter.
Understand this, the router is holding the Internet connection, not your
computer. You computer is a "client" to your router. Therefore, if you
computer is having difficulty with DHCP, getting proper leases, it is
your router or your computer.

If you lose connectivity or connection to the internet, the first thing
to do is to:

/sbin/ifconfig

What you should see is the interfaces that are currently configured.
Specifically you should see a line similar to for you Ethernet Network
Interface Card (typically eth0 for non-wireless cards):

inet addr:192.168.1.8 Bcast:192.168.1.255 Mask:255.255.255.0

If you've got that, then we need to see if you have a proper
"resolv.conf". So as any user do this:

cat /etc/resolv.conf

Specifically look for the "nameserver" lines. Mine look like this:

nameserver 68.87.77.130
nameserver 192.168.1.1

Or something similar, but at least two valid entries, perhaps both of
the nameservers will be Comcast DNS servers, but my D-Link does
caching/forwarding. Not having valid entries would cause you to "lose
connections" as such you and most other people connect via "names" for
everything like "www.debian.org" or "lists.debian.org".

If you do have these entries, then we need to see you routes. Again, as
root:

/sbin/route

I have the following "routing table" for my machine:

greg@princess:~$ /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

Obviously, my default (0.0.0.0) is 192.16.1.1, through eth0. You should
also have a similar setup in your route entries.

Now, if you have ALL of those and you cannot get to the internet,
something else is buggered up. If you don't have these, entries, please
make sure you tell us what is missing.

Thirdly, is that your whole leases file?

No. dhclient.eth0.leases has two entries, each of which has more info.
They are identical but for the lines cited above. I don't know if it's
supposed to have only one entry.

The standard for the leases file is to have the current (or least
expired) and the next previous entry for said interface.

[snip]

Now, if you are getting you DHCP info from a router, well that is a
different issue. Does that Router support uPNP? If it does and you
have zeroconf and the avahi stuff installed, that might explain it.

Ahh, the wonders of Google -- Universal Plug and Play? Yes, it does and
it is enabled. I don't have zeroconf but do have the avahi daemon.

You might want to turn off uPNP support, unless you depend on it for any
windows machines.

There are many numerous ways of misconfiguration for "privately
controlled" DHCPDs. I really don't want to go into them at length
until we know it is the problem... which I'll hope it isn't.

I hope it isn't, too.

I'll be betting you don;t have a DHCPD running except on your router.

If you still continue to "drop off" the net, then there is something
going on with either your router or Comcast, I suspect Comcast, as I
have troubles nearly weekly with them. They never admit it or report it.

--
greg, greg@xxxxxxxxxxxxxxx

Novell's Directory Services is a competitive product to Microsoft's
Active Directory in much the same way that the Saturn V is a competitive
product to those dinky little model rockets that kids light off down at
the playfield. -- Thane Walkup


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: What does XP do with lease for shutdown/restart?
    ... >> then they just set up the same lease when powered up. ... DHCP clients are supposed to explicitly send the ... > DHCP server a DHCP RELEASE when it's not going to use ... >> direct connection to Cox without the router. ...
    (microsoft.public.windowsxp.network_web)
  • Re: IP address lease not recognized
    ... > I presume that I must change something to do with the lease. ... > another beginning I.P. address in the Router. ... > The IP address lease 192.168.1.100 for the Network Card with network ... Do you really need DHCP? ...
    (microsoft.public.win2000.general)
  • Re: Linksys Router and VPN
    ... > just can't get the VPN/WinCE machine to work with the router. ... Use the built-in DHCP method of the router to assign your IP address to ... exception comes in where the "lease" time has elapsed (meaning that each ... IP address - when you power cycle the cable modem it looses it's memory ...
    (comp.security.firewalls)
  • Re: IP conflict in my network
    ... If a lease was to run out while a pc was turned off and then ... Below is a url to dhcp guide ... and use a software VPN to connect to work. ... turn off the computer and the router (Linksys BEFSX41, ...
    (comp.security.firewalls)
  • Re: Why is DHCP table empty on Linksys router
    ... fails, attempts made at 1/2 remaining time, etc., till lease really ... >> That'll tell you if you're running the standard DHCP client on it. ... the Linksys router can/is configured as a dhcp server -- note that it ... Perhaps useful if a freshly booted PC fails to get an IP from the ...
    (comp.os.linux.networking)