Change to static IP address

Hello All

I am installing a brand new HAOS 14.1 on proxmox 8.

I looked through the posts and i have not found a solution.

I am installing HSOS via a proxmox helper script. HA install correctly with a DHCP.

I want to change this to a static ip address, so i go to the network setting in HA and change the IP address i want and the net mask to 255.255.255.0 and click save (the mask shows 2556.255.255.255

I loose the ha connection. however it does not re connect.

I then go to my VM shell (after rebooting the VM)and see that the ip i selected has a net mask with /32

Now i can no longer access HA

i will deleted the VM and reinstall it.

What should i do differently?

Thank you in advance for your help

/32 and 255.255.255.255 mean the same thing, and /32 looks like the problem

The mask describes the whole network, not just the device, and probably needs to be
255.255.255.0 also known as /24

Change the IP to static on your DHCP server (probably on your router) it will save many issues like this.

Thatā€™s a known (and still not resolved) problem: HA obviously sets mask to 32 by default, which is a bug. As said, long known, long not resolved.
Your option is to change mask via command line. Connect a keyboard and lcd to your machine and change it (you can find command on internet, i donā€™t know it nowā€¦)
And, yes, static IPā€™s in HA are a must. On ALL devices, not just HA. Not doing so only leads to problems.

@Arh thank you for responding so quickly.

I re-installed the LXC and i still have the same issue, However it now gives me a network error 3 as a message.

I did set qa static ip line to my asus router (still need to try it)

once again thank you and happy holidays too all

Are you running in a VM or LXC?

thank you

oops its a vm

@Protoncek thank you for your response

can you be so kind to teach me how to do this at the command line>
In the HA vm shell?

thank you and happy Holidays to all

William, check this Common tasks - Operating System - Home Assistant
and
Search results for '"static ip"' - Home Assistant Community

I forgot a bitā€¦
i think itā€™s something like (in HAā€™s CLI console):

network update eth0 --ipv4-address 192.168.0.111/24

or something similarā€¦ IP is only example, enter your correct IP and mask (24 is 255.255.255.0).

I canā€™t remember how HAā€™s setup is, but some setup require the / value instead of the dotted value.
If that is the case with HA and you then still enters 255.255.255ā€¦0, the it might be interpreted as 32 instead.

Hello all

Many Thanks to all

I tried all this however once i click save and HA start ther reboot iā€™m locked out and the mask is set by the process to 32.

I am now deleting the vm in proxmox and re creating it

I will wait to change the ip to static when this issue is resolved

Thank you all

I dont know if that should be marked as the solutionā€¦

I agree with that.
Guess @wbravin wants to tell that his issue ā€˜is solvedā€™ by avoiding/reinstalling and heā€™s not in need of any help anymore.

Hi folks

I reinstalled HAOS 3 times since my last message.

It may be some inconsistencies with my network or my configuration.

I totally shutdown my dell 720 server, proxmox, routers and following each re-instal I was not p[ossible to change HA to static iP . every time i tried to change the IP from DHCP to static (eve keeping the dhcp ip the same) HA would not reboot and i was locked out and i needed to re-install HAOS.
As i said it may be my network (i doubt it because i can ping all the IP addresses).

I even tried to create the VM manually and then install HA from the download sit ā€¦ to no avail

Therefore the issue believe the issue is either HAOS 14.i software or the compatibility of HA and proxmox in their latest releases.

I marked this thread as solved to abandon the discussion because the is no other option to choose.

I just gave up trying to solve this until individuals much more savy than i am can point me to a trusted and secure solution.

Nevertheless I would like to thank you all for your contribution, time and help on this matter.

Individuals like you all are the reason why HA is growing so fast

Be all well and Happy holidays to all

well, if you installed HA inside proxmox then i have to tell that i just installed latest HA on latest proxmox yesterday, i also changed IP from DHCP to fixed (on both proxmox and HA) and it works perfectly. So, (sadly) this is not the culpritā€¦ Are you sure that you entered your mask correctly? Wrong mask can ā€œcut you outā€. (255.255.255.0 is /24)

1 Like

It will be advantageous to provide a screenshot of how you are trying to change the HAOS IPv4.

There are no issues with Proxmox and HAOS. Issues arise due to misconfiguration or a complex network/system topology/setup with little understanding of the long-term consequences of someoneā€™s actions.

@Protoncek

Thank you for pointing me to this issue. I am certain that wen I try to change the ip to static i changed the mask to 255.255.255.0 then i went to click the save button and HA is trying to reboot.

THe issue is that it get frozen at this point and will not reconnect.

I go to proxmox and i see then new ip address. if i enter this address in my browser:8123 i cet no connection message. Even if i enter homeassistant.local:8123 i get the same issue.
As mentioned I can ping the new address from my windows cmd.

as @os.habitats.tech suggests i will do a full backup once delete the current vm and reinstall HA again
Thank you all for your patience

Well, you can check if gateway and dns are correctly entered - this can also lead to no-connection. Btw - are you sure that your network has /24 mask? Also - there are networks who doesnā€™t have gateway address set to 192.168.x.1 (1 at the end), but to some strange numberā€¦ so check your computer for data - for PC command in CMD is ā€œipconfig /allā€ This should give you info about gw, mask and dns data.

@Protoncek

Hello thank you for these pointers. I saw that the dns added was my router as it should be.
In my router i also have 8.8.8.8 as a secondary DNS server.

In my home assistant install under networks I only had my router as DNS server.

I changed the ipv4 to static with a new IP address and changed the mask to 255.255.255.0

I added the google dns sever by selecting this option. HA added 8.8.8.8 and 4.4.4.4. this is where its get interesting:

as these servers where added the mask change automatically to 255.255.255.255.

I deleted the 4.4.4.4 address and changed the mask manually back to 255.255.255.0

I got an supervisor error (too quick to fully read) and then the connection was lost (and did not reboot)

I checked the address of my HA vm and it showed my new static IP address then i checked my router log and it too showed the correct address.

I entered this address in my browser and it worked youppie.

The issue as i see it, was the fact that when i added the new ip and changed the mask if i clicked save immediately the mask would change back to /32. Only after correcting the dns server was i able to correct the mask to /24.

Maybe i was too quick to save i do not know

Regardless it worked

Thank you all for your patience, understanding and help
May the new year bring to you all health, joy love and peace

1 Like