Plebian-Linux / quartz64-images

GitHub Actions Repository for automatically generated images for the Quartz64 family of single board computers
https://plebian.org
GNU General Public License v3.0
41 stars 10 forks source link

network -> Static IP #25

Closed nathmo closed 1 year ago

nathmo commented 1 year ago

I not sure about how to setup the static IP address. usually, it's under /etc/network/interfaces but the file only contain

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

and there is nothing under interfaces.d should I just add my config in /etc/network/interfaces or I missed somthing else ? my network config would be this :

auto end0
iface end0 inet static
 address 192.168.1.10
 netmask 255.255.255.0
 gateway 192.168.1.1

well it worked so it's all good

nathmo commented 1 year ago

i'm sorry to reopen but i have some DNS issues... I tried to edit /etc/resolv.conf and to add dns-nameservers 8.8.8.8 to /etc/network/interfaces but etc/resolv.conf keep being reset so i dont know how to fix it and i'm scared of breaking everything

nathmo commented 1 year ago

the fix was to unlink the simlink on /etc/resolv.conf and recreate it. sudo unlink /etc/resolv.conf sudo nano /etc/resolv.conf add this in the file :

nameserver 1.1.1.1
nameserver 8.8.8.8

sudo systemctl restart systemd-resolved

neggles commented 1 year ago

Highly recommend using either systemd-networkd, netplan, or NetworkManager to configure networking - /etc/network/interfaces has been deprecated for almost 10 years now and (as you've discovered) is not particularly intuitive.

the fix was to unlink the simlink on /etc/resolv.conf and recreate it.

Be careful with this - next time you reboot, systemd may overwrite that with the original symlink and you'll be back to square one...

nathmo commented 1 year ago

okay i think i get it. if anybody else read this : see #26