-
Notifications
You must be signed in to change notification settings - Fork 167
Issue with setting up eth0 with static ip address #366
Comments
I reported same issue in #359 and I've still not found a solution. |
In the root of your SD card, there is a file called network-config
|
@p-hagen-Signalfx sorry, not a lot of help, people are using the flash installer and following the instructions to edit the yml file from a supplied example. So there is something broken with the config setup. |
Same for Hypriot-1.12.3 |
So @dennym and @rbartoli I updated the flash tool to 2.7.0 and same same. As per @dennym my /etc/dhcpcd.conf is set up to the static IP passed to the flash tool. But I get DHCP assigned IP and not the static IP?! However using the suggested solution by @dennym at seems to fix the static IP but I get the problem:
The file to create per the guidance suggested by @dennym was create and edit:
The "correct" file to create for Hypriot, it appears, might be the one cited in /etc/network/interfaces.d/50-cloud-init.cfg:
But, I found:
Still gives me:
So "fixes" for the problem for Hyprio 1.12.3 static IP breaks something else. |
As far as I can tell the lates version of Hyprio introduced a change on how network is set following the cloud-init best practice. in short at boot it reads the network-config that you can find in the root folder and applies it content to your system. You need to edit this before you boot the Pi for the firs time. Now, if you change the content with the above example he system will set a static ip address with the info for MY network, applied for eth0, and it allows me to use docker-compose up without any problems.
You must change it to match your own network configuration for it to work, but using network-config to set your systems network before boot seems the way forward you can find info on cloud-init and networking here https://lxd.readthedocs.io/en/stable-2.0/cloud-init/ |
Affirmative @p-Hagen-Signalfx. You are correct. The setup examples are out of date. Well done improving your explanation! |
@Bazmundi Perhaps this solution with flash helps you on the related issue |
I gave Hypriot-1.12.2 and run today and configured cloud-init config and everything got flashed and initialized correctly with your provided flash tool.
Unfortunately the static ip address for eth0 does and won't work. I tried the example from https://github.com/hypriot/flash/tree/master/sample/static.yml .
After the PIs are up and running I checked via ssh if the file exists and
/etc/dhcpcd.conf
exists with the mentioned content. Since it wasn't applied to the network I though about restarting the service withsudo service dhcpcd restart
but this service is masked and can't be actually used. As far I am aware if something is masked its unused and dead. Since the example are quite old I guess a lot of stuff changed since then. Is there another approach for this?best
The text was updated successfully, but these errors were encountered: