I need to test my application when there is a change in the IP address. What should I do to change my machines IP address?

Note: The IP address for my machine is obtained automatically. It's not a static IP.

  • If it's Windows, open a command prompt and enter "ipconfig /release", then "ipconfig /renew". This may not actually change your IP as your ISP may still give you the same IP you had previously. If you want to see if your application can survive a DHCP release/renew you may want to temporarily install and run your own DHCP server.
    – ultrasawblade
    Sep 9, 2010 at 4:48
  • To give specific instructions, it would help to know which version of Windows you're running.
    – oKtosiTe
    Feb 10, 2011 at 8:53

3 Answers 3


You can't force the DHCP server to give you a new IP address using IPCONFIG. It will always reissue the same address as long as your lease hasn't expired. Don't despair, however. The is a solution and it's an easy one. If you change the MAC address of your network interface card, the DHCP server will see you as a different computer and issue a new address. Generally you'd do this is the properties of your network adapter, probably on the Advanced tab. To see the current MAC address, you can get that from IPCONFIG /all:

        alt text


This is from here

This is Windows XP

  • Click on "Start" in the bottom left hand corner of screen.

  • Click on "Run".

  • Type in "cmd" and hit Okay. You should now be at an MSDOS prompt screen.

  • Type "ipconfig /release" and hit "Enter". This will disable your internet connection. To undo it, type "ipconfig /renew".

  • Type "exit" and leave the prompt.

  • Right-click on "Network Places" or "My Network Places" on your desktop.

  • Click on "Properties". You should now be on a screen with something titled "Local Area Connection", or something close to that, and, if you have a network hooked up, all of your other networks.

  • Right-click on "Local Area Connection" and click "Properties".

  • Double-click on the "Internet Protocol (TCP/IP)" from the list under the "General" tab.

  • Click on "Use the following IP address" under the "General" tab.

  • Create an IP address. (It doesn't matter what it is.)

  • Press "Tab" and it should automatically fill in the "Subnet Mask" section with default numbers.

  • Click the "Ok" button.

  • Click the "Ok" button. You should now be back to the "Local Area Connection" screen.

  • Right-click back on "Local Area Connection" and go to properties again.

  • Go back to the "TCP/IP" settings.

  • Select "Obtain an IP address automatically".

  • Click the "Ok" button.

  • Click the "Ok" button.

  • You now have a new IP address

For Windows vista/windows 7

  • Click "Start

  • Click on/point at "All Programs". Expand the Accessories menu

  • In the Accessories menu, Right Click "Command Prompt" and click on "Run as...".

  • Choose "administrator".

  • Click "ok".

  • Type "ipconfig /release" and hit enter.This will disable your internet connection.To undo,type "ipconfig/renew".

  • Click "Start", "Control Panel", and open "Network and Sharing Center". Depending on your view, you may have to click Network and Internet before you see the Network and Sharing Center icon.

  • From the Tasks menu on the left, choose "Manage Network Connections".

  • Find and Right click on the active "Local Area Connection" and choose "Properties".(If you’re hit with a UAC prompt, choose Continue).

  • Double-click on "Internet Protocol Version 4 (TCP/IPv4)".

  • Click on "Use the following IP address

  • Enter a false IP like

  • Press Tab and the 'Subnet Mask' section will populate with default numbers.

  • Hit "OK" twice.

  • Right click the active "Local Area Connection" again and choose "Properties".

  • Double-click on "Internet Protocol Version 4 (TCP/IPv4)".

  • Choose "Obtain an IP address automatically".

  • Hit "OK" twice.

  • Does this really work? My router remembers the MAC address and always will reassign the old address if the MAC address hasn't changed. I have MAC addresses from every person that ever connected to our Wifi in there. Mobile phones, tablets, laptops. It's kinda annoying actually.
    – Damon
    Aug 8, 2013 at 3:36

Follow the steps below to change your ip address:

  1. Click Start -> Control Panel
  2. Left click on Network and Internet and then choose Network and Sharing Center
  3. On the left side choose Change adapter settings
  4. Right click on your network card and from the drop-down choose Properties
  5. Under the Networking tab
  6. Choose Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6) and then click on Properties
  7. In next window you have an option between Obtain an IP Address Automatically and Use the following IP Address
  8. You need to select Obtain an IP Address Automatically to change IP address automatically
  9. Finally click on OK and your IP address should be changed

To check whether a new ip address is assigned or not by using the following command : Start->run->cmd->ipconfig/ipconfig/all

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .