---
title: "How Often Does a Dynamic IP Change? Broadband, Mobile, Cloud"
description: "How often a dynamic IP changes depends on PPPoE, DHCP leases, CGNAT, mobile data or cloud instances. Includes a script to log your egress IP and fixes for allowlist and SSH breakage."
url: https://cdnping.org/en/blog/how-often-dynamic-ip-changes
language: en
published: 2026-11-01
category: "Networking basics"
tags: ["dynamic IP","public IP","DHCP","CGNAT","DDNS","networking basics"]
source: cdnping.org
license: Free to quote and summarize with a link to the url above.
---
# How Often Does a Dynamic IP Change? Broadband, Mobile, Cloud

There is no single answer to how often a dynamic IP changes. Home broadband usually gets a new address when the connection redials, mobile data can change addresses whenever the data connection reconnects, and a cloud server's ephemeral public IP may change when the instance is stopped and started again. What decides it is the type of connection you have, how your carrier assigns addresses, and how often your device drops offline. Rather than hunting for a "standard interval," log your own egress IP for a week with the script below. The result will be more accurate than any rule of thumb.

One note up front: this article does not cite any statistic like "an IP changes every N days on average." cdnping does not collect that kind of data, and most figures circulating online come from observations in particular regions and time periods, which may not hold on your network.

## Why does a dynamic IP change?

Carriers have a limited pool of public IPv4 addresses and cannot give every customer a permanent one. A dynamic IP is lent to you when you connect, reclaimed when you disconnect or the lease expires, and the next time you get one it may or may not be the same address.

So "how often does my IP change" is really two questions:

1. How often does your connection get re-established (redial, reconnect, failed lease renewal)?
2. When it is re-established, does the carrier's allocation system hand you a new address?

You can partly control the first. The second is entirely up to the carrier.

## Does a home broadband IP change?

Yes, but when it changes depends on how you connect.

### PPPoE: a redial can mean a new IP

Most home broadband in China uses PPPoE dial-up, handled by the fiber modem (the optical network terminal, or ONT) or the router. Each time a dial-up succeeds, the carrier's authentication system assigns an address to that session. Any of the following triggers a redial:

- Restarting the modem or router.
- A power outage, an unplugged cable, or a brief fiber interruption.
- In some regions, carriers periodically cut long-running dial-up sessions, after which the device redials automatically. Whether this happens and at what interval varies by region, and there is no uniform public policy, so go by what you record yourself.

You can also get the same address back after a redial, especially if the disconnect was very short, but you cannot rely on it.

### Does restarting the modem change my IP?

Probably, but not always. If your public address comes from the modem dialing, restarting the modem is a redial. If the modem is in bridge mode and the router dials, restarting the router redials directly. Restarting only the modem interrupts the link, and the router's PPPoE session usually drops and redials as well, with a result similar to restarting the router.

Keep one case in mind: if your IP "didn't change," you may not have a dedicated public IP at all and may be sitting behind the carrier's CGNAT.

### Behind CGNAT: what you see is a shared egress

Many home broadband lines and most mobile networks route IPv4 through carrier-grade NAT (CGNAT). Your router's WAN port gets an address in a range like `100.64.0.0/10`, and what shows up in website logs is the carrier's shared egress address. In that case:

- Restarting your own equipment changes the WAN address, but the external egress may not change.
- The egress can change even if you did nothing, for example when the carrier adjusts its NAT mappings.
- Many users share the same egress address at the same time.

To find out whether you are behind CGNAT, follow [Do I have a public IP? Three steps to check for carrier CGNAT](/en/blog/cgnat-check-public-ip). For how shared egress affects IP reputation, see [Do shared IPs and CGNAT affect IP reputation?](/en/blog/shared-ip-cgnat-reputation)

### DHCP leases: changing a LAN address is a different thing

A DHCP lease governs the private address your router gives your computer or phone (such as `192.168.1.x`), which is not the same as your public egress. Under the DHCP protocol, a client tries to renew at the halfway point of the lease, and a successful renewal normally keeps the address. So LAN addresses tend to be stable unless a device stays offline longer than the lease or the router's address pool fills up.

A few broadband or business lines assign public addresses directly over DHCP. Then the public IP is also subject to the lease, with the same logic: if the device stays online and renews on time, the address usually stays the same.

## How often does a mobile data IP change?

Usually more often than home broadband, and the IPv4 egress is mostly behind CGNAT. Any of these can change the egress:

- Toggling airplane mode, or turning mobile data off and on.
- Switching between Wi-Fi and cellular.
- Moving between regions, so the connection is handed to a different gateway.
- Re-establishing the data connection after the device has been asleep for a long time.

It is common for one phone to show several egress addresses in a single day. Phones also usually get an IPv6 address, and the privacy extensions enabled by default on most systems rotate temporary addresses periodically; see [IPv6 temporary addresses and privacy extensions](/en/blog/ipv6-privacy-extensions-temporary-address) for how that works. So the IPv4 and IPv6 addresses you see on a web page may change independently, on different schedules.

## Does a cloud server's public IP change?

It depends on which type of address you use:

| Address type | Common names | When it changes |
|---|---|---|
| Public IP that comes with the instance | Auto-assigned public IP, ephemeral IP | On several cloud providers it may change after the instance is stopped and started again; a reboot usually does not change it |
| Separately allocated elastic IP | EIP, Elastic IP, static external IP | Stays the same until you release it, and can be moved between instances |
| Private address inside the instance | VPC internal IP | Generally fixed at creation and does not change on reboot |

Exact behavior depends on your cloud provider's official documentation, and rules differ between providers and billing models. For any service that needs an allowlist, bind an elastic IP instead of relying on the fact that it hasn't changed yet.

## What is the difference between a static IP and a dynamic IP?

| | Dynamic IP | Static IP |
|---|---|---|
| How it is assigned | Assigned temporarily on each connection | Assigned to you long term, unaffected by disconnects |
| Common sources | Home broadband, mobile data, a cloud ephemeral public IP | Business leased lines, some business broadband, a cloud elastic IP |
| Dedicated or shared | Home broadband may be dedicated or shared behind CGNAT | Usually dedicated |
| Good for | Everyday browsing, development and debugging | Serving traffic to the outside, being allowlisted by others |
| How to get one | The default | Request separately from the carrier or cloud provider; terms and fees are set by them |

Also, a static IP and a "residential IP vs. datacenter IP" are two separate dimensions. Whether an address is recognized as residential depends on the ASN it belongs to and its registration data; see [Datacenter IP vs. residential IP: what is the difference?](/en/blog/datacenter-ip-vs-residential-ip)

## How do I measure how often my IP changes?

The most reliable method is to log it yourself. Here are three steps, from manual to automated.

### Step 1: Check your current egress

Open cdnping's [IP and environment check](/en/ip) and note your egress IP, ASN, IP type (datacenter, residential, mobile), and whether IPv4 and IPv6 are both present. If the egress IP differs from your router's WAN address, you are behind NAT, and what you record later is a shared egress. To find out which carrier an address belongs to, see [How to find which ISP an IP belongs to](/en/blog/find-ip-isp-carrier).

### Step 2: Check dial-up and lease info on your router

Most home routers show the following on their "Internet settings" or "WAN status" page:

- The current WAN IP.
- How long the current connection has been up (PPPoE uptime).
- The remaining lease time, if the connection uses DHCP.

You can also check the DHCP lease your own computer received:

```bash
# Windows: look at "Lease Obtained" and "Lease Expires"
ipconfig /all

# macOS: DHCP info for en0 (lease_time is in seconds and may be shown in hex)
ipconfig getpacket en0

# Linux (NetworkManager)
nmcli -f DHCP4 device show
```

Note that what you see here is mostly a LAN lease, useful for judging whether your LAN address is stable. For the public egress, you still need the step 3 log.

### Step 3: Log your egress IP on a schedule

On a machine that stays on (a Raspberry Pi, a NAS, a Linux box at home), put a script that checks the egress every 5 minutes and writes to a log only when it changes:

```bash
#!/usr/bin/env bash
# File: ~/ip-watch.sh
LOG="$HOME/ip-change.log"
STATE="$HOME/.last_ip"

# Replace with a service you trust that returns a plain-text IP; -4 forces IPv4
IP=$(curl -4 -s --max-time 10 https://ifconfig.me) || exit 0
[ -z "$IP" ] && exit 0

LAST=$(cat "$STATE" 2>/dev/null)
if [ "$IP" != "$LAST" ]; then
  echo "$(date '+%F %T %z') ${LAST:-none} -> $IP" >> "$LOG"
  echo "$IP" > "$STATE"
fi
```

```bash
chmod +x ~/ip-watch.sh
crontab -e
# Add this line:
*/5 * * * * $HOME/ip-watch.sh
```

To watch IPv6 as well, copy the script, change `-4` to `-6`, and use a different set of file names. After one to two weeks, each line in the log is one change. Look at whether the intervals are regular, whether they cluster at a certain time (such as the early morning), and whether they line up with the times you restarted equipment or lost power.

A few tips for reading the log:

- Very regular intervals most likely mean the carrier cuts sessions periodically or leases expire.
- If it changes only after you restart equipment, a redial is the trigger.
- If addresses keep swapping within the same subnet, they usually come from one regional address pool.
- Failed lookups are skipped by the script, so they are not recorded as changes.

## What breaks when your IP changes? A checklist for developers

| Scenario | Impact | Suggested fix |
|---|---|---|
| Server SSH only allows your home IP | You are locked out after the IP changes | Switch to key authentication plus a jump host or bastion; or widen access to the egress of a trusted VPN |
| Database or admin console allowlisted by IP | Access is suddenly denied | Send requests from a fixed egress (a cloud elastic IP) instead of connecting directly from home broadband |
| A third-party API key is bound to a source IP | Calls are rejected, commonly with 401 or 403 | Bind the server's elastic IP; for local development, use a separate test key that is not IP-bound |
| A service at home is reached by raw IP | The address goes stale and outsiders cannot connect | Use DDNS to point a domain at the new address automatically; first confirm you actually have a public IP |
| Sessions or risk controls judge by IP | You may be asked to verify again | This is normal platform security policy; complete the verification as prompted |
| Logs count users by IP | One person is counted as several, or several as one | Count by account or device identifier and use IP only as a supplement |

Don't treat a dynamic IP as proof of identity. Where authentication is needed, use accounts, keys, or certificates; where you must restrict by IP, narrow the egress down to a fixed address you control.

## What can DDNS solve, and what can't it?

DDNS (dynamic DNS) is simple: a router or a small program detects that your public IP changed and automatically updates the domain's A or AAAA record. It is good for letting outsiders reach a service at your home by domain name.

It cannot solve two kinds of problems:

- Behind CGNAT, the address is not yours alone and outsiders cannot initiate connections to you, so pointing DDNS at it is useless.
- When the other side allowlists by IP, DDNS only changes your domain, and their allowlist does not update with it.

Before hosting a service at home, also check whether your broadband agreement allows it and whether it complies with local regulations.

## Log first, then decide whether you need a static IP

If you just browse and write code, it hardly matters how your IP changes. If you have hit a broken allowlist, an SSH connection you can't make, or an API returning 403, run the logging script above for a week to learn what triggers the changes. Then decide whether to change your authentication method, set up DDNS, or request a static IP. To see everything your current egress exposes, read [What does your IP address actually reveal?](/en/blog/what-your-ip-address-reveals), or test the connection latency from your current network to common AI APIs on the [cdnping home page](/en) to have a baseline before and after you change your connection.
