i'm new to systemd, very used to ubuntu\debian RC system scripts so i'm a bit confused. the basic idea was to setup static ip for my raspberry pi ncluding dns etc... naturally editing /etc/networking/interface does nothing as systemd-networkd is doing network configuration now. But checking out /lib/systemd/network/ reveals:
pi@gal-pi:~ $ ls -l /lib/systemd/network/ total 12 -rw-r--r-- 1 root root 368 Jan 24 12:02 80-container-host0.network -rw-r--r-- 1 root root 378 Jan 24 12:02 80-container-ve.network -rw-r--r-- 1 root root 73 Jan 24 12:02 99-default.link
I have two interfaces on my pi eth0 which is connected and i want to set with static ipv4 and wlan0. wlan0 doesn't get anything really and didn't bother to even try t set him up, eth0 however get's dhcp address. Non of the scripts above seem to setup dhcp.
pi@gal-pi:~ $ ls -l /etc/systemd/system/dhcpc* lrwxrwxrwx 1 root root 34 Mar 18 08:15 /etc/systemd/system/dhcpcd5 -> /lib/systemd/system/dhcpcd.service
So there is a systemd dhcp service that is started on boot.bringing me to my questions:
- should i setup dhcps service using dhcpcd.conf to setup static address on eth0 ?
- should i use /etc/lib/systemd/network/40-eth0-static.network to setup the static address ?
- how do i know who runs first dhcpd or networkd ? so they wont override each other ? i know systemd can be distributed in that it can run in parallel several services...
- any other method i should use to setup static ip properly ?
- if i'm at it do i need to use the same systemd-networkd scripts to setup wireless lan ? and if it's a hotspot (using hotap)