Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:networkd

Dies ist eine alte Version des Dokuments!


systemd-networkd

Voraussetzung: Falls NetworkManager läuft, Interfaces aus der Konfiguration herausnehmen:

/etc/NetworkManager/NetworkManager.conf
[main]
no-auto-default=enp0s31f6

Datei(en) anlegen

  • *.netdev = Gerätdefinitonen, z.B bridges und bonding
  • *.link = Link Layer, z.B. Namen, MAC und MTU
  • *.network = Netzwerk (L3)

automatisch (DHCP)

/etc/systemd/network/ethauto.network
[Match]
Name=enp0s31f6
 
[Network]
DHCP=ipv4
 
# nur optional zum Spass ;-)
[DHCP]
RouteMetric=100

statisch

/etc/systemd/network/ethstatic.network
[Match]
Name=enp0s31f6
 
[Network]
Address=192.168.1.242/24
Gateway=192.168.1.5
LinkLocalAddressing=no
ConfigureWithoutCarrier=yes

hybrid

/etc/systemd/network/ethybrid.network
[Match]
Name=enp0s31f6
 
[Network]
DHCP=ipv4
Address=10.12.9.42/24

Distributionsspezifische Netzwerkkonfiguration ausschalten:

Debian:

systemctl disable --now networking.service

systemd-networkd einschalten

systemctl enable --now systemd-networkd.service

Übersicht:

networkctl
admin_grundlagen/networkd.1694759629.txt.gz · Zuletzt geändert: 2023/09/15 06:33 von ingo_wichmann