Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OK well I was just wondering if there was a server with a dynamic (changing) IP address and a client that is connected to it, would it be able to change the IP Address, so in other words, could I avoid the IP address changing by having at least one active connection?

share|improve this question
If you want a static ip address you should pay your internet provider for a static ip address. Eventually the client will close the connection and that's when your dynamic ip address would change. In other words the connection likely would be forced closed when the lease expires. – Ramhound Mar 7 '13 at 9:20
OK I thought they would maybe do something like that. – Phoenix Logan Mar 7 '13 at 19:10
up vote 1 down vote accepted

As long as your connection "stays up", your IP address really should remain the same. That said (depending on your connection), your connection is probably being restarted at a "lower level" then TCP, eg the connection is loosing its PPP link and needs to renegotiate it in case of DSL.

share|improve this answer
Thanks... I might get DDNS just in case. :) – Phoenix Logan Mar 9 '13 at 3:37

Generally, a computer will just renew its lease when it expires, keeping the same IP. The DHCP server (which assigns IP addresses) can deny this request and give the computer a new IP, but ISPs generally don't do this. Keeping a client connected to the computer isn't necessary to avoid the change; the IP address will generally be renewed whether or not a client is connected, and a client being connected won't stop an IP change.

share|improve this answer
No I'm talking about the IP address that is accessible globally, not the router or DHCP IP address. – Phoenix Logan Mar 7 '13 at 2:23
ISPs use DHCP to assign the external IP. – cpast Mar 7 '13 at 2:33
@cpast - Not neccessarily, or even typically - when I was running an ISP we used Radius and it IP address pools. – davidgo Mar 7 '13 at 2:43

In thinking this may be a XY problem, if your real question is "how can reliably get the current IP of my server" the solution to that is use a dynamic DNS service.

If you don't care that your computer will be at where the only thing you can customize is the xxxxxxx part there are a lot of free providers out there who offer the service. Often you just need to run a program on your server (or some routers have the software built in) that detects when your IP changes and will update your DNS name to the new IP.

Here is a list of a few free dynamic DNS providers.

share|improve this answer

If you read about the DHCP protocol, you'll encounter the term "lease". The IP given to a system by DHCP is typically leased, and can be changed when that lease expires. If the end system refuses to change IP when the lease expires, you'll have an IP conflict on that network. In the case of your router ignoring an ISP's DHCP lease ending, you'll lose connectivity.

It may be that when your lease expires that your ISP is giving you the same one again if no one else has claimed that IP address in the meantime. You can't count on that always being the case, though. You never know when they may reorganize their network and give you a different one.

If your lease expires and you weren't supposed to get the same IP via DHCP, it means someone else in the cable company's network has it. So traffic going to what used to be your IP will be going to someone else.

There is no rule, law or limitation saying that the ISP has to allow current connections to complete or expire before switching IP addresses on you.

share|improve this answer

You must log in to answer this question.

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