Networking Forums

Networking Forums > Computer Networking > Linux Networking > dhcp ip in use, can it be revoked?

Reply
Thread Tools Display Modes

dhcp ip in use, can it be revoked?

 
 
Ittay
Guest
Posts: n/a

 
      01-17-2005, 06:20 AM
hi,

i have a client that requests an ip by dhcp, and then uses it to do
NFS mounts. if the dhcp is configured to expire the IP after a while,
what will happen? (assuming i don't have any daemon to renew the
lease).

thanx,
ittay
 
Reply With Quote
 
 
 
 
prg
Guest
Posts: n/a

 
      01-17-2005, 03:38 PM

Ittay wrote:
> hi,
>
> i have a client that requests an ip by dhcp, and then uses it to do
> NFS mounts. if the dhcp is configured to expire the IP after a while,
> what will happen? (assuming i don't have any daemon to renew the
> lease).


May depend on what you mean by "daemon". dhclient? dhcp server?

The dhclient runs as a root daemon from the startup scripts. Can you
gracefully stop it? Don't know. If I were admin of a net where
someone tried such a thing (in order to keep an IP lease), I would
refuse them _all_ future lease attempts till after a visit to the
woodshed. Such IP hanky-panky might even be considered a fireable
offense.

In normal operation the following sequence roughly proceeds

Say the lease was issued for 10 hours.

After 5 hours, the client will try to renew the lease. If the server
is down or can't be contacted, the client just goes on about its way.
But the clock keeps ticking ... 5 hours remaining.

After 8.75 hours, the client will try again and if no lease offered,
start worrrying ;-0

After 9.5 hours (?), try once again and if no renewal ... You get the
picture.

The above sequence is illustrative only of how the client tries to
renew it's lease in a manner that maintains its IP and provides for
temporary dhcp server troubles. See rebind below.

A part of the lease the client receives includes certain date/time
values. My current lease includes:
/var/lib/dhclient-eth0-leases << a RH quirk
lease {
interface "eth0";
fixed-address xxx.xxx.210.33;
option subnet-mask xxx.xxx.248.0;
option routers xxx.xxx.208.1;
option dhcp-lease-time 54907;
option ien116-name-servers xx.xxx.0.4,xx.xxx.0.5;
option dhcp-message-type 5;
option domain-name-servers xx.xxx.0.4,xx.xxx.0.5;
option dhcp-server-identifier xx.xxx.3.45;
option broadcast-address 255.255.255.255;
renew 1 2005/1/17 21:36:05;
rebind 2 2005/1/18 03:36:57; << begin trying to renew
expire 2 2005/1/18 05:31:21; << here's the one that cuts you off
}

$ man dhclient.conf
The rebind statement defines the time at which the dhcp client should
begin to try to contact any dhcp server in order to renew its lease.

The expire statement defines the time at which the dhcp client must
stop using a lease if it has not been able to contact a server in order
to renew it.

At expiry the client will check for any _unexpired_previous_ leases
which it can attempt to renew.

When all the leases are expired, the client begins all over, just as at
boot time, attempting to acquire a lease.

"If the client is unable to obtain a lease, the client's TCP/IP stack
will not function and network errors will occur." See:
http://www.j51.com/~sshay/tcpip/dhcp/dhcp.htm
or google:
dhcp client lease expire

The lesson: make sure a dhcp server is always available ;-)
hth,
prg
email above disabled

 
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
Workstations can't see servers that the DNS/DHCP server can Marten Windows Networking 4 09-22-2008 07:21 PM
DHCP workstations can't access internet Static can Mick Windows Networking 2 01-29-2008 04:05 PM
DHCP IP lease renewal ok, but a new PC can not obtain an IP ("An error occurred while renewing interface Local Area Connection : unable to cotact your DHCP server. Request has timed out.") Soren Mikkelsen Windows Networking 2 06-02-2005 04:43 PM
Windows can't see Apache on Linux machine when in one location, can in other. Linux PC can see server in both locations. Agent X Linux Networking 9 07-12-2004 05:17 PM
Redhat 9: Can ping, Can lookup names, Can ftp, Can Not browse http... 2boxers_at_comcast_dot_net Linux Networking 6 11-19-2003 06:15 PM