-
Notifications
You must be signed in to change notification settings - Fork 1
Static IP configuration
dcasota edited this page Jan 7, 2022
·
4 revisions
cat > /etc/systemd/network/10-static-en.network << "EOF1"
[Match]
Name=eth0
[Network]
DHCP=no
Address= <your IP>
/24
Gateway=<your Gateway IP>
DNS=<your DNS IP>
EOF1
cat > /etc/systemd/network/99-dhcp-en.network << "EOF2"
[Match]
Name=e*
[Network]
DHCP=no
EOF2
chmod 644 /etc/systemd/network/10-static-en.network
chmod 644 /etc/systemd/network/99-dhcp-en.network
rm /etc/systemd/network/99-dhcp-en.network
systemctl restart systemd-networkd
networkctl status