• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

How to change the ip by command line

I tried to change the ip by command line, the netsh, but not work.

That is originally has one ip, but now need to change to another one.
0
turbot_yu
Asked:
turbot_yu
  • 3
  • 3
  • 2
  • +1
5 Solutions
 
Jay_Jay70Commented:
what do you mean netsh does not work? does it error? have you got enough rights to do it?
0
 
turbot_yuAuthor Commented:
I am the administrator, I try to use the netsh command to do it, but cannot work.
0
 
Jay_Jay70Commented:
you still havent told me how it doesnt work, do the changes not get made or are you having troubles actually using the command?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
turbot_yuAuthor Commented:
when using the command it said the ip is not a acceptable ip address
0
 
Jay_Jay70Commented:
then you used the wrong syntax start with netsh /?
then go through each step as the help explains  netsh /? then you will see options  
netsh interface /?
then netsh interface set /?

etc etc etc
0
 
Steve KnightIT ConsultancyCommented:
Yup, something like

netsh
int
ip
set address local static x.x.x.x 255.255.255.0 x.x.x.x 1
0
 
FriarTukCommented:
0
 
turbot_yuAuthor Commented:
netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1

yes, I tried like this but not work.
0
 
Steve KnightIT ConsultancyCommented:
But what does it do.  As jayjay say type

netsh    then press return and you end up netsh console
int   return
etc.
at each level you can type help to see the commands.

Is netsh running at all, what is the error - you don't get it on 2000 for instance.
0
 
FriarTukCommented:
depending on your router, your ip might be 192.168.1.10 or 192.168.2.10, also be sure you included the metric of 1

i just did this on my pc & it worked setting it to static then back to dhcp

netsh interface ip set address "Local Area Connection" static 192.168.0.70 255.255.255.0 192.168.0.1 1

netsh interface ip set address "Local Area Connection" dhcp (ip 0.55)

maybe you need to reset you tcp/ip stack
netsh int ip reset c:\resetlog.txt  (http://support.microsoft.com/?kbid=299357)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now