How to acquire a new ip address

Akemi Iwaya has been part of the How-To Geek/LifeSavvy Media team since 2009. She has previously written under the pen name “Asian Angel” and was a Lifehacker intern before joining How-To Geek/LifeSavvy Media. She has been quoted as an authoritative source by ZDNet Worldwide. Read more.

How to acquire a new ip address

Whether you are in it just for a bit of geeky fun, or are seriously wanting to know the answer, how do you find out the IP address for a website? Today’s SuperUser Q&A post looks at the answer, and how to know if more than one website is bound to the same IP address.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

The Question

SuperUser reader JqueryLearner wants to know how to find out what the IP address of a website is:

If I want to know the IP address of a website, then one way is to ping the website. For example, if I want to know the IP address of, then I can ping it via the command prompt.

How to acquire a new ip address

So is the IP address for Google. But suppose I want to know the IP address of, and if I use the same method, then I get as the IP address. If I put this IP address in the browser as an URL, then my browser does not take me to

Can anyone tell me how to get the correct IP address?

So what does JqueryLearner need to do in order to find out the correct IP addresses for websites?

The Answer

SuperUser contributors Paul and lesca have the answer for us. First up, Paul:

Your starting assumption is that all websites can be accessed via their IP address directly. This is not the case.

In many cases (I’d venture most cases), the website that is presented at an IP address is dependent on the website name you are requesting. For example, if you request, you will first resolve this to an IP address, then make a request to the IP address for a specific webpage. It looks like this:

How to acquire a new ip address

The first part says “get the first page of the site”, and the second says “for the website”.

This is why a single web server can host multiple websites using a single IP address. In the case of the Stack Exchange sites, any or all of them can be on each of their servers, and you’ll get the one you ask for. If you just put in an IP address, you won’t get any of them, because you are not telling the web server which of the many websites you are after. In these cases, it may have a “default” website defined, or just return an error.

If you are trying to work around an issue with your DNS provider, then one option you have is to modify your hosts file so that you are resolving addresses yourself, rather than have an external party do it for you.

So for example, if you edit:

How to acquire a new ip address

You can enter:

How to acquire a new ip address

This way, if you type into your browser, it will look in the hosts file, and resolve the IP address, but then still pass through the name of the website to the server it connects to.

Followed by the answer from lesca:

To get the IP address of a website, the best way is to use the nslookup command. For example:

How to acquire a new ip address

If you wonder why you cannot visit SuperUser directly using the IP address (, it is because of the settings for the web server. The SuperUser site disallows user visits via IP address. Probably it is because the IP address is binding to other web sites (say If you use “IP reverse lookup” tool, you can find its binding sites.

One more lookup proves I am right:

How to acquire a new ip address

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

Release and Renew IP address and fix network connectivity problems

Release/Renew IP address is a procedure meant to solve network connectivity issues related to cached IP information. It can be done via Command Line on Windows or System Preferences on Mac OS. Release and Renew IP address means giving up the lease of DHCP IP address of the host computer and making a request for a new IP address. First of all, the ipconfig /release command is used to give up current IP lease and send the server a DHCP alert to mark the old IP address as available. The second command – ipconfig /renew requests a new IP address.

These commands help to solve network connectivity problems that arise due to expired IP addresses or other minor computer bugs. It can help to solve IP-related issues and restore fully-functioning network connection instantly.

How to acquire a new ip address

Related: How to Flush DNS Cache on Windows, Mac, Linux?

Follow the guide below to release and renew ip address on Windows 10, 8, 8.1, 7, Vista, XP, Mac and Linux. Make sure that your network adapter needs to be configured to Obtain IP address automatically, otherwise these commands won’t work.

How to Release and Renew IP Address on Windows, Mac, Linux

Windows 10, 8.1 and 8

To release and renew IP address on Windows 10, 8.1 or 8, follow the steps given below.

  1. In Windows 10, 8 or 8.1, use Windows search to find Command Prompt .
  2. Right-click on Command Prompt and select Run as Administrator option.
    How to acquire a new ip addressipconfig /release and press Enter.
  3. Next, type ipconfig /renew and press Enter.
    How to acquire a new ip addressWindows 7 and Vista

Follow these steps to use ipconfig /release and ipconfig/renew commands on Windows 7 or Vista.

  1. Click on Windows menu, then type cmd in Windows search bar.
  2. Right-click the Command Prompt result and choose Run as Administrator from the menu.
    How to acquire a new ip addressipconfig /release and press Enter.
  3. Type ipconfig /renew and press Enter.
    How to acquire a new ip addressWindows XP
  1. Press START>All Programs>Accessories. Right-click Command Prompt and choose Run As…. Choose Administrator‘s account and enter password for it. Press OK.
    How to acquire a new ip addressipconfig /release and press Enter.
  2. Now, type ipconfig /renew and press Enter to finish.
    How to acquire a new ip addressMac OS

How to acquire a new ip address

  1. Click the Apple logo in the top-left corner of the screen and select System Preferences.Linux/Ubuntu

The guide below provides an equivalent of ipconfig /release and ipconfig /renew commands on Linux. Use these steps to force DHCP Client to Renew IP Address.

How to acquire a new ip address

  1. Press CTRL+ALT+T to launch Terminal on Linux.
  2. In Terminal, type sudo dhclient – r and press Enter to release current IP.
  3. Then type sudo dhclient and press Enter to get a new IP address from DHCP server.
    Useful DNS Resolver Commands for Windows

In addition to Renew and Release IP commands, you might want or need to use some of the commands listed below.

  • ipconfig /flushdns. This command helps to clear the DNS Resolver cache so that the new IP information would be fetched instantly.
  • ipconfig /registerdns. This command refreshes all DHCP leases and registers DNS names from scratch.
  • ipconfig /displaydns. Shows current contents stored in DNS Resolver Cache.

Fix IPconfig release renew not working

IPConfig /Release and /Renew commands work only if your network adapter is set to fetch the IP address automatically. In other words, you need to have DHCP enabled. You can configure these settings via Windows Network and Sharing Center.

1. Go to Network and Sharing Center, then select Change adapter settings.
2. Right-click your network adapter and open Properties.
3. Find Internet Protocol Version 4 ( TCP /IPv4) and click Properties.
4. Select Obtain IP Address automatically and click OK to save.

How to acquire a new ip address Norbert Webb

Norbert Webb is the head of Geek’s Advice team. He is the chief editor of the website who controls the quality of content published. The man also loves reading cybersecurity news, testing new software and sharing his insights on them. Norbert says that following his passion for information technology was one of the best decisions he has ever made. “I don’t feel like working while I’m doing something I love.” However, the geek has other interests, such as snowboarding and traveling.

Please follow the steps below to set up your computer for obtaining an IP address automatically from the DHCP server.

For wired connection, please register your network card first.

For Windows 10:

  1. Right Click Windows Startto open the context menu.
  2. From the menu, click Control Panel.
  3. Select Network and Sharing Center.
  4. Select Change adapter settings.
  5. Select Etherent.
  6. Select Properties.
  7. Tab on Internet Protocol Version 4 (TCP/Ipv4), then click on Properties.
  8. Select Obtain an IP address automatically and Obtain DNS server address automatically.
  9. Click OK to exit the Internet Protocol Version 4 (TCP/IPv4) Properties.
  10. Click Close to exit the Ethernet Properties.
  11. Click Close once more to exit the Ethernet Status.

For Windows 8:

  1. Point the cursor to the upper right hand side of the screen to display the Charm Menu.
  2. Click on Settings > Control Panel.
  3. Select Network and Internet > Network and Sharing Center.
  4. Click on Ethernet.

How to acquire a new ip address

How to acquire a new ip address

For Macintosh (Mac OS X):

  1. Select System Preferences from the Apple menu at the top left of your screen.

Expanding to a previous question where I asked if it would be possible to redirect traffic on a port from another device to my local device, if a PC on my network (device A) has the IP address, would it be possible for another PC (device B) that has an IP address to force-use the IP address in a way that causes device A to lose network access through that IP? If yes, how would that be possible or how can I prevent this type of attack?

For testing, I tried to use the IP on 2 devices on the same network with ARP checking disabled. Only device A was responding, but I’m not sure if there is a type of attack that can cause device A to stop responding and I wasn’t able to find this information online, so any answer would be greatly appreciated!

3 Answers 3

This would be an “attack” that would prevent only devices that don’t know the MAC address/IP correspondence to talk to Device A. Under normal circumstances they would have the MAC address of Device A in their ARP cache.

If however this cache expires or a new device is connected to the LAN (the same broadcast domain) then the ARP request “who has” would be answered by two different machines. Quoting from Networking Basics: How ARP Works:

In the case where multiple machines have the same IP address, you may get multiple responses. The one that gets placed in the ARP table can vary depending on the networking implementation, how busy hosts are, and how quickly they respond, etc.

Your concern is unavailability of Device A but another thing that can happen is for an attacker to be a man-in-the-middle: Inform you Device A that he has the IP of the gateway and inform the gateway that he has the IP of Device A. He will thus make all traffic to and from Device A pass from the eavesdropping system in the middle.

To renew or change the IP address, you can use the netsh command. Here’re the steps to change the IP address in Command Prompt in Windows 10.

When connected to a network, the Windows computer will automatically get a new IP address as long as it is configured to “Obtain an IP address automatically“. Generally, having the IP address auto-assigned is pretty helpful as you don’t have to configure any extra settings to connect to a network. For instance, you can just plug-in the ethernet cable or connect to a WiFi network and you are ready to go thanks to the auto-config option in Windows 10.

Though Windows can automatically obtain an IP address without any hassle, there might times where you need a specific IP address. For example, to share files in your local network, having a static IP address is really helpful. This eliminates the need to reconfigure the IP address every time you want to access the network drive. In these kinds of cases, you need to change the IP address in Command Prompt.

Thankfully, with just a couple of commands, you change the IP address from Command Prompt. Here are the exact steps you should follow.

Steps to Change IP Address in Command Prompt

  1. First, press the Windows key to open the Start menu.
  2. Now, type “Command Prompt” in the search bar.
  3. Right-click on the Command Prompt and select the “Run as administrator” option.
  4. Execute the below command to get the network interface name.
  5. If you have multiple network interfaces, note down the interface name for which you want to change the IP address.
  6. Once you have the interface name, execute the below command while replacing “IP_Address”, “Subnet_Mask”, and “Gateway” with the actual IP address you want to assign, subnet mask, and gateway respectively.
  7. After assigning the IP address, close the command prompt window.

That is all. It is that simple to change the IP address in the command prompt.

Note: You can get the subnet mask and gateway addresses from the router or from your ISP.

If you want the IP address to be assigned automatically, execute the below command. This will set the network interface from Static IP to DHCP. DHCP will automatically get a new IP address from the router.

That is all. I hope that helps. If you are stuck or need some help comment below and I will try to help as much as possible. If you like this article, check out how to change the network name in Windows 10.

Hey all, I would like to apologize in advance if this problem has been posted numerous times before and is easily resolved. I’ve worked with computers for a major part of my life, but I’ve never been in-depth with them.

Alright, now straight to the point.

My laptop is a Sony Vaio VGN-Z16SN running on Microsoft Windows XP Professional, Service Pack 3.

For internet access, I’ve always connected my computer via ethernet cable and never have I had any problems with it until yesterday at least. When I connect it the status shows "Limited or no connectivity", I’ve tried connecting repairing the connection but it returns with "Windows could not finish repairing the problem because the following action cannot be completed: Renewing your IP address". The IP address shows and Subnet Mask Under ‘Services’ in the administrative tools, I’ve checked that the DNS Client as well as the DHCP Client are both running. I’ve tried manually entering the IP Address, but to no avail, the connection status would show "Connected" but but I am unable to actually use the internet showing "Server not found" on my internet browsers, therefore I set it back to Auto. Under command prompt, whenever I type ipconfig /renew the following error would occur:

Windows IP Configuration

No operation can be performed on while it has its media disconnected.
No operation can be performed on Wireless Network Connection while it has its media disconnected.
An error occurred while renewing interface Local Area Connection : The DHCP client has obtained an IP address that is already in use on the network. The local interface will be disabled until the DHCP client can obtain a new address.

This is what I get when I type out ipconfig /all:

Windows IP Configuration

Host Name . . . . . . . . . . . . : sony-db2f700b80
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Broadcast
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Anchorfree HSS Adapter
Physical Address. . . . . . . . . : 00-FF-97-3A-25-05

Ethernet adapter Wireless Network Connection:

Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Intel(R) Wireless WiFi Link 5100
Physical Address. . . . . . . . . : 00-16-EA-5B-D2-82

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) 82567LM Gigabit Network Connection
Physical Address. . . . . . . . . : 00-1A-80-D6-EE-A9
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . :
Subnet Mask . . . . . . . . . . . :
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . :

I have also tried using the winsockfix application, but to no avail.

I know there is a simple command for this, but how do I tell my Ubuntu server instance to request a new IP address from the DHCP server on eth0?

4 Answers 4

To release the current IP address:

To obtain a fresh lease:

Another issue I ran in to was that dhclient kept requesting the same IP from the DHCP server. Running the command dhclient -r did not resolve this. Therefore, after reading the man pages more thoroughly, I found that if I edited the file /var/lib/dhcp3/dhclient.leases to remove all lease references to the specific adaptor, in my case eth0 . Then running sudo dhclient eth0 worked as expected and assigned me a new/different IP.

My situation was perhaps unique, but it required that my server pull an address from a higher range than was previously issued. The DHCP server was configured to do this, unless a specific IP address was requested regardless of the range. Since dhclient was specifically requesting the old IP address, based on the information in the dhclient.leases file, the DHCP server was always returning the same address.

When you run “sudo /etc/init.d/dhcp3-server restart” does it give something like:

Stopping DHCP server: dhcpd3. Starting DHCP server:dhcpd3.

If not, it’s not running.

Then just be sure, check if your client sends out a request for a lease, take a look at your /var/logs/deamon.log file. There should be a bunch of DHCP requests in there. If not, the problem is with your client (and we will take it from there).

If your client is ok, just forget about firestarter for the moment and let’s try to get it working without it. To make sure your DHCP server is up and running. Type “sudo /etc/init.d/dhcp3-server stop” and then “sudo /etc/init.d/dhcp3-server start”. Then it should be running, assuming it’s properly installed on your box.

I have included a copy of my dhcpd.conf file.

Finally, take a look at your server’s /var/log/messages file if it gets the requests and replies to it with a valid lease. It also might give you an idea what’s wrong with your configuration file (if there’s something wrong with it ofcourse). If you can’t make anything of this, post your messages file and I will take a look lateron.

There may come a time when you need to know the IP address of your router, as assigned by your ISP. These numbers are easy to find, when you know where and how to look.

How to acquire a new ip address

Networks, and the internet, don’t identify computers (of any size, even your smartphone) by the name you give them. Computers prefer numbers, and the numbers they use as identifiers are called IP addresses.

The “IP” stands for “internet protocol,” which is part of Transmission Control Protocol/internet Protocol (TPC/IP). It’s all called IP for short, and TCP/IP is the language used for communication by most networks.

When it comes to your computer(s), there are actually several IP addresses involved. One is how the computer talks to the internet at large, which is the IP address of your router. That IP address is generally assigned to the router by your internet service provider (ISP); the router, in turn, handles all the traffic from your computer out to the internet. So even though a website only sees a request come in from the IP address on the router, the router knows how to route the information to/from the computer. (That’s why it’s called a router.)

Computers on the internal networks, be it Wi-Fi or Ethernet, at home or in the office, have their own IP addresses assigned to them (usually by the router). That way, all the nodes on the internal network can also communicate. The protocol used by the router to assign IP addresses is called Dynamic Host Control Protocol (DHCP).

If you have an IP address assigned, it’s typically considered a “dynamic IP” because it could be temporary; the router might give the node in question a different IP address at a later time (same with the IP address your ISP gives your router). However, you can set up “static IP addresses” on computers so they never change—this can be important for some kinds of network communications, especially if it’s crucial to be able to find that same node over and over. You could also get a static IP for your router—which is handy if you run a web server, for example, but expect your ISP to charge extra.

IP addresses are typically in the same format as a 32-bit number, shown as four decimal numbers each with a range of 0 to 255, separated by dots—each set of three numbers is called an octet. This format is used by IP version 4 (or IPv4). With it, you could—in theory—have to out there. However, this limited the world to a possible 4+ billion IP addresses, which isn’t enough.

So now, there’s IPv6, which is 128-bit, with eight groups of four hexadecimal digits (numbers and lower-case letters mixed), all separated by a colon (for example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334). That offers a lot more than 4 billion addresses. The actual number is a 34 with 37 zeros after it (or 2 to the 128th power), which is technically 340,282,366,920,938,463,463,374,607,431,768,211,455. That’s a lot of addresses.

That’s all good to know, but how do you find your IP address?

Find Your Internet/Public IP Address

There may come a time when you need to know the IP address of your router, as assigned by your ISP. This can be particularly handy for things like VoIP calls or remote control software.

What you’ll also find is that there’s lots of information about you attached to that IP address, specifically your ISP’s name and your general location (called a GeoIP). That’s because ISPs dole out a range of IP addresses. Figuring out your provider and general location based on IP address is as simple as consulting a public list.

The simplest way to check your router’s public IP address is to search “what is my IP?” on a search engine.

With Google, that’s all you see. There are plenty of sites out there that will show you the exact same thing. They see it simply because by visiting the site, your router has made a request, and thus revealed the IP address. Sites like and IPLocation all go farther, showing off the names of your ISP, your city, and even maps.

The GeoIP info is far from foolproof. Generally, you’re going to get an approximation of location—where the provider is, not the actual computer. In visiting those sites, I was told I was in Ithaca, New York. and Syracuse, New York. One gave a latitude/longitude that put me in North Carolina (which could be where my ISP has a data center, for all I know). Be sure to log out of your VPN service, too. Getting a real address for the public IP address usually requires a search warrant taken to the ISP.

Find Your Internal IP Address

Every device that connects to your internal network, be it at home or the office, has an IP address (your PC, your smartphone, your smart TV, your network printer, etc.) It doesn’t matter if it’s using Wi-Fi or Ethernet. They’ve all got an IP address if they’re talking to the internet, or each other, through your router.

In the most basic network, your router is going to have an IP address like, and that will be called the “gateway.” You’ll see it pop up a lot as you look for the IP addresses of other devices. That typically means your router will use DHCP to assign addresses to devices, where only the last octet changes. So, or, for example. It depends on the range defined by your router.

Finding the IP address of your computer is a common first step when setting up a network or troubleshooting a connectivity problem. Here, we’ll show you how to find your IP address for both Mac and Windows. Then, find out how to protect your IP address with a world-class VPN.

How to acquire a new ip address

Public (external) IP vs local (internal) IP

Humans use plain-language addresses (such as to refer to websites. But since computers store everything digitally, they need another system. That’s where IP addresses come in. To understand what an IP address is, think of it as a series of numbers that identifies any type of digital device on the internet.

This article contains:

This article contains:

There are two types of IP addresses: public (or external) IP addresses and local (or internal) IP addresses. The public address is provided by your internet service provider (ISP) and is how the internet recognizes your network. Each device on your local network, including your computer, has a unique local IP address that is usually assigned by the router on your internal network.

You may need a local IP address to do things like setting up printers or solving technical problems on your network.

If your problem isn’t on your own network — if the trouble is out there on the internet — knowing how to find your public IP address is an important troubleshooting step. For example, you may need to tell a tech support person your public IP address if you lose your internet connection or if you want to give someone permission to administer your network remotely.

(Though it’s not necessary if you want to find your IP address, it is worth knowing that the entire internet is based on a series of standards called TCP/IP. If you’re curious, this article explains what TCP/IP is.)

Even if you think you know your public IP address, you should check anyway because it may have changed. In some cases, the IP address you’re assigned by your ISP is “static” — that is, it never changes. But your ISP usually has the right to change your public IP address for its own business reasons — what’s called a “dynamic” IP address. The difference between static and dynamic IP addressing is at the root of a lot of connectivity problems.

As you dig into finding your IP address, you may see two different versions, expressed as IPv4 and IPv6. The computer industry is slowly moving from IPv4 to IPv6, but for most purposes, you need only care about IPv4. If you want to learn more, you can read about the differences between IPv4 and IPv6, and which is better.

How to find your public IP address

There are several simple ways to identify your public IP address. The easiest way to find your IP address is to use a free online tool such as HMA’s IP checker. The HMA tool quickly tells you your IP address, your location, and your ISP.

Another way to find your public IP address is to use Google search. Simply type in “what is my IP address” or “how to find my IP address” and the search engine will tell you — though it won’t reveal your ISP or your location.

Remember that these tools tell you your public IP address — the one the internet uses to find your network — not the local IP address behind your router.

Is my IP address secure?

No. Your public IP address is public. Just as there are tools that let you find your public IP address, there are tools that let other people find your public IP address, too. That might alarm you, and rightly so.

Everything you do online is tagged with your IP address: your emails, your online shopping activity, your browsing history. Someone who knows your IP address can identify your location, just as you can. This is how online ad tracking works: advertisers can feed you ads based on where you’re browsing from.

It’s hard to associate a public IP address with a particular person and, in the vast majority of cases, it’s not worth the effort. But a motivated stalker or cybercriminal might make that effort — so may law enforcement.

The best way to disassociate your public IP address from your location is to use a VPN (virtual private network). A tool like Avast SecureLine VPN routes your internet traffic through another network with a different IP address. That IP address may be assigned to some other place in the world and can’t be traced back to where you really are, effectively masking you.