SUMMARY: DHCP Timeouts... Controlable?

From: Brett Thorson <bthorson_at_ekosystems.com>
Date: Tue Aug 21 2001 - 13:36:45 EDT
The quick answer: Well, sort of.

There are actually two timeouts, or timings that occur.  One can be
controlled and the other cannot.

The time out that can be controlled, is the amount of time that ifconfig
will wait for dhcpagent to get an IP address.  This you can specify (Thanks
to Dave Miner)
-->
The thing you're trying to shorten is the amount of time ifconfig waits
for dhcpagent to get back to it, so the ifconfig man page is where you
should have looked.  To give you the shortcut: add a "wait xx" where xx
is the number of seconds you are willing to wait for DHCP to the
/etc/dhcp.interface-name file.
<--

What I ended up putting in this file was "wait forever" (Then I changed it
to "wait 180").

What actually happens is that I am trying to make sure that ifconfig doesn't
proceed with the rest of the boot if it doesn't have an IP address for the
system.  This is quite important for 2 of the apps I am running on these
machines.  I know the machine will have a valid lease in it's cache because
the NetAdmin is doing static IP via DHCP (Thus I am quasi-guaranteed of the
same lease everytime).

What I was hoping to get to happen though was to control dhcpagent's time
that it waits for a server response before it goes to the local file
information to check what it had last time, and use it's old lease.  This is
not controllable...  Again, Dave Miner:

-->

> What I was trying to accomplish was to decrease the amount of time
dhcpagent
> waits for a network response before going to the local cache for the
> information.
> Is there a way to say "if dhcpagent doesn't get a DHCPOFFER in 10 seconds,
> use the last known IP?"
>

No, unfortunately there isn't.  It's hard-coded in the agent to try 4
times, which using the back-off algorithm amounts to about 60 seconds.
This is the behavior recommended in RFC2131

<--

So there ya have it!

Hope this helps out!

And thanks Dave for the insight.  It was most helpful.

--Brett

----- Original Message -----
From: "Brett Thorson" <bthorson@ekosystems.com>
To: <sunmanagers@sunmanagers.org>
Sent: Wednesday, August 15, 2001 8:45 PM
Subject: Q: DHCP Timeouts... Controlable?


> I have a DHCP client running on a network that is mostly unstable (but I
> don't control any part of the network so it offers no solutions to this
> problem).
> I get a DHCP address of several years when the Solaris 8 x86 machine boots
> up.  However, sometimes during the boot up process the network is down.
>
> If the network is down, I see it send out 4 DHCPRequests (trying to
> re-secure the lease on it's IP address).  Then it finally gives up and
just
> uses what it had last time.
>
> Is there a way to decrease the timeout from when dhcpagent sends out it's
> request, to when it finally gives up and just uses the lease it previously
> retained (and I guess is kept in the binary file /etc/dhcp/iprb0.dhc)
>
> I looked in the man page for dhcpagent (and the tunable parms.) but it
> didn't appear as any of those would help shorten this time out.
>
> As a side note of curiosity.....
> I was wondering on the algorithm behind dhcpagent using it's last known IP
> Lease versus doing a DHCPDISCOVER?  Will it wait until the lease is up or
a
> release is issued before going after a new IP address?  Just curious
because
> I downed one DHCP server, and had a dickens of time trying to get the
client
> to see the new server (it kept reverting to it's last known lease).
>
> Any suggestions?
>
> --Brett
>
Received on Tue Aug 21 18:36:45 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:25:02 EDT