diff options
author | Simon Spöhel <simon@spoehel.ch> | 2022-04-28 11:03:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-04-30 21:56:23 +0000 |
commit | 69f9b337fae39610870e90f8e09c5a682344c5ee (patch) | |
tree | dddda6af8822dbc50c0c0fe85bb0b79d4a25f60f /share | |
parent | Releasing version 20220428. (diff) | |
download | compute-tools-69f9b337fae39610870e90f8e09c5a682344c5ee.tar.xz compute-tools-69f9b337fae39610870e90f8e09c5a682344c5ee.zip |
Updating documentation for systemd-networkd.
Signed-off-by: Simon Spöhel <simon@spoehel.ch>
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share')
-rw-r--r-- | share/doc/host-setup.txt | 170 |
1 files changed, 77 insertions, 93 deletions
diff --git a/share/doc/host-setup.txt b/share/doc/host-setup.txt index 9a9ec94..b6da7f0 100644 --- a/share/doc/host-setup.txt +++ b/share/doc/host-setup.txt @@ -5,7 +5,7 @@ compute-tools: Host Setup 1. Debian Packages ------------------- -apt install bridge-utils ifenslave vlan +apt install systemd-networkd 2. Boot Parameters @@ -45,126 +45,110 @@ parameter (see #881813 for more information): 3.1.1 Bridge: 1 Interface, standalone, DHCP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -cat > /etc/network/interfaces << EOF -# /etc/network/interfaces - -source /etc/network/interfaces.d/* - -auto lo -iface lo inet loopback +cat > /etc/systemd/network/bridge0.netdev << EOF +[NetDev] +Name=bridge0 +Kind=bridge +EOF -iface eno1 inet manual +cat > /etc/systemd/network/bridge0.network << EOF +[Match] +Name=bridge-0 -auto bridge0 -iface bridge0 inet dhcp - bridge_ports eno1 - bridge_fd 0 - bridge_maxwait 0 - bridge_stp 0 +[Network] +DHCP=yes EOF 3.1.2 Bridge: 1 Interface, standalone, static ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -cat > /etc/network/interfaces << EOF -# /etc/network/interfaces - -source /etc/network/interfaces.d/* - -auto lo -iface lo inet loopback - -iface eno1 inet manual - -auto bridge0 -iface bridge0 inet static - address 10.0.0.2 - gateway 10.0.0.1 - netmask 24 - - pre-up ip link set eno1 down - pre-up ip link set eno1 up - - bridge_ports eno1 - bridge_fd 0 - bridge_maxwait 0 - bridge_stp 0 +cat > /etc/systemd/network/bridge0.netdev << EOF +[NetDev] +Name=bridge0 +Kind=bridge EOF +cat > /etc/systemd/network/bridge0.network << EOF +[Match] +Name=bridge-0 -3.1.3 Bridge: 2 logical Interfaces, subnet, static -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -cat > /etc/network/interfaces << EOF -# /etc/network/interfaces - -source /etc/network/interfaces.d/* - -auto lo -iface lo inet loopback +[Network] +Address=10.0.0.2/24 +Gateway=10.0.0.1 +EOF -allow-hotplug eno1 -iface eno1 inet dhcp -auto bridge0 -iface bridge0 inet static - address 10.0.0.1 - netmask 24 +3.1.3 Bridge: 3 physical Interfaces, vlan, bonding, static +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - pre-up ip link add name bridge0 type bridge - post-down ip link delete bridge0 type bridge +cat > /etc/systemd/network/eno2.network<< EOF +[Match] +Name=eno2 - bridge_fd 0 - bridge_maxwait 0 - bridge_stp 0 +[Network] +Bond=bond0 EOF +cat > /etc/systemd/network/eno3.network<< EOF +[Match] +Name=eno3 -3.1.4 Bridge: 3 physical Interfaces, vlan, bonding, static -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -cat > /etc/network/interfaces << EOF -# /etc/network/interfaces - -source /etc/network/interfaces.d/* +[Network] +Bond=bond0 +EOF -auto lo -iface lo inet loopback +cat > /etc/systemd/network/bond0.netdev << EOF +[NetDev] +Name=bond0 +Kind=bond + +[Bond] +Mode=802.3ad +TransmitHashPolicy=layer3+4 +MIIMonitorSec=0.1 +UpDelaySec=0.2 +DownDelaySec=0.2 +EOF -allow-hotplug eno1 -iface eno1 inet dhcp +cat > /etc/systemd/network/bond0.network << EOF +[Match] +Name=bond0 -iface eno2 inet manual +[Network] +VLAN=100 +EOF -iface eno3 inet manual +cat > /etc/systemd/network/vlan-100.netdev << EOF +[NetDev] +Name=vlan-100 +Kind=vlan -auto bond0 -iface bond0 inet manual - up ip link set bond0 up - down ip link set bond0 down +[VLAN] +Id=100 +EOF - slaves eno2 eno3 +cat > /etc/systemd/network/vlan-100.netdev << EOF +[Match] +Name=vlan-100 - bond-mode 4 - bond-miimon 100 - bond-downdelay 200 - bond-updelay 200 - bond-lacp-rate 1 - bond-xmit-hash-policy layer2+3 +[Network] +Bridge=bridge-100 +EOF -iface bond0.100 inet manual - vlan-raw-device bond0 +cat > /etc/systemd/network/bridge-100.netdev << EOF +[NetDev] +Name=bridge-100 +Kind=bridge +EOF -auto bridge-100 -iface bridge-100 inet static - address 10.100.0.2 - netmask 24 +cat > /etc/systemd/network/bridge-100.network << EOF +[Match] +Name=bridge-100 - bridge_ports bond0.100 - bridge_fd 0 - bridge_maxwait 0 - bridge_stp 0 +[Network] +Address=10.100.0.2/24 +Gateway=10.100.0.1 EOF |