Nodes
Nodes define devices that are eligible to join a drasyl network.
Conceptβ
A drasyl node represents a physical or virtual device within a single network. A device may join multiple drasyl networks simultaneously.
Nodes are the fundamental building blocks of a drasyl network, similar to hosts in traditional IP networks, but operate within drasyl's secure overlay. Each node entry specifies which device may join the network, how it is addressed, and how it is grouped.
Make sure to not only define the node in the configuration file, but also distribute the configuration to the device using one of the available distribution methods.
Node Attributesβ
Each node entry includes the following fields:
pk
β
The cryptographic public key that uniquely identifies the device allowed to join the network.
You can retrieve it from the drasyl UI or via the drasyl status
command.
hostname
β
A hostname that can be used instead of the IP address to address the node.
It must be valid according to RFC 1123 and unique within the network.
Nodes can be reached using either the hostname or the fully qualified domain name (FQDN) <hostname>.drasyl.network
.
If a device is part of multiple drasyl networks with the same hostname, the name resolution order behavior is undefined.
In such cases, use the IP address to avoid ambiguity.
ip
β
The static IPv4 address assigned to the node within the network's subnet.
The address must:
- Belong to the defined network subnet.
- Not be the subnet base address.
- Not be the broadcast address.
- Not be a reserved address (see Reserved IPs).
groups
(optional)β
A node may belong to one or more groups. Groups are used in policies to control which nodes may communicate, and in routes to define access to external networks. Group names are free-form strings.
Every node is implicitly part of the group ALL
.
Example Node Configurationβ
Here is an example of a node entry in a TOML configuration file:
[[node]]
pk = "689a1b9f5efcb861ac67ce185ddb2396444326e12fe1df353731416f5a3a2706"
hostname = "john-desktop"
ip = "10.96.41.1"
groups = ["john", "desktops", "windows"]