|
-
May 20th, 2005, 09:39 AM
#1
Possible? [SOLVED]
I was wondering:
Is it, or is it not possible to set all IP details through DOS?
Here is what I am trying to acheive.
My Wireless PCMCIA Card can (obviously) set to DHCP or static. When I am using it for work, mostly is DHCP. But at home I run Static.
I was hoping I could basically double click a script of some sort (batch file-style) that would automatically set either DHCP or my home Static IP details, without any more user intervention. Saves having to go to Network Control Panel, TCP/IP, Properties, etc etc. YOu get me.
Thanks!
HOng
-
May 20th, 2005, 10:03 AM
#2
Use two different hardware profiles - one for work and one for home.
CataclysmCow
-
May 20th, 2005, 10:47 AM
#3
Thats one solution: thanks. I guess i'll use that idea for now.
This is why I like Linux...no bother rebooting, all I have to do is run a script and its all done!!
HOng
-
May 20th, 2005, 11:11 AM
#4
If you are using Windows XP, you can set the machine to obtain an IP address automatically and configure one alternative static IP. For more information, see the following MS KB Article.
How to use the Alternate Configuration feature for multiple network connectivity in Windows XP
http://support.microsoft.com/default...b;en-us;283676
You can also use the "netsh" command to specify the IP configuration for multiple networks. You can type it a command prompt or include it in a .bat file.
To specify a fixed address:
netsh interface ip set address <connection> static <ip> <mask>
<gateway> <gateway metric>
For example:
netsh interface ip set address "Local Area Connection" static
192.168.0.100 255.255.255.0 192.168.0.254 10
netsh interface ip set address "Wireless Network Connection" static
10.20.30.100 255.0.0.0 10.0.0.1 20
To specify a DHCP address:
netsh interface ip set address <connection> dhcp
For example:
netsh interface ip set address "Local Area Connection" dhcp
How to Use the NETSH Command to Change from Static IP Address to DHCP in Windows 2000
http://support.microsoft.com/default...b;en-us;257748
Eric
-
May 20th, 2005, 11:24 AM
#5
Thanks ecross!!
I have one question.
I made 2 batch files, one for static (home) and one for DHCP. The dhcp one works, but the static one just hangs there.
My suspicsion in the gateway metric... I put it in as 0, but thats a guess. What is it? What does it refer to? Has it anything to do with OSPF type routing?
Thanks
Hong
-
May 20th, 2005, 11:37 AM
#6
Ok, works now. Just took a while 
But still...what is gateway metric?
-
May 20th, 2005, 12:03 PM
#7
An explanation of the Automatic Metric feature for Internet Protocol routes
http://support.microsoft.com/default...b;en-us;299540
Eric
-
May 20th, 2005, 01:54 PM
#8
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|