Updated – 9/19/2023 – N7UF – Modified step 11.
How to enable Device-to-Device on more ports then just port 5 of the hAP Mikrotik device flashed with AREDN firmware.
Why? I have multiple external antennas that are both connected to my hAP device. This device connects to my home LAN via wifi client and also provides a localized wifi network so I may connect to the mesh system with a laptop, tablet, or other device wirelessly.
This assumes you have already flashed the proper firmware and have configured your nodes – but the second antenna didn’t just work when you plugged it in to your hAP device on ports 1-4.
This device is specifically called out on the AREDN github page –
“The Mikrotik hAP AC Lite, Ubiquiti AirRouter, and AirRouter HP are pre-configured with the following VLANs:
- Port 1: WAN Port – Packets in/out of this port are expected to be untagged. The node is (by default) configured to receive a DHCP assigned address from a home network, internet, or other foreign network.
- Port 5: DtDLink Port Mesh Routing — Connect to another mesh node or 8021.q switch. Packets in/out of this port must be vlan 2 tagged, other packets are ignored.
- Ports 2-4: LAN devices — Packets in/out of this port are expected to be untagged. The mesh node will (default) DHCP assign an IP address to your computer, ipCam, voip phone, etc. connected to these ports.”
This explains that only the port labeled 5 will work automatically with a DtD connection. At the time of this writing, no GUI configuration is available to adjust the configuration to allow other ports on the device to act the same as port 5.
How to enable DtD ports
- Get a SSH application, I used PuTTY
- Connect your computer to your devices LAN port not intended to be used as a DtD port – or wifi.
- Open a new SSH session to your node on port 2222
- Accept the security keys
- Login with your root username and password
- Edit the file, I used vi: /etc/aredn_include/swconfig
- The port numbers in the configuration are reverse for this device specifically
- My intention was to enable DtD on LAN port 4 of my device
- REMOVE – 2 from the vlan 0 option ports
- ADD – 2t to the vlan 2 option ports
Reboot deviceIn the GUI click Save and Reboot. (Without this step the swconfig doesn’t seem to be applied)- Plug in second node to port 4 on your hAP device
- Validate through your mesh node that the DtD devices are now connected
A screenshot of the original file and modification are below:
Depending on your need, additional ports can be enabled by following the same procedure with different port identifiers. Remember, on this device port 1 in the configuration is labeled as port 5 on the device. The numbering is reversed!
Nick N7UF