Forum     

Go Back   Digit Technology Discussion Forum > Community > Tutorials
Register FAQ Calendar Mark Forums Read

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 03-09-2005, 11:42 PM   #1 (permalink)
Right Off the Assembly Line
 
wolvrine's Avatar
 
Join Date: Jul 2005
Location: http:404 not found
Posts: 33
Default Changing IP Addresses and Settings the Automated Way

If you need to move your Windows XP laptop between networks regularly, then you’re no doubt familiar with the hassles of switching your network settings back and forth. Or as in my case, I require different ip to connect to internet and different ip fot file sharing on LAN.If we are lucky, all of the networks that we connect to use DHCP and it isn’t an issue. However, manual changes are necessary when this isn’t the case.And it is really time comsuming and boooooooring
While changing your TCP/IP settings manually is not exactly a big deal,when you use automated way. I will explain here 2 ways of doing so.
1.NETSH command (vb script)
2.Registry edit


1.The NETSH command can easily put you just a double-click away from automating the switch. All you need to do is add the appropriate NETSH commands for each network to its own VBS script, and you can change anything from your IP address and default gateway settings to your DNS server addresses.

To set a static address of 192.168.1.25 and a subnet mask of 255.255.255.0 with NETSH, you would issue the following command:

Code:
netsh int ip set address name="Local Area Connection" source=static addr=192.168.1.25 mask=255.255.255.0


Of course, you’ll need to add the name of your connection in the name field (ipconfig /all provides the details). Quotes are necessary when the name includes spaces. If the command completes successfully, you’ll be presented with one very simple message – OK.

To change your default gateway address to 192.168.1.1, issue the following command:

Code:
netsh int ip set address name="Local Area Connection" source=static gateway=192.168.1.1 gwmetric=1


To switch your DNS server address to 192.168.1.100, the command would be:

Code:
netsh int ip set dns name="Local Area Connection" source=static addr=192.168.1.100


To switch these same elements back to using DHCP instead, the commands would be:

Code:
netshint ip set address name="Local Area Connection" source=dhcp
netshint ip set dns name="Local Area Connection" source=dhcp


To automate the process of changing your addresses,open Notepad, create a script for each network by puuting all the code together and then save the resulting files to your desktop with .VBS extensions.

Create one for home, another for work, or as many as you need for the various networks you connect to.




2.Registry edit method is also very simple. Just create a .reg file and You are there...

Creating a .reg file by writing would bea little difficult, as the values of ips and dns and subnets are need to be in HEX. Simple way of doing this is, go in network properties , set the ip you want. Set all DNS and gateway and all that can be done. Close it.

Open regedit-->Follow this path -->
Code:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters\Interfaces\{56382BD0-5A5C-472D-88C4-2D08EC1E9F99}]


Here the value {56382BD0-5A5C-472D-88C4-2D08EC1E9F99}] will be different for different PCs.
Go the the given path and find the required value. That would not be that difficult to find out. (I hope so).
Then when You find it , export that key and you are done.
Then you create such .reg files for other ip combinations. Only this part would be tedious after that just click that reg file to get required ip address.

If you need to change your TCP/IP settings manually, these two methods are huge time savers

EDIT:The source for the above article can be found here- digen
wolvrine is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 04-09-2005, 01:20 PM   #2 (permalink)
Alpha Geek
 
Join Date: Feb 2004
Location: Belgaum
Posts: 745
Default

Mate firstly the Tutorials section here is to promote users of digit to post their own articles & even if they do post someone else's article to share with everyone here they are expected to atleast post the "ORIGINAL SOURCE" of article & thereby pay respect to the original author of the article.

I hope from the next time around you will do the same.
__________________
The protection of a machine is a process & not a given -Duane Arnold.
www.Oobertech.net
Look ma my blog http://techhub.blogspot.com/
digen is offline  
Old 04-09-2005, 10:33 PM   #3 (permalink)
In The Zone
 
anomit's Avatar
 
Join Date: Mar 2005
Location: Kharagpur
Posts: 252
Default

[siEDITlease dont get into a aggresive or personal tone which could eventually start a flame war.We Mods are here to take care of the needful,i'll check his history & get back here with the reportings-digen


Post the source.

SOURCE


And digen, what were you waiting for??!!


[EDIT] LOLZ.........

A huge mistake, dint see digen postedthe sorce
__________________
Don\'t SYN me, I'll SYN you.
anomit is offline  
Old 05-09-2005, 09:56 AM   #4 (permalink)
kb
Right Off the Assembly Line
 
Join Date: Aug 2004
Posts: 10
Default

Hello
I dont know this post will come alive or not, ihope it does.
Subject: Working with 2 static ip address in XP
I have two IP address but Xp uses only one.
How to get Xp to work the second one also(simultaneously) Please reply friends!
__________________
╔══════ ═══════╗
║░My Sig♪ Nature ♪░║
║░░░☺ÖLΓußpα░░░║
╚══════ ═══════╝
kb is offline  
Old 05-09-2005, 08:27 PM   #5 (permalink)
Alpha Geek
 
Join Date: Feb 2004
Location: Belgaum
Posts: 745
Default

Simultaneously? Care to elaborate please?
What are you exact requirements?
__________________
The protection of a machine is a process & not a given -Duane Arnold.
www.Oobertech.net
Look ma my blog http://techhub.blogspot.com/
digen is offline  
Old 07-09-2005, 09:22 PM   #6 (permalink)
kb
Right Off the Assembly Line
 
Join Date: Aug 2004
Posts: 10
Default

ok what i want to do is as follows -
i have 2 connection (that is 2 static ip address)
Now when i go on line and do surfing or download from my Xp system, connection are made only from first ip connection
And i m not able to use 2nd connection (as i dont know how to)

I have a Dlink lan card (single)
I have set my both ip connection from this card
I made my connection like this
from Start >> Control Panel >> Network Conection >> Local Area Connection >> Properties >> In General Tab Select Internet Protocol (TCP/IP) Then click Properties >> In Use the following IP address Entered 1st IP address with other detail >> Then click Advanced button >> Under IP Setting tab I added 2nd IP address.

So this is how i connected my both ip conn.

Is there any setting in XP or any software to bind download manager to one ip address and browser to 2nd ip address

Can anybody help me to work my 2nd ip connectin
__________________
╔══════ ═══════╗
║░My Sig♪ Nature ♪░║
║░░░☺ÖLΓußpα░░░║
╚══════ ═══════╝
kb is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 11:45 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2