Home · Compatibility Lists · Support Forums · FAQ · News Archive · Articles · Submit News/Upcoming News
NT Compatible
advertisement


Forum overview » Networking » Changing an IP address using the command line. (1/1)

Reply New Poll

Changing an IP address using the command line.
Author Message
simonroockley
Member


Posts: 44
Joined: 2000-03-05
Member No.: 2349
Icon 2002-05-01 04:37:21

Does anyone if it is posible to change the ip address of a Win2K or NT4 PC using the command line.

Thanks in advance.

Post #98004
Edit Quote Print Solution Plonk Delete
Palos
Senior Member


Posts: 723
Joined: 2000-02-04
Member No.: 1756
Icon 2002-05-01 07:11:24

If u using DHCP, u can "release" and "renew" the IP from the DHCP pool

Post #98006
Edit Quote Print Solution Plonk Delete
simonroockley
Member


Posts: 44
Joined: 2000-03-05
Member No.: 2349
Icon 2002-05-01 10:09:50

No i'm trying to do it with static IP addresses.

Post #98014
Edit Quote Print Solution Plonk Delete
simonroockley
Member


Posts: 44
Joined: 2000-03-05
Member No.: 2349
Icon 2002-05-01 12:24:29

got it.

you need a text file formatted as in the example below.


#========================
# Interface configuration
#========================
pushd interface

reset all


popd
# End of interface configuration



# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip


# Interface IP Configuration for "Local Area Connection"

set address name = "Local Area Connection" source = static addr = 192.168.0.2 mask = 255.255.255.0
set address name = "Local Area Connection" gateway = 192.168.0.1 gwmetric = 1
# --------------------------------------------
# Add extra gateway example
#---------------------------------------------
# add address name = "Local Area Connection" gateway = 192.168.0.254 gwmetric = 1
set dns name = "Local Area Connection" source = static addr = 192.168.0.1
# --------------------------------------------
# Add extra dns entry example
#---------------------------------------------
add dns name = "Local Area Connection" addr = 192.168.0.254
set wins name = "Local Area Connection" source = static addr = none
popd
# End of interface IP configuration


Then

execute the text file with the command

netsh -f {filename}

Post #98023
Edit Quote Print Solution Plonk Delete
clutch
Moderator


Posts: 3854
Joined: 2000-03-28
Member No.: 2798
Icon 2002-05-01 13:18:47

That's pimpy, I was gonna dig up an article on doing it with Windows Scripting Host but this looks pretty cool. I will have to check that out sometime.

Post #98032
Edit Quote Print Solution Plonk Delete

Related Threads RSS

- changing startup menu text (01/19/2005 01:30 pm)
- Changing localhost IP (08/13/2003 07:47 am)
- changing passwords question (02/16/2003 06:01 pm)
- Changing the RWIN setting? (03/27/2002 11:42 pm)
- Changing the MAC address on NT Server 4.0 (10/02/2001 08:29 pm)

Reply New Poll

Forum overview » Networking » Changing an IP address using the command line.

Legend
View   View profile
Solved   Mark this post as solution (topic starter only)
Quote   Reply with quote to post
Edit   Edit post
Delete   Delete post (admin only)

Moderator: Open / Close / Bump / Delete / Move / Merge

All products mentioned are registered trademarks or trademarks of their respective owners.
© 1998-2009 Esselbach Internet Solutions - All Rights Reserved. Terms and privacy policy
Website powered by Esselbach Storyteller CMS System