dhcp ip in use, can it be revoked?

Discussion in 'Linux Networking' started by Ittay, Jan 17, 2005.

  1. Ittay

    Ittay Guest

    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
     
    Ittay, Jan 17, 2005
    #1
    1. Advertisements

  2. Ittay

    prg Guest

    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
     
    prg, Jan 17, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Kimball K Kinnison

    Mixed Fixed IP and NAT - can it be done?

    Kimball K Kinnison, Oct 23, 2003, in forum: Broadband
    Replies:
    2
    Views:
    279
  2. Jeff Bishop
    Replies:
    1
    Views:
    244
    Jack Nelson
    Feb 9, 2004
  3. Bill
    Replies:
    3
    Views:
    360
    Jeff Liebermann
    Oct 7, 2004
  4. Anna Markou
    Replies:
    0
    Views:
    191
    Anna Markou
    Jul 11, 2003
  5. smeagol
    Replies:
    3
    Views:
    211
  6. Claude Lachapelle

    DHCP server assigning ip addresses, does it is pinging it before?

    Claude Lachapelle, May 22, 2007, in forum: Windows Networking
    Replies:
    5
    Views:
    361
    Claude Lachapelle
    May 22, 2007
  7. dr
    Replies:
    0
    Views:
    443
  8. Giuseppe
    Replies:
    7
    Views:
    324
    Giuseppe
    Oct 2, 2008
Loading...