Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:networkd

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
admin_grundlagen:networkd [2021/12/09 15:03]
sh angelegt
admin_grundlagen:networkd [2023/09/23 10:41] (aktuell)
ingo_wichmann
Zeile 1: Zeile 1:
 ====== systemd-networkd ====== ====== systemd-networkd ======
  
-Voraussetzung:​ Falls NetworkManager,​ Interfaces aus der +Voraussetzung:​ Falls [[network-manager|NetworkManager]] läuft, Interfaces aus der 
-Autokonfiguration ​herausnehmen+Konfiguration ​herausnehmen:
 <file txt /​etc/​NetworkManager/​NetworkManager.conf>​ <file txt /​etc/​NetworkManager/​NetworkManager.conf>​
-[main+[device
-no-auto-default=enp0s31f6+match-device=interface-name:​enp0s31f6 
 +managed=0
 </​file>​ </​file>​
  
 Datei(en) anlegen Datei(en) anlegen
-.netdev = Gerätdefinitonen,​ z.B bridges und bonding+  * ''​*.netdev'' ​= Gerätdefinitonen,​ z.B bridges und bonding 
 +  * ''​*.link''​ = Link Layer, z.B. Namen, MAC und MTU 
 +  * ''​*.network''​ = Netzwerk (L3)
  
-.link Link Layer, z.B. Namen, MAC und MTU +=== automatisch ​(DHCP) ===
- +
-.network ​Netzwerk ​(L3) +
- +
-=== automatische DHCP ===+
 <file txt /​etc/​systemd/​network/​ethauto.network>​ <file txt /​etc/​systemd/​network/​ethauto.network>​
 [Match] [Match]
Zeile 36: Zeile 35:
 Address=192.168.1.242/​24 Address=192.168.1.242/​24
 Gateway=192.168.1.5 Gateway=192.168.1.5
 +LinkLocalAddressing=no
 +ConfigureWithoutCarrier=yes
  
 </​file>​ </​file>​
Zeile 49: Zeile 50:
  
 </​file>​ </​file>​
 +
 +Distributionsspezifische Netzwerkkonfiguration ausschalten:​
 +
 +Debian:
 +  systemctl disable --now networking.service
 +
 +systemd-networkd einschalten
 +  systemctl enable --now systemd-networkd.service
 +
 +Übersicht:
 +  networkctl
 +
 +====== VLAN ======
 +<file txt 10-enp1s0f1.network>​
 +
 +[Match]
 +Name=enp1s0f1
 +
 +[Network]
 +Address=172.16.240.238/​24
 +LinkLocalAddressing=no
 +ConfigureWithoutCarrier=yes
 +VLAN=enp1s0f1.6
 +VLAN=enp1s0f1.11
 +
 +[Link]
 +ActivationPolicy=On
 +</​file>​
 +
 +<file txt 20-enp1s0f1.6.netdev>​
 +
 +[NetDev]
 +Name=enp1s0f1.6
 +Kind=vlan
 +
 +[VLAN]
 +Id=6
 +</​file>​
 +
 +<file txt 22-enp1s0f1.11.netdev>​
 +
 +[NetDev]
 +Name=enp1s0f1.11
 +Kind=vlan
 +
 +[VLAN]
 +Id=11
 +</​file>​
 +
 +<file txt 30-enp1s0f1.6.network>​
 +
 +[Match]
 +Name=enp1s0f1.6
 +
 +[Network]
 +LinkLocalAddressing=no
 +ConfigureWithoutCarrier=yes
 +
 +[Address]
 +Address=192.168.6.238/​24
 +</​file>​
 +
 +<file txt 32-enp1s0f1.11.network>​
 +
 +[Match]
 +Name=enp1s0f1.11
 +
 +[Network]
 +LinkLocalAddressing=no
 +ConfigureWithoutCarrier=yes
 +
 +[Address]
 +Address=192.168.11.238/​24
 +</​file>​
 +
admin_grundlagen/networkd.1639062183.txt.gz · Zuletzt geändert: 2021/12/09 15:03 von sh