From 32d0303b6107f0feb29425512df46d3d71e02ebb Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 1 Dec 2021 12:15:16 +0200 Subject: [PATCH] adhoc --- .../modules/ROOT/pages/index-setup.adoc | 94 ++++++++++++------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/network-adhoc/modules/ROOT/pages/index-setup.adoc b/network-adhoc/modules/ROOT/pages/index-setup.adoc index b3020c2..e8bb4ce 100644 --- a/network-adhoc/modules/ROOT/pages/index-setup.adoc +++ b/network-adhoc/modules/ROOT/pages/index-setup.adoc @@ -3,38 +3,17 @@ == Intro -[.float-group] --- -[.right] -image::ROOT:swarm-poc.png[float=right] - -:hardbreaks: - -{empty} + -{empty} - -:!hardbreaks: - -.From -> To - -* [*] monolithic -> networking architecture -* [*] static -> Dynamic -* [*] host based -> Service based -* [*] linear -> agile --- - -TIP: You will learn to code, coordinate and orchestrate a swarm of self-acting nodes. +networkd is a small and lean service to configure network interfaces, designed mostly for server use cases in a world with hotplugged and virtualized networking. Its configuration is similar in spirit and abstraction level to ifupdown, but you don't need any extra packages to configure bridges, bonds, vlan etc. It is not very suitable for managing WLANs yet; NetworkManager is still much more appropriate for such Desktop use cases. == Install systemd-networkd +=== deinstall classic networking and install it! -.systemd-networkd +* *sudo su* # if not already done + +.deinstall [source,sh] ---- - -# deinstall classic networking - -#sudo -Es # if not already done systemctl daemon-reload systemctl disable --now ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog apt --autoremove purge -f ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog @@ -48,8 +27,13 @@ apt install -f libnss-resolve ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf apt-mark hold avahi-daemon dhcpcd dhcpcd5 ifupdown isc-dhcp-client isc-dhcp-common libnss-mdns openresolv raspberrypi-net-mods rsyslog systemctl enable systemd-networkd.service systemd-resolved.service -#exit +---- +=== setup wired connection + +.wired connection +[source,sh] +---- cat > /etc/systemd/network/04-wired.network < +Gateway=192.168.1.1 // <2> +DNS=8.8.8.8 1.1.1.1 // <3> MulticastDNS=yes EOF +---- +<1> use your settings +<2> use your settings +<2> use your settings + + +=== Reboot -echo "reboot" +NOTE: reboot + +== Config + + +=== NSS + +.config nss +[source,sh] +---- +apt --autoremove purge avahi-daemon +apt-mark hold avahi-daemon +apt install -f libnss-resolve + +echo "" +echo "For troubleshooting you may have a look at /etc/nsswitch.conf. It should contain a line like this:" +echo "" +echo "hosts: files resolve [!UNAVAIL=return] dns" +echo "" +echo "" +echo "" +echo "" ---- +=== DNS +.config dns +[source,sh] +---- + +echo "" +echo "Configure DNS stub listener interface" +echo "" + +echo "Here we have to symlink /etc/resolv.conf to the stub listener:" +echo "" +echo " exec4you ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf" +ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf +echo "" + +echo "Check name resolution" +resolvectl status +---- +