Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

releasing static IP 1

Status
Not open for further replies.

hetz

Technical User
Aug 2, 2006
3
US
I have a project where i have a xp tablet computer accessing a modum through a wireless bridge. The bridge requires an adhoc connection and a static ip. At times the bridge fails to connect or it connects but the modum will not initialize. If I physically reset the bridge I can acquire the modem. I have found that if I do a repair the bridge disengages and then automatically engages and I can go on. The problem is that I do not want users to access the wireless settings. Is there a way in dos to release the static Ip so I could write a simple script or bat to accomplish the release (repair)or are there any other thoughts. This would be easy if it was dhcp
 
Why not:
Code:
ipconfig /release
ipconfig /renew

IIRC ipconfig doesn't return until the release (or renew) completes.


pansophic
 
I tried that I do not know how many times then I started thinking. We were using the lights on the bridge to see if it was working. I broke it down and tested the connection and it does indeed work. The bridge's lights never flickered. Thanks for the lightbulb. Now to see if we can get the modum back...
 
Well I guess that doesn't really work either. It seems that release renew only works for DHCP. Up to this point it takes a repair to make it happen for my needed static IP. Not a real good workaround. But it is the only way I can get my modem back online. I quess I'm still looking for code to do a repair. The bridge is a moxa nport w2250.
 
You may have a misunderstanding of what a Repair does in the case of the IP in a static setting: it does not release and renew the IP at all. What does a Repair do?

NOTE: The actions occur in the order that they are listed. A corresponding command is listed next to each action.

• Dynamic Host Configuration Protocol (DHCP) lease is renewed: ipconfig /renew
• Address Resolution Protocol (ARP) cache is flushed: arp -d *
• Reload of the NetBIOS name cache: nbtstat -R
• NetBIOS name update is sent: nbtstat -RR
• Domain Name System (DNS) cache is flushed: ipconfig /flushdns
• DNS name registration: ipconfig /registerdns

Source:
So you could get by with the following; cut and paste into notepad and save as repair.cmd :

-------- Begin copy/paste below this line
arp -d *
nbtstat -R
nbtstat -RR
ipconfig /flushdns
ipconfig /registerdns

-------- End copy/paste above this line.

You might also explore with Google the command line syntax of NETSH.EXE

Best wishes,
Bill Castner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top