Static IP in HAOS refuses to come up

I can install Home assistant just fine, but it always wants to grab an address of its own via dhcp on my network. I have tried several times to switch to static but every time the system does not properly get an ip. I’ve tried manually in the web client several times, i’ve tried to use my firewall to issue a static upon boot, and i’ve tried manually on the CLI interface. I can never get it to return to normal dhcp mode even. Its as if there’s a second issue in the background i can’t see that’s causing an issue. Reinstall always fixes it but then i am back on a floating ip. In general on my network, i issue statics for network services. I don’t want to try to make hostnames the definer.

For what it’s worth, i’m very familiar with typical network issues, but haos seems to do things differently. Been using linux for 30 years so i’m not really a newb but for home assistant.

You’ve described in vague terms what you’ve tried.

What were missing to be any help… What is actually going on… In detail. Wiith logs.

Its not supposed to be that hard. Set it done. And it sound like you have the infra to setup a reserved ip in dhcp. (my preference)

It soundd like something wierd happened along the way and you’re chasing whatever broke. (the can’t find where this went sideways - path)

So two options. Fight it and try to find out what blew up or… If you’re new to HA and still setting up network. I’d blow it away and start over with a reserved ip. See if that works as expected. If so it’s then go into the network panel and change it to static of your choice (and make sure it’s either reserved or outside your dhcp pool). Take it back there maknsure it works then let’s go through the procedure you’re using step by step with logs… Did this this is what happened. And who has what ip address and subnet now.

And honestly a reserved ip in dhcp is as good as a static. I’d stop there. This is mine… Has bee for over three years.

If that works and just flipping to static breaks you will need a network trace to figure it out.

I’m new to HA, not new to linux. It’s running in a VM in proxmox installed using the TTeck script. I can blow away the VM and start over and it will work fine, as long as the dhcp address isn’t specified. The install script even lets you specify mac address before hand, which i can set to give a specific address BEFORE the install even happens. If the firewall, which is handing out dhcp addresses, which is opnsense by the way, is given a specific address for the HA install, HA will fail to grab that address. Simply no network at all. This process works fine on the dozens of other hosts on my network. If i let HA alone without touching network, it grabs a dhcp address like any other client. i can then use the web interface and try to change to static. no network after a reboot. i can try to assign the HA mac address a specific IP in opnsense/firewall and it again does not come up after a reboot. I’ve never seen this type of behavior on any other network device.

I do not know where the logs are in HA. I would not be able to cut/paste the text in the terminal window anyway. This system seems very different from other programs i’ve used in past. there’s an OS under the hood, and the cli is separate? using a cli i’m not familiar with.

Here’s the screenshot of the terminal window right after i set the dhcp static assignment in opnsense.

All i did was set the ip in opnsense to 10.0.0.15. On install it’s 10.0.0.141/24

What do you mean by this picture / log

Script? How about leaving that part out of the install. If it’s done wrong Itncouls definitely impact your network stack.

On what addresses.

Based on your description. The script is where you differ from me. I just install bare and configure because backup contains everything

Are you setting the mac in the proxmox settings? If not the vm will be a different address.

1 Like

I am not setting the mac during install. It changes every time i install in the new vm. opnsense knows what the mac is the first time it grabs an address.

I can also blow away the static mapping in opnsense and HA network does not come back. I’ve verified that 3X now. I was able to play around on the cli and manually set to dhcp in HA but this change does not work reliably either. There seems to be some additional change in the configuration that is borking the install.

There will be no bare metal install. I have no desire for an additional bare metal server running. There’s already a stack of them in the rack.
I’m still looking for logs.

In proxmox go to your vm settings hardware network and the mac can be set there. If you are doing it anywhere else. It going to cause problems. Change it there to whatever your dchp likes.

1 Like

Better. I have over 100 clients on my network and only two of them have a static IP. My router and my MQTT server*. Everything is DHCP with reserved addresses in the router.

*My MQTT is on a separate Raspberry Pi2 because it precedes my Home Assistant by a couple of years and its IP is hard-coded in too many of my DIY devices to make changes efficiently.

1 Like

Why do i need to set the mac address anywhere? as i mentioned, i have a working install, i just change my firewall to assign a specific ip address and it borks the HA install permanently.

I finally found the logs home-assistant.log and it’s just about 10 lines complaining about network unreachable.

I think you’re on to what’s going on here. Mac keeps changing and the IP is addr is out of whack in Prox.

The only time mac changes is on a new install.

i can blow away the static assignment in opnsense, reboot HA and network doesn’t come back. THAT is the problem. I just don’t understand WHY it behaves that way. I change NOTHING in HA and it doesn’t survive the dhcp change. It WILL survive a reboot if the opnsense can assign the same IP it did during initial install, but ONLY if i have never tried to assign a static in opnsense.

Oh we get what the issue is. But it’s not that simple the minute you add prox network gets complex. I (and from the questions, others) think the issue is in your Proxmox network config but you haven’t shared any of it so?

Ha only uses the nic provided by the hardware… In this case prox. So it comes up dhcp and works with what was assigned to the nic in Proxmox. Then you change your config to give another addr…

…But Proxmox already has one for that nic. And if I remember correctly it filters traffic to/from the vm or lxc based on tthr network config of the vm. So when you change the IP on the haos side, it’s network stack is probably preventing any other traffic not from that ip outbound because it doesn’t match the accepted config at the prox side. (I had this problem with my dmz caddy box until I figured out how to setup a nic on the correct vlan in Proxmox. And it won’t pass ANY traffic from the VM out that’s not tagged for that ip on that vlan on that nic.

To solve I reconfigured that nic to be on the correct vlan and ip (I had to assign a mac to be able to lock it on my dhcp server - could also wait for the first logo and grab the nic that comes up… ) then make sure prox was configured correctly… Then the caddy box started working. I’m pretty sure it’s a variant of this but my Proxmox isn’t good enough to walk the network config on your prox host.

Are you assigning the ip opensense gave ha? Or a different one? Does opensense allow you to delete the ip lease as well as the static setting? I use pihole for my dhcp and if I try to change the ip in the static setting without deleting the lease it won’t work. So shutdown ha delete the lease and try again.

1 Like

The VM is set to bridge, vmbr0. I’m pretty familiar with that. Normally what i do is install a VM as dhcp if it’s more of an automated service, then change to static in the application later. This process did not work with HA, as expected. So there’s something more going on there. If the VM i’m installing is a basic debian install, i might install static as i’m building the VM or container. I would just leave it dhcp while i play around with it, but i bought a voice assistant PE to play around with and it just flat refuses to link to the HA install, and some chatter on the web said to set HA to static and then it was able to be linked. Don’t quite get that but nevertheless, i am now fighting this issue. HA being on a static IP is probably what i would want eventually anyway.

What would i need to provide from proxmox to help diagnose? In the VM as running, there’s not much to show.

I’m very familiar with these threads. They’re talking to people who don’t have very solid networks or don’t understand how DNS or dhcp actually work. Set static is a shotgun network guy answer that clears up a lot of problems. That’s all. If I don’t have time to troubleshoot what your net is doing and you’re flat. Set static call it done. What you’re really looking for is STABLE

Here’s the VM HA is installed on.

I’d set to static in HA, but as you know, it doesn’t work.

Arh,

I’ve tried both ways, assigning a static that matches the install IP as well as the one i want it to have eventually. I am also deleting the ip lease at each change attempt.

Sadly the install script i’m using does not allow me to assign the ip during install. i can however change the mac address.

I’d also gladly try manual assignment in cli if i can get the right commands. What the correct way to do this is seems to be hard to track down.

This may also be useful?

Then there’s this: trying to reset HA back to dhcp, it fails to take.