DuckDNS and IP address change

Is there a way know and hence be alerted when your external IP address changes?
I am running Hass.io with DuckDNS and LetsEncrypt.

Background (and yes, I know this is not the place to be asking for network help but if any network gurus can see something obvious I would of course be VERY grateful!).

My HA RPi is connected via a switch to my router. Also connected to the same switch is another old router configured as a wireless access point

Every few days everything connected to the switch drops of the network. Turning the old router on and off fixes the problem which leads me to believe that the problem is with that router although I don’t understand how that could affect devices connected to the same switch.

My first thought is whether this happening when my IP changes but I don’t know how to be alerted to that.

Use the the DNS IP sensor to pull your IP.

Set up a quick automation to notify you when there is a change.

If you need an example I can pull one out of my files, I used to use it before I set up duckdns.

Thanks. That looks perfect. I should be able to work something out now but if I can’t I know where to come! :wink:

Turn off DHCP on the old router. Plug into a LAN port and make sure it’s on the same subnet as your normal network. It sounds like you are flooding the network which will do exactly what you have described.

Make sure you are not using the old router as a router, and pretending it’s just an access point. Also make sure you have NO cables looped back into the switch. It sounds an awful lot like you are causing a broadcast storm somehow.

2 Likes

Thanks. DHCP is definitely off on the old router (he says, knowing full well that will be the first thing he will check!) but I will definitely look into those other ideas.

Thanks again.

(Maybe I should just invest in a decent new router with decent coverage and try to do away with the AP altogether. And going way outside what this forum is for… does anyone care to recommend a router?)

Look at a REAL router and a REAL AP.

I always prefer the Ubiquiti stuff. USG + UAP-LR will probably be a great setup for you.

2 Likes

Double plus one for Ubiquiti stuff. It’s freakin’ amazeballs. I have a UAP-AC-PRO inside the house and a UAP-AC-M in the backyard (concrete block walls are murder on a 5G signal!) and I couldn’t be happier. While they do work better as part of the whole UniFi ecosystem, with a controller node running full time and the UniFi gateway and switch(es), the APs can run just fine on their own. Configure them via an Android app and they just plain work. Best $172 you’ll ever spend. I went absolutely bonkers and got a rackmount router and switch to match…totally overkill, but if they ever pull gig fiber into my neighborhood I’m totally covered.

As to your network issue…hard to nail it down without running a packet sniffer, but my first guess would be something with the old router. A loop causing a storm or just plain glitches would be my first guess as well, followed by some sort of issue (hacked? just plain dying?) with the old repurposed router.

Thanks to you both.
I’m planning to look into it today. Intuitively I am sure it is the old router so that will be the first port of call. I have another old one I can swap it with for the time being.

I am using the AP as a switch also by utilising it’s 3 remaining Ethernet ports. I have a small spare switch so I will also put that between the AP and the other main switch and stop using the AP ports.

If that description make sense to you(!) does it sound like using the AP also as a switch might be a possible source of problems?

So this sensor is useless if i use duckdns?

Only you can answer that question. I can’t tell you if there is use for a sensor in your setup.

I thought I’d just give an update for those who kindly responded.

It looks like the problem was a sonoff that had two SSIDs configured, one for the main WiFi and one for AP. I think it was located at just the wrong place in that it couldn’t decide which one to connect to. I put an extension antennae I had lying around on the AP and it connects solidly to that now and all my network problems seem to have disappeared. I am guessing maybe it was flip flopping between the two in such a way as to cause some kind of problem? (Maybe that broadcast storm that @flamingm0e and @Dan_Bowkley referred to?).