Browse Source

adhoc

master
zeus 3 years ago
parent
commit
32d0303b61
  1. 94
      network-adhoc/modules/ROOT/pages/index-setup.adoc

94
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 <<EOF
[Match]
Name=e*
@ -68,20 +52,66 @@ DHCP=ipv4
#MulticastDNS=yes
# Option: using static ip address and multicast DNS
# (example, use your settings)
Address=192.168.1.18/24
Gateway=192.168.1.1
DNS=8.8.8.8 1.1.1.1
Address=192.168.1.18/24 // <1>
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
----

Loading…
Cancel
Save