Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from serverfault.com Sep 9 '10 at 4:51

This question came from our site for system and network administrators.

    
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 '10 at 4:48
    
To give specific instructions, it would help to know which version of Windows you're running. –  oKtosiTe Feb 10 '11 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

share|improve this answer

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 123.123.123.123

  • 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.

share|improve this answer
    
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 '13 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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.