Fixed IP address for each device?

Guys
Have any of you fixed the IP address of each of your devices so that if you reboot your router , the devices have the same IP address ?

Yes. Everything gets a fixed IP. Even devices that don’t require an IP in HA’s configuration. According to my DHCP server currently I’m at 68 static devices.

There’s a minor overhead in administration, setting up static addresses in the router and/or device plus I keep a spreadsheet with IP, name and MAC address.

But it saves a lot of time fault finding when I know which IP address to ping or search for in my router stats/logs.

1 Like

Thanks Tom

So basically I must fix the IP address in my router so that it does not change if I have power outage etc. Basically the router will not automatically fix the IP ? I would have to do it.

Yes most devices use DHCP (dynamic host configuration protocol) by default. This means they could get a new IP address from the router every time they or the router restarts.

You can fix the address in some devices that support it but is better to do it all in one place (the router). That way you are less likely to create duplicates.

And you don’t have to do it for everything. Only the devices that require an IP address to be supplied in the home assistant component configuration.

For example the iPhone app will happily work using a dynamically assigned address.

1 Like

You star Tom, thanks . I was frustrated last night trying to see what my IP address of two of my Sonoff’s
For some reason my router ( ASUS ) takes a longtime to list the name of the device , just see the MAC address , frustrating. Also for some reason since I updated the ASUS firmware , the fixed ( LAN ) devices show up under the wireless tab and the wireless devices fall under the other tab. Anyway , I fix the ip address so I can keep record.
Thanks

If your model router is supported you could put Asuswrt-Merlin firmware on your router.

Much better than the stock firmware and it gets security and bug fixes much more regularly.

1 Like

There are routers that can assign fixed IP addresses to devices using DHCP. All AVM Fritzbox routers have that feature.

Do they just set an infinite lease time and store the MAC association in flash in case of power loss?

For the Fritzbox the description can be found here:

AVM help

my netgear d7000 dsl/router (has a bunch of bugs - avoid) - stores the mac address-> ip mapping in nvram, and so, yes applies it on power cycle/reboot.

everything gets offered via DHCP, with a default 4 hour lease time, but gets same address each time.

Still risky to rely on it if you run out of leases. Much better to add a reservation.

they are reserved - just they are allocated via DHCP. I’ve no changed the lease time on DHCP, as I couldn’t be bothered. But I guess I could stick it to days rather than hours.

Or have I misunderstood?

I’m using 192.168.1.x - if I get to 254 devices, I will need to restructure my network anyway.

Just a word of warning re. the number of fixed IP addresses.

I used to have a Netgear router and the number of fixed IP addresses I could assign was limited to maybe 30ish.

Found out the hard way when I started assigning the addresses to my devices and ran out of ‘space’ with another 6 critical ones to go.

Basically forced me into using the DCHP functionality of my (Synology) NAS before I got myself a Ubiquiti Edge Router (now at 75+, including a number of Amazon Dash buttons and haven’t seen an issue yet).

Oh, and in between, I had a right mess on my hands with some devices having addresses assigned by the Netgear router and other setting it up in the devices itself.

Might be time well spent to check the manual or the forums if your router has a limit before you start.

yup - older routers are likely to have limitations. my D7000 (other issues aside) is ok - but if it comes to it I will move DHCP to my NUC (which runs HASS)

A big thanks to guys for your advice. Need to double check that my router Asus .