Is it really impossible to configure a static IP AFTER a Hass.io build?

Updating the system-connections/resin-eth0 file has no effect for either configuring a static IP or making DNS changes once Hasio has been built. My AT&T Pace router makes things even more difficult since it doesn’t provide any way to map a MAC address to a specific IP, nor even change DNS. The router can recognize a static IP request and properly reserve an IP for it, but forcing it to use a specific IP when the client is configured for DHCP (as it is now) doesn’t seem to be possible.

I can mount the Hassio SD-card to a Linux PC to access all the Resin-OS partitions, but the layout isn’t quite like a normal Linux dist. If it is possible to update /etc/hosts or resolv.conf in Resin-OS manually, I haven’t figured out how without screwing up the links.

So far, it seems my only options are to rebuild Hassio again from scratch or replace my router and all it’s intricate rules - both extreme measures I sure hope I can avoid.

Thanks for confirming if is (or isn’t) possible to change network settings in Resin-OS once Hassio is up and running!

I don’t know the type of router you have, but if I google Pace, it might be possible on some of their routers. See https://www.dslreports.com/r0/download/2267100~5694a5d84811c1255c4f12556de77ead/5268AC%20Manual.pdf on page 20/21.

You can mount the SD, then edit the resin-sample file in system-connections folder

As @Romkabouter has mentioned, you’re looking for the resin-sample file. Just add your connection info, then save the file. Still named resin-sample.

Resin OS network setup

@HeffeD & @Romkabouter,

As I first stated, updating system-connections/resin-eth0 (or resin-sample), has no effect once Hassio is already built. Should it?

@breinonline,

I have the AT&T firmware-modified version of the Pace 5268AC, and yes, the docs do say it is possible to configure a static IP for a DHCP client. But it doesn’t work, the best I can tell. Every time I configure it for a “private Fixed IP”, it immediately reverts to “private from (DHCP) pool” after a save and keeps the same IP no matter if the router and Hassio is rebooted.

I hope to learn if it is even possible to change network settings after Hassio is built or not. I really don’t want to steer this to a router support issue, which is just a work-around IMO.

Works for me. I’ve changed things after the fact several times. I’m using a Windows system to mount and edit, though. Maybe it’s different with Linux? It almost sounds like it isn’t saving your changes to the file. If you re-open the file, does it contain your edits?

@HeffD - thanks for confirming that it is working for you! That at least tells me I have something wrong locally with my config that is preventing it from recognizing changes to the network config.

I’m editing the file via Windows too - I was just mounting the card to Linux out of desperation to see if I could hack the IP and DNS manually that way.

When I first built the system, I had implemented two network files in system_connections: resin-ethernet and resin-wifi, replacing resin-sample. They each had a [connection] id by the same name as the file (not id=resin-sample).

I’ve gone back and tried to implement the static IP’s in the original files, and in grasping at straws, repeated this using the original “resin-sample” file instead.

Maybe something is confused internally by me changing the file name or the connection ID back and forth?

1 Like

Changing those has nothing to do with hass io, it’s a resin thing :slight_smile:
Should indeed work, I have done it several times as well.

Maybe share your file contents?

First of all, thanks much for all the input. So it is indeed possible to configure network settings (IP, DNS, etc) after Hassio is built.

I have just found that my static IP changes did actually take effect, but all normal/obvious indications were that it didn’t.

My router shows two Hassio hosts (ethernet and wireless) are using the DHCP addresses. If I run “ifconfig” on hassio via SSH, it shows that eth0 & wlan0 are also DHCP addresses.

But here is the very weird thing… I can connect to Hassio via SSH using the static IP’s as well! So my lil Raspbery Pi3 has 4 IP addresses assigned. 2 for ethernet, and 2 for wifi, but the static IP’s are sure not apparent to either ifconfig or the router. I have no idea how this could be.

ip addr also shows two IP addresses for eth0. the first is global dynamic eth0 and the 2nd (static) is global secondary eth0 .

SOLVED!
ResinOS will copy whatever you have in system-connections folder to an internal ext4 partition (resin-state) which maintains a separate copy of system-connections. This folder still had old copies of resin-sample, and resin-wifi despite these having been removed from the resin-boot partition.

This is apparently what was causing me to continue to get a DHCP address as the primary IP. I mounted the resin-boot partition on a Linux PC and manually deleted these files.

4 Likes

Very interesting! Thanks for posting your findings.

Thanks again to all that provided assistance!

FYI, the “duplicate” folder in the resin-state partition is:
root-overlay/etc/NetworkManager/system-connections

I think it would be preferable if Resin-OS would remove network config files from this system folder if they were removed from the resin-boot folder to be consistent and avoid this sort of confusion.

I found the solution to my issue from a posting by a resin.os team member (@imrehg) who explained how to disable wifi after it has initially been set up.

1 Like

I wanted to thank you for posting this because I just ran into this issue today and was able to find this in a search. Thank you very much!

Where is it?

3 posts above, I listed the location.

BTW - new from-scratch Raspberry PI HASSIO builds for the past several months no longer use ResinOS, so none of this is relevant if you have a newer build based on HassOS.

We must have different versions of Hass.io because mine has no such directory.
No /etc/NetworkManager
I do have an /etc/network directory, but no system-connections.

The command:
hassio hassos info
Gives this result:
“operating_system”: “Resin OS 2.3.0+rev1”,
“deployment”: null,
“kernel”: “4.4.50”

What’s confusing is that I thought I was running an image of HassOS, so why does info say Resin?

You are only going to see this directory if you are able to access your SDCard from a PC that can mount Linux partitions - and if the build is based on ResinOS. (You can’t access it from the Hassio docker).

A few weeks ago I purchased a new RaspiB+ and installed Hassio from scratch. It properly shows HassOS installed:
“operating_system”: “HassOS 1.13”,
“deployment”: “production”,
“kernel”: “4.14.81-v7”

So yeah, we do have different versions of Hass.io! I can’t answer why yours shows ResinOS if you think it isn’t.

Use Fixed IP address