Mailing List os2-wireless_users@2rosenthals.com Archived Message #6663

From: "Lewis G Rosenthal" <os2-wireless_users@2rosenthals.com> Full Headers
Undecoded message
Subject: Re: [OS2Wireless] DHCP: how to force a lease renewal ?
Date: Fri, 05 Mar 2010 00:52:12 -0500
To: OS/2 Wireless Users Mailing List <os2-wireless_users@2rosenthals.com>

Quick update, as I've just had to deal with this in a remote support situation...

On 02/28/10 02:54 pm, Lewis G Rosenthal thus wrote :
Hi, Jordan...

On 02/28/10 02:13 pm, J R FOX thus wrote :
<snip>
But that's not really the kind of major service interruption I'm talking about.  Far more common is something I've seen at a relative's place, where some kind of "sync" is lost between PC, router, and cable modem, where the connection is re-established by rebooting each of these in a certain order.  I think that what I saw the other day is much more common still, and involves loss / non-renewal of the DHCP lease.  That is, I probably do not need to reboot the computer, or the router, or the cable modem.  So, my question: What is the command (or GUI object, or widget) in eCS to force a new cable connection &/or new lease ?  (And, what is the equivalent thing you can try in Windoze ?  If I was a 'Nix user, I'd ask about that one too.)  
It happens. :-)

In OS/2, you can do this in a couple of ways:

  1. Open the DHCP Monitor in the TCP/IP folder. Ensure that it is
     showing the status of the correct interface (e.g., lan0). Go to
     Actions | Release Lease, followed by Actions | Request Lease. This
     will effectively give up the lease you currently have (whether
     legitimate or not) and request a new one form the nearest
     responding DHCP server.
  2.  From a command prompt, do a dhcpmon -t <Enter> (to kill the DHCP
     monitor, and thus, dump the address), followed by dhcpstrt -i lan0
     (or whichever interface for which you need to lease an address)
     <Enter>. By default, the process will wait 45 seconds for a
     response, and then try in the background. You may speed up the
     foreground -> background stuff by adding a "-d 0" parameter, which
     effectively means "try forever, in the background." dhcpstrt -?
     <Enter> will yield you brief syntax on this. Note that it is also
     helpful when doing this at the command prompt to flush your arp
     cache and your routing table before requesting a new lease (unless
     you're certain that none of this has changed). In that case, the
     sequence of commands would be:

     dhcpmon -t
     arp -fh
     route -f
     dhcpstrt -d 0 -i lan0

  3. (More elegant from the command line):

     dhcpmon -l && dhcpmon -r <Enter>

     Yep. That's it. The first command releases the lease and the
     second one requests a lease. Apparently, when it releases the
     lease, it does properly flush the tables (that's how it seemed
     from here when I tested it).

<snip>

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
Need a managed Wi-Fi hotspot?                www.hautspot.com
visit my IT blog                www.2rosenthals.net/wordpress
-------------------------------------------------------------


Subscribe: Feed, Digest, Index.
Unsubscribe
Mail to ListMaster