From c931e04f7ecf18645d114144e5663e633cfd1a78 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 10 Aug 2025 15:58:49 +0200 Subject: fw: sim: srv: Add this folder This folder contains material to set up a network environment for the native sim firmware. --- fw/sim/srv/README.md | 17 +++++++++++++++++ fw/sim/srv/zeth.netdev | 7 +++++++ fw/sim/srv/zeth.network | 13 +++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 fw/sim/srv/README.md create mode 100644 fw/sim/srv/zeth.netdev create mode 100644 fw/sim/srv/zeth.network diff --git a/fw/sim/srv/README.md b/fw/sim/srv/README.md new file mode 100644 index 0000000..455800f --- /dev/null +++ b/fw/sim/srv/README.md @@ -0,0 +1,17 @@ +# Network setup for native sim firmware + +This folder contains documentation to provide a network setup suitable to run +the native sim build of the firmware. + +It assumes a Linux host, an executable file with the native sim firmware, +`systemd-networkd` as network configuration solution and `ufw` as firewall. + +For network configuration the `zeth.netdev` and `zeth.network` files from this +folder have to be used with `systemd-networkd`. + +The following is required to open the firewall for the firmware on the `zeth` +virtual network interface created by `systemd-networkd`: + +``` +ufw allow in on zeth to any port 1883 proto tcp +``` diff --git a/fw/sim/srv/zeth.netdev b/fw/sim/srv/zeth.netdev new file mode 100644 index 0000000..e8de39d --- /dev/null +++ b/fw/sim/srv/zeth.netdev @@ -0,0 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public License, +# v. 2.0. If a copy of the MPL was not distributed with this file, You can +# obtain one at https://mozilla.org/MPL/2.0/. + +[NetDev] +Name=zeth +Kind=tap diff --git a/fw/sim/srv/zeth.network b/fw/sim/srv/zeth.network new file mode 100644 index 0000000..7bf386a --- /dev/null +++ b/fw/sim/srv/zeth.network @@ -0,0 +1,13 @@ +# This Source Code Form is subject to the terms of the Mozilla Public License, +# v. 2.0. If a copy of the MPL was not distributed with this file, You can +# obtain one at https://mozilla.org/MPL/2.0/. + +[Match] +Name=zeth + +[Network] +IPv6SendRA=yes +Address=2001:db8::36/64 + +[IPv6Prefix] +Prefix=2001:db8::/64 -- cgit v1.2.3-70-g09d2