Manually change subnet mask

Ok, I was messing around with some of the settings and I accidentally changed the subnet mask to /32. Obviously, I can no longer access home assistant. How can I change this manually without going into HA? Hassio running on Virtualbox on a Windows machine.

I figured this out, it’s working again.

Would you mind explaining how, in case it could help others in future?

Of course!
I use a static internal IP of 192.168.2.2 and my subnet was incorrectly set to 32 (192.168.2.2/32).
I went into the Command Line Interface and typed “Network Info” to get my Network Interface, which was enps03.
Then, per the help info (“network update help”), I typed: “network update enps03 --ipv4-address 192.168.2.2/24” and got a message that said “Command Completed Successfully”

restarted and success!

3 Likes

This is stil an issue in 2024 ( at least on rasp pi )… I honestly have no idea why HA is not fixing this…

just to explain what “this” is :

  1. A User goes to HA admin Network settings and selects manual IP on them.
  2. A User writes an IP address to define the static IP to be used e.g 192.168.1.70 and fills in the other fields as well with valid values.
  3. After the config application, HA gets assigned a /32 subnet network and has no connectivity because it thinks that it is on a 1 computer network… That is what HA decides, not the user - thus it is a Bug. Meanwhile the rasp pi will show up in the router device list normally, making it even more confusing for the user.
  4. User has to use the HA terminal to modify the ip address to set it on a /24 subnet ( 255.255.255.0 ) themselves before HA can now be accessible again.

I have seen people complain about this all the time on multiple forum posts here - they dont understand that this is the issue but they have problems with manual IP set up, and the answer is always "Why do you use a manual IP ? just revert to auto and go to your router settings to configure DHCP to always assign a specific IP to the rasp pi Mac Address "…

That is a very problematic behaviour because it perpetuates the root cause instead of looking to fix the bug.

There’s a WTH post open you can vote for here: WTH is the default netmask 255.255.255.255?

2 Likes

Thanks !

Voted, and commented on that one :pray:

1 Like