-
Notifications
You must be signed in to change notification settings - Fork 168
static ip address #159
Comments
check /etc/network/interfaces.d for your interface(s) |
Currently we do not have dhcpcd installed by default so creating |
i already find a way, you can check device-init#6 |
We have switched to cloud-init. With cloud-init there is another hacky way to write the information into #cloud-config
# vim: syntax=yaml
#
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
hostname: static
manage_etc_hosts: true
# don't write debian.org into apt mirrors
apt_preserve_sources_list: true
# You could modify this for your own user information
users:
- name: pirate
gecos: "Hypriot Pirate"
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
groups: users,docker,video
plain_text_passwd: hypriot
lock_passwd: false
ssh_pwauth: true
chpasswd: { expire: false }
package_upgrade: false
# Static IP address
write_files:
- content: |
persistent
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# static IP configuration:
interface eth0
static ip_address=192.168.1.31/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8
path: /etc/dhcpcd.conf |
not working for me :( |
same, not working with v1.10.0 |
not working for me either |
Does not work with 1.12.3 either. I note there are other so-called static IP "hacks" for Hypriot but you can ignore them. They work in as far you end up with a static IP, but they involve disabling cloud init and so stop /etc/resolv.conf automatically being updated with nameservers from your gateway configuration. So, you end up with a RPi that cannot connect to the net and cannot pull docker images. The explanation above does update /etc/dhcpcd.conf for sure but the IP address for your RPi will still be DHCP driven since Hypriot appears not to use /etc/dhcpcd.conf >insert shrugging shoulder emoji<. The saga continues as there is something systemically wrong as the flash tool is not able to touch up all things that need be touched to get the static IP running and leaving /etc/resolv.conf to be automatically updated by whatever DHCP client is being shutdown by the static IP "hacks". |
how to fix ip address, on raspbian jessy i normally edit /etc/dhcpcd.conf file,
but in hypriot os this file doesn't exist and even if i create it and edit i, the change in it does not take effect even after reboot, how we can fix and change fixed ip address on hypriotos, sorry for the bothering and thanks for this great work,
Salam,
Peace
The text was updated successfully, but these errors were encountered: