Solved

vista: how to change ip address through command prompt?

Posted on 2008-10-12
9
3,107 Views
Last Modified: 2010-08-05
hello,

i just want to know... i'm using microsoft vista rite now and wonder; how to change my ip address by using command prompt. can anyone give me the line of codes?
0
Comment
Question by:crackmonks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 4

Expert Comment

by:MikeSel
ID: 22697025
Change it? Do you mean set it statically? Or use

ipconfig /release
ipconfig /renew

to get a new DHCP assigned address?
0
 

Author Comment

by:crackmonks
ID: 22697072
uurrmmm... actually, i found the term 'change' from articles which i read via the internet and most of them suggest me to use:
ipconfig/flushdns
ipconfig/release
ipconfig/renew

i used the technique suggested but it didn't work. i guess, maybe the command only for xp. if yes, how about vista?
0
 
LVL 77

Accepted Solution

by:
Rob Williams earned 50 total points
ID: 22697632
If the DHCP lease has not expired withe the DHCP server/router you will simply be reassigned the same IP with ipconfig.

Is the DHCP server on your local network or with an ISP.
If you wish to change on a local network you are best to assign a static IP either through the graphical interface [ manage my network connections | right click on the adapter and choose properties | highlight TCP/IP ver 4 and choose properties | here you can set the IP configuration].
You can also do so at a command line with (sample values):
netsh interface ip set address name = "Local Area Connection" source = static addr = 10.0.0.99 mask = 255.255.255.0
netsh interface ip set address name = "Local Area Connection" gateway = 10.0.0.254 gwmetric = 1
netsh interface ip set dns name = "Local Area Connection" source = static addr = 4.2.2.2
netsh interface ip add dns name = "Local Area Connection" addr = 4.2.2.3

If the DHCP server is the ISP's, you can only change your IP by changing your MAC address, that of the PC (often not possible) or your router's MAC. When the connection is refreshed you will be assigned a different IP.

Why is it that you wish to do so?

0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:crackmonks
ID: 22697840
actually, i found an article discussed about how to use rapidshare without paying for the premium member. I didn't interested with that. I was only interested with the IP swicther technique because i had an idea with that. My idea needs the command prompt lines because I wanna use .bat file. My .bat file worked only on XP but not Vista. That's why I would like to ask for some helps :)
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 22697869
The netsh commands above are intended for use with a batch file. Though ipconfig release and renew can also be used in a batch file (including Vista), as mentioned in most instances you will be reassigned the same IP.
0
 

Author Comment

by:crackmonks
ID: 22697900
again, tested! and i faced the same problem... i don't know whether this is basic or what... but the problem is this appeared

"The requested operation requires elevation".

how can this happen and how to fix it? any idea?
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 22697966
It can only be run as an administrator with Vista.
If you are running from a command line go to all programs | accessories | right click on the command prompt and choose run as an administrator. Simply being an admin of the machine is not enough.
You can also do so by enter in in the search box  cmd  and press ctrl+shift+enter to start a command window with administrator (elevated) privileges. Either way you will see "administrator" on the menu bar.
0
 

Author Comment

by:crackmonks
ID: 22698009
Thanks a lot for your help. actually, i'm still stuck and i think this gonna be a long discussion if i keep asking questions where the answers can be found via mr.Google. TQ RobWill. I really appreciate your help ;)

ps: and you too MikeSel :)
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 22698042
OK. Thanks, and good luck with it.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many reasons a PC runs slower than when it was new, ranging from malicious software intended to mess things up to simple general Windows use.  Your PC performance may slowly degrade over time without you noticing but when you buy a PC from…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question