Changed order of files in systemd-networkd

The README is now in order, with a few readability
fixes. The renaming of files in systemd-networkd/ is
only for readability. I don't know if networkd
considers the order of files important.
This commit is contained in:
Pranav Jerry 2021-06-09 17:22:20 +05:30
parent a0a1db15e7
commit 7e8f9e8417
No known key found for this signature in database
GPG Key ID: F1DCDC4FED0A0C5B
9 changed files with 41 additions and 29 deletions

View File

@ -5,7 +5,7 @@ communicating with each other during an internet shutdown, using
existing software and tech as much as possible. Currently
you can only communicate with other peers running naxalnet or
using the same network as naxalnet. It uses
[B.A.T.M.A.N. Advanced](https://www.open-mesh.org/projects/batman-adv/wiki),
[B.A.T.M.A.N. Advanced][batman-adv],
an implementation of the B.A.T.M.A.N. routing protocol to
communicate with peers.
@ -26,20 +26,6 @@ advocating the constitutional rights).
-->
## How it works
The program naxalnet copies predefined systemd-networkd configuration
into networkd's runtime configuration directory. It uses iwctl to start
an ad-hoc network named "Hello World". The wireless interface is linked to
`bat0`, the batman interface. A bridge `bridge0` is created so that other
devices such as wired connections and wireless ap can be bridged. `bat0` is
added to the bridge, and the bridge gets an ip address (link-local, or
DHCP if any of the computers have a DHCP server configured). If these
were successful, an intranet is created. You can now use services
like [IPFS](https://ipfs.io), [Jami](https://jami.net),
[Secure Scuttlebutt](https://scuttlebutt.nz) and others which can work
without internet access.
## Requirements
- systemd v248 or more (for batman support)
@ -47,7 +33,7 @@ without internet access.
no error then you already have it)
- iwd (for starting ad-hoc network)
- python3
- [python-dasbus](https://github.com/rhinstaller/dasbus)
- [python-dasbus][]
- wifi adapter with ad-hoc support
- two or more computers with wifi adapter
@ -78,7 +64,7 @@ sudo systemctl start naxalnet.service
Starting the service will stop `NetworkManager.service` and
`wpa_supplicant.service` if it is running. If you start either of these
services after naxalnet is started, naxalnet will be stopped by systemd.
services after naxalnet is started, systemd will stop naxalnet.
To run naxalnet at boot, enable the service:
@ -87,6 +73,21 @@ sudo systemctl enable naxalnet.service
```
Now naxalnet will configure a batman interface on every boot.
Disable the service to stop running at boot:
```sh
sudo systemctl disable naxalnet.service
```
## How it works
The program naxalnet copies predefined systemd-networkd configuration
into networkd's runtime configuration directory. It uses iwd to start
an ad-hoc network named "HelloWorld". See the
[systemd-networkd](systemd-networkd) directory
to see how systemd-networkd configures the network. You can now use
services like [IPFS][], [Jami][], [Secure Scuttlebutt][ssb]
and others which can work without internet access.
## Uninstalling
@ -109,3 +110,9 @@ See [LICENSE](LICENSE) for the complete version of the
license.
This project is in alpha stage. Documentation is incomplete.
[batman-adv]: https://www.open-mesh.org/projects/batman-adv/wiki
[ipfs]: https://ipfs.io
[jami]: https://jami.net
[ssb]: https://scuttlebutt.nz
[python-dasbus]: https://github.com/rhinstaller/dasbus

View File

@ -1,4 +1,5 @@
# Create the BATMAN interface
# See 04-batman.network for configuration details
[NetDev]
Name=bat0
Description=BATMAN interface

View File

@ -1,5 +1,6 @@
# Create a bridge interface
# The batman interface be will later linked to this bridge
# The batman interface be will later linked to this bridge.
# See 07-bridge.network to see how this bridge is configured
[NetDev]
Name=bridge0
Description=Bridge

View File

@ -6,8 +6,8 @@ WLANInterfaceType=ad-hoc
[Network]
Description=ad-hoc network connecting to other nodes
BatmanAdvanced=bat0
# this interface should not have any ip addresses assigned
# ip will be given later to the bridge
# This interface should not have any IP addresses assigned.
# IP will be given later to the bridge
DHCP=no
DHCPServer=no
LinkLocalAddressing=no

View File

@ -5,8 +5,9 @@ Name=bat0
Description=The BATMAN interface
Bridge=bridge0
# like in 03, this interface also shouldn't have ip address
# the address will be assigned to the bridge
# like in 03-wireless-ad-hoc.network, this interface
# also shouldn't have IP address the address will
# be assigned to the bridge
DHCP=no
DHCPServer=no
LinkLocalAddressing=no

View File

@ -0,0 +1,7 @@
# This file bridges any ethernet device found
# to the bridge made in 02-bridge.netdev
[Match]
Name=en*
[Network]
Bridge=bridge0

View File

@ -1,4 +1,5 @@
# this is the interface userspace applications will be using to
# Ah! This is where the magic happens!
# This is the interface userspace applications will be using to
# communicate with others devices
[Match]
@ -12,6 +13,5 @@ DHCP=yes
LinkLocalAddressing=yes
# LLMNR and MulticastDNS are used for hostname discovery
# on
LLMNR=yes
MulticastDNS=yes

View File

@ -1,5 +0,0 @@
[Match]
Name=en*
[Network]
Bridge=bridge0