I’m going to be replacing the internet modem in a few hours and would like to know what should be done to minimize the impact on home servers that are set up with static IP addresses to connect to cloudflare and similar services.
An all-in-one modem, or just the modem?
Take note of what they are and maybe the new one will let you set them manually.
If it’s just the the modem, shouldn’t have to worry about it.
I’m far from an expert here, I may be misunderstanding/misremembering something.
I’m pretty sure its an all in one as it was sent by the ISP.
If your modem is an all-in-one, then it is doing the duty of both a modem and a router.
Once your modem is down then immediately all devices are going to lose their connection to the internet, but I assume you are aware of this.
Once your router goes down, then all of the devices with static IP addresses will remain accessible to each other within the same subnets. For example a device at 192.168.1.10 can communicate with a device at 192.168.1.20. A device at 192.168.1.10 will NOT be able to communicate with a device at 192.168.2.20 though because there will be no router to route those packets between subnets. NAT also won’t work, but that doesn’t really matter since your modem will also definitely be down since it is the same device.
Personally, if I was in your situation I would just shut all these servers down while you switch out the hardware. If your new modem/router is working correctly and is setup exactly the same way as your prior one was, you should be able to just power on the servers and everything will “just work” again. This will likely be less of a headache and effort overall.
EDIT: Just realized that you might not have everything hooked up to a switch. If not, then nothing will be able to communicate with each other. Are all of your servers connected to this modem/router device?
As someone who works for an ISP your IP is definitely not static, and there are a plethora of reasons it might get changed on you.
As mentioned by others, if you replace your all-in-one modem, which includes your router, then the IP will definitely change. Your IP is given out via DHCP in the vast majority of cases (even if it actually IS static) and that IP is attached to the MAC address of your router. If you use a separate modem and router, then you can change your modem at will without impacting the IP you’ve been assigned, but changing the router will change the IP, unless your router supports changing the MAC address, and you change it to the MAC of the old one.
An ISP can do upgrades to equipment on their end that requires moving you to a different end device, which will have a separate set of IPs attached to it, which you might see as your modem getting knocked offline for a while one evening, then coming back up with a different IP.
Your ISP might also move other people off the device you’re connected to on their end, and as IPv4 addresses are in short supply, they might find there’s more addresses allocated to your end device than is necessary and decide to reclaim a block of them to use elsewhere, at which point they’ll mark that chunk of IPs to not be renewed when the leases expired, so the next time routers refresh DHCP, they’ll be told to use a different one, which you’ll see as your external IPv4 address spontaneously changing without any sort of warning at all.
There’s nothing you can do about either of these scenarios other than pay extra for an actual static IP which generally aren’t cheap (as I said, IPv4 is in short supply and to give a customer a true static IP it requires 4 IPv4 addresses total, one for you, one for the gateway, the network address, and the broadcast, where a dynamic IP address can share gateway/network/broadcast with hundreds to thousands of customers) plus you’d likely have to pay even more for a business account.
TL;DR https://www.noip.com/
Specifically for cloudflare:
I was really surprised they still existed, amazing!
Also:
- https://www.duckdns.org/
- https://freedns.afraid.org/
- Learn about Dynamic DNS - Google Domains Help
- GitHub - matt1/gandi-ddns: Simple script to update DNS A record of your domain dynamically using gandi.net's API
… or …
if you just want you and/or your family members to access your own stuff securely: MagicDNS · Tailscale
All of my servers are connected to the modem/router device. I believe that there are network switches in the house but the switches are used to allow for the ethernet ports on other floors.
Okay, if I set up the a cloudflare DNS that should help? I wasn’t sure because I used cloudflare tunnels.
Static IP on the WAN side? It all depends on your ISP, you won’t do anything here if they are using dynamic allocation for clients.
For example, my ISP uses dynamic allocation to clients, and sometimes the IP will change and sometimes it stays the same. But when replacing the entire modem / router there is a good chance that the IP might change.
Static IP on LAN side? Set yourself dhcp and use IP + MAC to control which machine has which IP or set each device manually.
I personally control each device on the LAN via dhcp and static IP with reservation per MAC. Which causes every device itself to receive the settings from dhcp but they are always the same for every device.
so for switching the modems while maybe I should look into a network switch long term if I have written out what the IP+MAC addresses are for the servers things should be fine if I set them manually?
I only have 2 servers a QNAP NAS and a Home Assistant running on a Raspberry Pi 4B. So manually setting devices shouldn’t be a problem.
Are we talking about local addressing like 192.168?
Or public addresses?
Does your ISP give you one IP address or several public ones?
Got NAT?
If you want to always have the same local addresses for devices in the LAN then you have two options.
- Set manually IP per machine.
- Set up with dhcp, just instead of using random IP you set a specific IP for a specific MAC and thus get a static IP with dhcp.
Since you have a small number of devices, you can set the addresses manually.
Update, maybe it’s because of setting the IP to static for the previous modem and it’s within the same company but the Home Assistant was recognized and kept it’s IP address. Though the same didn’t happen for the NAS but by switching from Dynamic to reserved I was able to set it to the IP address it previously had. Though it doesn’t seem to have moved to that though it does have the same MAC address as it did prior to switching modems at least.
I think I’ll see if rebooting the NAS fixes it to have it be connected reserved to the old IP address
There’s almost no way you’ve set a static WAN IP that you chose and had it randomly working for years unless you’ve had DUMB good luck, like you just so happened to pick an IP from a scope the ISP had on their termination device, that just so happened to never get handed out by DHCP, and you and that scope never got moved. There’s something either you or we aren’t understanding about your situation.
It IS possible to have the same dynamic IP for years from an ISP, since most ISPs use extremely long DHCP lease times to reduce load on the DHCP servers (DHCP at a level required by an ISP is surprisingly problematic, though upgrading to solid state storage was a game changer), so as long as your internet isn’t out for more than a week or so, you can keep the same IP indefinitely, if equipment on both ends stays the same. But you can’t just pick what you want, unless you were exceptionally, statistically impossibly lucky, you’ll eventually trigger an IP collision and we definitely monitor for those, there’s a report, which gets triggered surprisingly infrequently honestly. I guess a lot of people use leased modem/router combos, which won’t let you change the IP, and anyone with a separate modem and router with enough knowledge to think about setting a static also knows why that would be a bad idea.
I had an ISP once where I could set DHCP option 50 (RFC) “Address request” in the DHCP discover message, and the ISP would honor it if the IP wasn’t already allocated. ISC dhclient can set it in dhclient.conf . I requested an easy-to-remember IP and used it for several years
- Access the Control Panel. In the Windows search bar, type in “ncpa. …
- Select the Network Adapter. …
- Select Properties. …
- Select Internet Protocol Version 4 (TCP/IPv4) …
- Manually enter IP address and subnet mask. …
- Save Settings. …
- Revert Back to DHCP. …
- Glossary.
Great that you have managed to solved the problem.
I am going to lock this topic for now.
If you wish it to be reopened let me know.