AREDN: Difference between revisions
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) |
||
Line 64: | Line 64: | ||
</pre> | </pre> | ||
==== Networking ==== | |||
Learn more about networking: https://en.wikibooks.org/wiki/QEMU/Networking and here https://wiki.qemu.org/Features/HelperNetworking | Learn more about networking: https://en.wikibooks.org/wiki/QEMU/Networking and here https://wiki.qemu.org/Features/HelperNetworking | ||
Line 71: | Line 72: | ||
sudo mkdir /etc/qemu | sudo mkdir /etc/qemu | ||
In Primary, setup a bridge br0, using command brctl, like: | |||
<nowiki>#</nowiki> ifconfig eth0 down | |||
<nowiki>#</nowiki> ifconfig eth0 0.0.0.0 | |||
<nowiki>#</nowiki> brctl addbr br0 | |||
<nowiki>#</nowiki> brctl addif br0 eth0 | |||
<nowiki>#</nowiki> ifconfig br0 192.168.0.33 netmask 255.255.255.0 | |||
<nowiki>#</nowiki> ifconfig eth0 up | |||
<nowiki>#</nowiki> echo "allow br0" > /etc/qemu/bridge.conf | |||
In Secondary, setup br0 like Primary side | |||
echo "allow br0" | sudo tee /etc/qemu/bridge.conf | echo "allow br0" | sudo tee /etc/qemu/bridge.conf |
Revision as of 05:33, 13 December 2024
"Amateur Radio Emergency Digital Network" or some such. They pronounce this "ARRR DIN" like a pirate. I want to call it "ARR-AH-DIN". Too bad for me.
Main page is at https://arednmesh.org/
The nearest neighbor for me is the Willamette Valley Mesh Network.
Building an Internet-only node
on a ProxMox Virtual Machine
I installed on Tern this because my travails on VirtualBox left me wondering what a supported install looked like.It was a hard fail because Proxmox would not work on this machine.
on a VirtualBox Virtual Machine
Officially they support ProxMox (don't have one), VMWare ($) and QEMU. Setting up to run in VirtualBox was easy enough, now I just have to sort the networking out.
2024-12-07
- Installed VirtualBox on Murre.
- Downloaded the x86 version from https://downloads.arednmesh.org/afs/www/ (look for "x86" in Model)
- Converted the img file to a vdi using VboxManage. Takes about a second with this command.
VBoxManage convertfromraw --format VDI aredn-3.24.10.0-x86-64-generic-ext4-combined.img aredn-3.24.10.0-x86-64-generic-ext4-combined.vdi Converting from raw image file="aredn-3.24.10.0-x86-64-generic-ext4-combined.img" to file="aredn-3.24.10.0-x86-64-generic-ext4-combined.vdi"... Creating dynamic image with size 126353408 bytes (121MB)...
- Create in a vbox machine (128MB RAM, 2 CPUs), remove the IDE controller, and add a second network adapter and set it to Bridged mode
- Launch the machine.
- It shows a hostname of NOCALL, it is possible to set a hostname using "W6GKD-astoria", like this, but this is the wrong thing. Instead run "/usr/local/bin/firstuse-setup W6GKD-astoria" and that will set the hostname and do other as-yet unspecified stuff. I chose the name based on their rules which say make the callsign all caps.
uci set system.@system[0].hostname='W6GKD-astoria' uci commit system /etc/init.d/system reload
- Reboot. This gets me some IP addresses in /etc/hosts. Funky ones.
- In the console, entered commands to set br-lan to DHCP and rebooted. That got me a usable IP address on my lan.
- Connected with password "hsmm" using ssh -p 2222 [email protected]
- Rebooted. Now there are services on port 80 and 8080 but not reachable (?).
Sorting out the networking
Documentation on the network interfaces is here. How to guides: Home Router
The crucial part I missed is that it sets up its WAN port as the place it will connect to your network. From its perspective this makes perfect sense. The AREDN network is the LAN and the outside world is the WAN. Well maybe that makes sense. I mean, my network is how it will reach the Internet. If I put a radio on one of its LAN ports, that's where the mesh network would be.
First network interface is now Host-only. I had top create an interface "VBoxManage hostonlyif create" because File->Preferences no longer has "Network" huh. STILL NO GO. Out of the (virtual!) box it supposedly has DHCP enabled on WAN. NOT ON the VM image!! I see only static entries in /etc/config/network.
on QEMU
Just keep on trying. I already installed QEMU on Murre but now installing QEMU on Bellman. (Debian) (I figured I might as well get ready to test Raspberry Pi images too (arm))
sudo apt install qemu-system-x86 qemu-system-arm qemu-system-common
Here on Bellman I will be doing everything from the command line. I am fed up with the mysteries of the AREDN package so I am first going to load a Debian image (qemu RAW format) (or a qemu QCOW2 format). Then openwrt. Finally, AREDN.
qemu-system-x86_64 --enable-kvm -m 1G -smp 2 -hda debian-12-nocloud-amd64.qcow2 -nographic \ -netdev user,id=debnet -device e1000,netdev=debnet
Screenless options are explored here: https://stackoverflow.com/questions/6710555/how-to-use-qemu-to-run-a-non-gui-os-on-the-terminal The option"-nographic" works fine for me, I can see console output in my shell terminal window and just type away just like being there.
Log in as "root" (no password). There you go. When done, type "poweroff". Only but now you need networking which is the whole point, really. By default I can see "ip a" looks like there is a 10.x.x.x net on ens3. It works out of the box with NAT, I can do this from the guest
apt update apt install ssh-client ssh [email protected] (base) bwilson@bellman:~$ who bwilson pts/0 2024-12-12 20:10 (192.168.123.99) bwilson pts/2 2024-12-12 20:25 (192.168.123.99) bwilson pts/3 2024-12-12 20:47 (192.168.123.2) <---------------- ta da
Networking
Learn more about networking: https://en.wikibooks.org/wiki/QEMU/Networking and here https://wiki.qemu.org/Features/HelperNetworking
Set up a TAP interface
sudo chmod u+s /usr/lib/qemu/qemu-bridge-helper
sudo mkdir /etc/qemu
In Primary, setup a bridge br0, using command brctl, like:
# ifconfig eth0 down # ifconfig eth0 0.0.0.0 # brctl addbr br0 # brctl addif br0 eth0 # ifconfig br0 192.168.0.33 netmask 255.255.255.0 # ifconfig eth0 up # echo "allow br0" > /etc/qemu/bridge.conf In Secondary, setup br0 like Primary side
echo "allow br0" | sudo tee /etc/qemu/bridge.conf
Build your own
Source code is in github https://github.com/aredn/aredn
I installed docker on Murre for this.
Resources
Go to https://arednmesh.org/ for information on the big project; if you accidentally go to https://aredn.org/ you will see a long manifesto about trademarks, whew. Glad I missed all that.