Network address

Help

Should my allowed IP address in file settings/network status be the same as the router IP address ( not the internal ha address)

I set up ha with a network allocated address and then changed to a static address

My static IP address is not mentioned as an allowed address

I need to clarify before considering edits - Ive already given myself 3 days work by deleting an “old” authorisation token, and prefer to learn from my mistakes :scream:

If you are setting static IP addresses you have 2 options.

1 set the ip address in HA outside of your routers ip range, risky unless you understand the ip address allocation ranges. You risk getting a clash of IP address if setting one on your HA, which can make it difficult to access HA to fix it.
2 just set the router allocated ip address to be static on your router, this will just work.

HA >> settings >> system >> network > local network address should be an address that will be accessible by devices on your network.

Local Network address will be used by HA Voice devices to receive response audio file.

When setting static addresses it is best / easiest to set them on the router. Setting them on the device makes it a HUGE pain to change in the future and when changing routers devices become unavailable until router is properly set.

It is OK to set static IP on device but I suggest limiting this as much as possible. Imagine a day you decide to change addresses on your network or replace router and find yourself needing to login to 200+ devices to make individual change.

Been there. Done that. Lesson learned. Everything uses DHCP and only servers have reserved addresses in the router.

2 Likes

Exactly, the only address I have static that is not set in the DHCP server is the DHCP server on PiHole. All my other static addresses are set in the DHCP server. I have also learnt this the hard way. Nothing worse then trying to access a device with a clashing ip address because you set it on the device.

2 Likes

Yes, there is. Two ESP devices with the same MAC address from the factory. DHCP (reserved or not) would assign the same IP to whichever device last requested an IP.

Well, that’s double-edged sword. Imagine your router dies and you have to enter ALL ip reservations again in the new one… (been there…). And possibility that router will die (eventually) is greater than option that suddenly you’ll decide to change IP segment… (in fact, i don’t see any good reason why would anyone want to do that…)

That’s… risky if you mean DHCP without mac reservation. Many devices in HA are IP based and if IP changes devices loose HA connectivity. And IP’s in DHCP system change every time your router looses power (or even just reboots at fw upgrades).

Golden rule which many HA users learned hard way is " use only static IP’s" - one way (set static IP) or another (use DHCP but enter MAC reservations).

Sure, making regular router backups helps… but only if you manage to get same model if old one dies…

Me? I have /22 mask, so i use 0.x for static IP’s of all devices BUT HA ones, 1.x for DHCP server (phones, laptops, any standalone-nonHA devices…), 2.x for proxmox VM’s and LXC’s; and 3.x for all HA devices. Inside 3.x i have “virtual segments” for all locations on my property (like basement is 2 ÷49, 1st flor is 50÷99, 2nd floor is 100÷149 etc…). This way i have all neatly organized.

That really depends on what kind of router you are running.

Thats just it.

Most devices dont need a reserved IP. Actually I pretty much do all.
Opnsense, Unifi, PFsense and many others have backup function.

It not entering the IP that is the problem. It is login into individual devices to set the IP that is annoying. Nope. Router is always gonna take the cake here. (for me at least)

1 Like

…sure it will, until it won’t anymore and you’ll start to bang into the wall with your head :triumph:

I’ve had close over 50 mac reservations entered in my old router (years ago) when it decided to die. Of course new model which was better with totally different chipset (old one wasn’t available anymore) wasn’t prepared to accept old one’s backup, so… I’ve had to either:

  • enter all mac reservations again, or
  • change all my devices to static IP

i did second thing, and now no matter what my IP’s now stays the same. All my routers an AP’s are Asus, from simple RT-AC86 to more advanced RT-AX88Upro.

It is, but then again, it really isn’t, if you go this way from the start - then only when you buy a new thing you must login into device and set IP, but in this case you must login anyway, to make all necessary start settings, correct?
And, when any of your HA devices die and you replace it: you must either:

  • login into device and set static IP, or
  • login into router and change mac address to a new one
    So, same amount of work… :flushed:

This is why you should run a seperate DHCP server from your router. If your router then breaks it makes no difference. If your DHCP server breaks you just restore from your backup.

My advice use something like pihole or adblock for you DHCP. Easy to backup and restore.

But at the end of the day its whatever is easiest for you to manage I guess.

1 Like

Name one that can’t use mDNS.

Then you have a crappy router. The DHCP reservations table is stored in flash memory and should survive power interruptions.

I don’t use mdns. At all. Since all it brings is problems.

I’m not talking about DHCP reservations entered manually and stored in MAC-IP bind table, but about DHCP reservations which router randomly assigns by itself via it’s dhcp server - all those are NOT stored in flash and they are deleted with router reboot.

Again- crap router. I have dozens of ESPHome devices here. If the IP hasn’t been reassigned, I can plug in a device after months of being offline and DHCP assigns the same IP.

Ever since ditching my IPS-provided router, I have never had an issue with DHCP. I have over 100 IP clients on my network and the vast majority of them get their IP using DHCP. My reserved IP list is less than 10 clients.

How do you know you aren’t using mDNS? Does your Home Assistant discover new devices? Thank mDNS.

Yeah, i guess you must be right. 400€ router is total crap indeed… :rofl:
BTW… deleting all randomly assigned DHCP IP reservations with router reboot is a good thing, not bad → this way you delete dhcp reservation table. Cheap routers have this table pretty small, so they tend to fill it 100% and consequently refuse to accept new devices. If so, cheap solution is to reduce IP reservation time, expensive one is to replace router with better one.

I don’t use mDNS - me as a person, when i work with network devices i DON’T use mDNS (like homeassistant.local etc…). If HA does use it - good for him (ok, for me, too, i guess :smile: )…

Not a small table, just not enough flash memory to hold the DHCP reservations, Port forwards, Firewall rules and WAN settings for their typical residential customers.

DHCP reservations never expire. If your DHCP pool is filling up from dynamic assignments, you can release unused IP addresses by setting a smaller lease time.

True, but i guess this is more like “patching wounds” and it doesn’t help if you have tons of devices. I have… what… over 50 devices just for HA, plus all pc’s, phones, tablets, tv’s, radios….

True again, but there’s a limit in this table, too. My rt-ax88u pro has dhcp reservations limited to 64 entries, which wouldn’t be enough for all my devices. Thus static IP is a must for this reason alone.

Can’t you configure the size of the DHCP scope? Edit: nevermind I didn’t read the reservations part.

Nonsense. Where do you get this? The size of the pool is whatever you set it to. Mine is set to 192.168.1.2 to 192.168.1.250.

You did the same as me, misread reservations :slight_smile: He means he cannot reserve more than 64 entries, not that the pool is limited to 64 addresses.

1 Like