зеркало из
https://github.com/iharh/notes.git
synced 2025-10-30 21:26:09 +02:00
41 строка
941 B
Plaintext
41 строка
941 B
Plaintext
https://www.freedesktop.org/software/systemd/man/latest/systemd-networkd.html
|
|
https://www.freedesktop.org/software/systemd/man/latest/networkctl.html
|
|
|
|
Articles:
|
|
https://habrahabr.ru/company/ruvds/blog/309010/
|
|
|
|
man systemd.network
|
|
systemctl enable/start systemd-networkd
|
|
|
|
|
|
/etc/systemd/network
|
|
*.network (units of network type)
|
|
|
|
Samples
|
|
[Match]
|
|
Name=en2sp...
|
|
#MACAddress, Driver, Type
|
|
|
|
[Network]
|
|
Description=Wired network
|
|
DHCP=yes
|
|
# static net settings:
|
|
Address=192.168.2.5/24
|
|
Gateway=192.168.2.42
|
|
DNS=192.168.2.42
|
|
|
|
#[Address]
|
|
#[Route]
|
|
|
|
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
|
|
/etc/systemd/system/systemd-networkd.service.d/
|
|
*.conf
|
|
|
|
[Service]
|
|
ExecStartPost=/bin/ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
ExecStopPost=/bin/rm -f /etc/resolv.conf
|
|
ExecStopPost=/usr/bin/touch /etc/resolv.conf
|
|
ExecStopPost=-/bin/cp -pf /etc/resolv/conf.bak /etc/resolv.conf
|
|
#- here just for ignoring any possible errors
|