Networking
1748097 Members
5749 Online
108758 Solutions
New Discussion юеВ

Need to force Windows to release IP's on bootup!

 
Tony Rose
Advisor

Need to force Windows to release IP's on bootup!

Here is the senario:

The movement of users into the new VLAN structure of the campus
network has uncovered a software 'limitation' in MS Windows. This
limitation affects the way network traffic is routed by the client
computer. Users who connect their laptop to the network via
network jack or wireless (on campus) and dialin to the modem
pool (from home) may experience problems accessing servers and services
with 158.34.0.0 ip addresses while using a dialin connection.

This is what happens.
- A user connects their laptop to a network jack in their office.
Windows picks up a 158.34.0.0 ip address from the dhcp server. The
address lease can be up to three days. No problem at this point.

- The user disconnects from the network, packs up and goes home.
No problem.

- The user dials into the modem pool from home. A new ip address is
issued for the dialup interface on their laptop. The ip address will
be in the 10.10.0.0 block. No problem.

- The user connects to the company web site. Our web server are on a
VLAN, 10.34.2.120. No problem.

- The user connects to web sites off-site. No problem.

- The user tries to connect to on-site systems with IP range 158.34.0.0. PROBLEM.

All of these servers have 158.34.0.0 ip addresses. Since the user had
their laptop at work and a 158.34.0.0 ip address was issued to their
ethernet interface, Windows will try to route all traffic destined for
addresses in the 158.34.0.0 range to their ethernet interface, not
their ppp connection. Windows does not consistently release their dhcp
ip addresses when the computer is shutdown.

To fix the problem, the user will need to manually release the
158.34.0.0 ip address that is set on their ethernet interface. As soon
as the address is release, the user should be able to access all
158.34.0.0 resources.

Anyway to make Windows do this release "on bootup"?"
7 REPLIES 7
Ron Kinner
Honored Contributor

Re: Need to force Windows to release IP's on bootup!

It seems strange that Windows still thinks the LAN is alive. You would expect it to drop the info from the routing table the minute you unplugged the LAN.

Have you verified that the route table shows the old connection still alive?

route print

Should show no sign of the LAN and only the newly learned stuff.

What does

ipconfig
or
winipcfg

show?

Is the old LAN info still there?

Does a tracert fail immediately or does it go to the dialup server?

On WinNT or 2000 you can run a bat file at start up:

ipconfig /release lanname

But it shouldn't be necessary.

Not sure about earlier Windows.

Ron
Tony Rose
Advisor

Re: Need to force Windows to release IP's on bootup!

Windows, at least Win98, doesn't clear its route table until the ip
address on the inactive interface has been released. Microsoft didn't
put very much intelligence into its interface drivers. If you simply
unplug the ethernet cable, its address information still appears in the
route table.
Troy A. Tudor
Frequent Advisor

Re: Need to force Windows to release IP's on bootup!

I had the same problem moving from my desk to a conference room to my home network. What I did is create a batch file called
IPFIX.BAT. The lines were:
IPCONFIG /RELEASE ALL
IPCONFIG /RENEW ALL

This would force Windows to release and renew it's IP adresses.

Hope this helps.
Troy
Ron Kinner
Honored Contributor

Re: Need to force Windows to release IP's on bootup!

Don't think ipconfig exists in Win 98. However, winipcfg does and you can do the same thing with it:

winipcfg /release_all
winipcfg /renew_all

You can probably stick the two commands at the bottom of autoexec.bat if you want or call a bat file with those two commands from win.ini run=myipfix.bat

Ron
DALE KING
Regular Advisor

Re: Need to force Windows to release IP's on bootup!


The easiest way to have it release at bootup is to put it in your windows startup.

In Notepad type the following two lines; Save the file in a directory of your choice and name it release.bat (something like that) then make a shortcut to it and put it in your windows startup. So that it will close the window when the file is excuted, right click properties of the shortcut and under the general tab, check close on exit. It should work fine.

winipcfg /release_all
winipcfg /renew_all
Ron Kinner
Honored Contributor

Re: Need to force Windows to release IP's on bootup!

If you use notepad to create a bat file make sure you save the file using quotes. If you type myfix.bat instead of "myfix.bat" you will get myfix.bat.txt and if you haven't set up your View Options to see all extensions it will hide the .txt from you and you will never get it to work.

Ron
Paul Harrison_1
Advisor

Re: Need to force Windows to release IP's on bootup!

Try running the attached VBS Script in your Windows - Start-Up directory.

Paul