Windows 7 - How to REALLY reset DHCP on a wireless client?

Asked By DaveNuttal on 27-Apr-07 03:34 PM
I have two wireless routers, at different locations, which have a VPN
established between them.

If I take a laptop from location 1 to location 2 it continues to use the
location 1 router (which is visible through the VPN) as the default gateway,
DHCP server, and DNS server - leading to degraded performance.

The association with location 1 persists through reboots, ipconfig/reset and
/renew, and Wireless Network Connection Repair. Apparently the ip address of
the DHCP server is being remembered somewhere.

The easiest way I have found to break the association is to disconnect the
router from the modem, and then do a Wireless Repair. As the router at
location 1 is no longer visible the laptop hooks up with the router at
location 2. During this process a number of messages flash past on the
number of things that are being reset - but they zip by too fast to read.

Does anyone know what is being reset during this process, and how I can do
it by hand without breaking the network?




Jack \(MVP-Networking\). replied on 27-Apr-07 04:22 PM
Hi
Which OS?
What are you using to manage the Wireless.
It is Not a DHCP issue. Your Laptop probably stays in a state that it
preferred to be associated with the first Router's SSID.
Jack (MVP-Networking).
DaveNuttal replied on 27-Apr-07 05:20 PM
Hi Jack,

Apologies for not providing that - the laptops are running either XP Pro or
XP Home. The one I am using for troubleshooting is XP Pro.

The locations are 20 miles apart, so there is no choice on the wireless
front - the laptop uses the local router for the wireless service.

It seems that, even if the address lease has expired, the laptop remembers
who the DHCP server was, and specifically asks that router for a new address
- hence my categorizing it as a DHCP issue.

Best regards,

Dave
Jack \(MVP-Networking\). replied on 28-Apr-07 11:26 AM
Hi
How the Laptop is set, Obtain Auto IP and DNS, or Static configuration?
The computer need to obtain an IP from the second Router otherwise it can
not connect and see any thing at all.
What VPN established means? To Routers need functional computer to establish
active VPN unless they are special End Point Router.
Jack (MVP-Networking).
DaveNuttal replied on 28-Apr-07 04:04 PM
Thye laptops are all set with Obtain Auto IP and DNS. I believe that the
problem is caused by XP remembering the IP address of the DHCP server even
through an ipconfig/reset.


The routers are running DD-WRT with OpenVPN. One is configured as the VPN
server, the other as the VPN client. They are set up so that the two
locations are bridged - they appear as a single network. The routers use
DynDNS to keep track of their actual IP addresses. The laptops see only the
internal IP addresses - 192.168.0.1 and 192.168.0.2 for the routers at
location 1 and location 2 respectively.
Jack \(MVP-Networking\). replied on 28-Apr-07 07:38 PM
Hi
I never encounter such a phenomenon.
If it was my system I would first suspect that it has to do with the DD-WRT
and OpenVPN.
Some of the "Fancy" add On to DD-WRT are not bug clean.
I would first neutralized this setting and see if the same issue occurs with
a regular connection.
Or just try the Laptop with some normal Hotspot at your local Internet Café
and see if it does the same.
Jack (MVP-Networking).
DaveNuttal replied on 29-Apr-07 09:16 PM
Hi Jack,

I caught the action using a sniffer - and it is an MS issue. I will post
details as a reply to the original post...

Thanks,

Dave
DaveNuttal replied on 29-Apr-07 09:22 PM
Digging into what happens when you do an ipconfig/reset and then an
ipconfig/renew shows the following in the first message sent out on the
ipconfig/renew:

Option: (t=53,l=1) DHCP Message Type = DHCP Discover
Option: (t=116,l=1) DHCP Auto-Configuration
Option: (t=61,l=7) Client identifier
Option: (t=50,l=4) Requested IP Address = 192.168.0.106
Option: (t=12,l=4) Host Name = "Dave"
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"

As you can see, the client has remembered the previous IP address (not the
DHCP server address as I originally suspected), and is requesting it again.

So the question becomes, how can I force the laptop to forget it's previous
IP address - given that ipconfig/reset does not do this?
FairyPrinces replied on 30-Apr-07 05:28 PM
Hi,

Haven't tested this, its just an idea, you could set the ip range for DHCP
on the first router to 192.168.0.1-192.168.0.100 say, and then the range on
the second to 192.168.0.101-192.168.0.255 ?? That way the requested IP wont
be avaliable and it would have to get another one?

As i said, just an idea.

Will
DaveNuttal replied on 30-Apr-07 07:50 PM
That is very close to what I have set up - router 1 does .100-.149, and
router 2 does .150-.199.

Let's say I'm at location 1 with an IP address of .106. When I go to
location 2 (the lease will expire during the journey), XP asks for .106
again. Router 2 ignores this (as it is out of its address range), but router
1 gets the request over the VPN and responds. Now I have a computer at
location 2 using the router at location 1 - with the associated delays.

The issue I have is that I can't find any way to stop XP from asking for
.106. Temporarily breaking the link between router 1 and router 2 during the
DHCP negotiation is a solution - but it involves breaking the network.
DaveNuttal replied on 17-May-07 09:16 PM
The answer is ipconfig/release followed by a reboot. It seems that the old
IP address is being stored in memory (it's not in the registry or any file
that I could find), so a reboot clears this also.