Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vista: how to change ip address through command prompt?

Posted on 2008-10-12
9
Medium Priority
?
3,122 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 200 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

The main issue when installing Vista and XP in dual boot is when you have to reinstall any of the two when something fails, let's say a hard disk failure, a lost partition, virus, etc. What commonly happens is that you lose all your hard work config…
The Service applet starts in Extended Mode by Default, with a taskpad on the left of the services pane. This view mode was introduced in XP. As I find it not very usefull, I like to use the Standard view as default, and without the Console tree. …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

688 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