Installation Instructions for Mikrotik Devices
Download the Mikrotik .bin and the .elf file from downloads.arednmesh.org location:
- elf : this is the image to boot the mikrotik device with. It only uses RAM on the device (which is lost with a power cycle and still boots with Mikrotik OS)
- .bin : once the device is booted with the .elf image and running, you copy this up to /tmp and type a command that will update the flash with AREDN, so it then boots AREDN on a power cycle.
The procedure is very different and it is the opposite of a ubiquity installation. Opposite in that with Ubiquiti, the device is a tftp server and you run a tftp client on your laptop to send up the image. With Mikrotik, the device is a tftp client and you have to configure and run a tftp server (also dhcp and bootp server) on your linux or windows machine. This is all done by a program called dnsmasq (it has all 3 servers).
Linux procedure:
- Create a directory on your laptop /tftp and copy down the mikrotik .elf image
- Rename this image to rb.elf
- Set your laptop to static IP address 192.168.100.10
- Become root to execute the dnsmasq command in step 5
- Figure out what your network card interface name is with an 'ifconfig' ('ipconfig' on windows.) this is the interface you set to 192.168.100.10. replace the name of the interface in the following command from "eno1" to what ever yours is. replace your typical log in name in the command from 'joe' to whaterver you log with:
Command Line Example:
dnsmasq -i eno1 --dhcp-range=192.168.1.100,192.168.1.200 --dhcp-boot=rb.elf --enable-tftp --tftp-root=/tftp/ -d -u joe -p0 -K --log-dhcp --bootp-dynamic - Connect the Mikrotik device with your laptop ideally through a dump switch. Although, you may be able to connect them direct
- Push the reset button on the mikroti, then power it on. Hold the button until you see output log information from the laptop window where you ran the dnsmasq command, around 20 seconds. Let up the button as they start communicating. When you see the "sent" message, this is success and the mikrotick has downloaded the image and will reboot.
- After the image is sent, as show in the dnsmasq log, you need to <ctrl>C or kill dnsmasq.
- The node has booted AREDN, it looks like a firstboot, but no settings can be saved. Don't bother with the browser and trying to configure it. It is in a mode where you have to load the image to the devices' flash now.
- Change your laptop back to DHCP mode to obtain an address from the mesh node, after it boots. You should be able to "ping" it at 192.168.1.1. If this doesn't work, then something isn't right. Don't proceed until you can ping it.
- Now log into the device, "telnet 192.168.1.1" user = 'root' password = 'hsmm'.
- Copy up the .bin file. typically this is done, "scp -P 2222 <the .bin file name> root@192.168.1.1:/tmp/rb.bin
- Type the following command in the telnet window on the device: "sysupgrade -n /tmp/rb.bin" wait for it to reboot, now it has AREDN installed and you can go in and set it up. Be sure to renew your IP address after it reboots.
This is one of the most detailed presentations I've seen. I do my MikroTik flashing with Ubuntu and I do Ubiquiti flashing on my MacBook's OSX, but after going through your presentation I could do it on Windows in a snap. Thank you.
On a side note I noticed your marketing abilities when I saw the "Emergency PrepAREDNess" title on the slide. We should all use that in our presentations.
-Damon K9CQB
I'm happy to note that I followed these instructions, and an AREDN installation went perfectly on brand new RB952Ui-5ac2nD (hAP AC Lite) - at least when I didn't miss a step in the procedure.
-Damon K9CQB
If you care as passionately about the use of AREDN mesh networking for emergency communications as they do, please feel free to use our slogan in your presentations.
I like this one the best.
Thanks for your detailed instructions! I've had issues getting the GUI method to take without a bad gateway error.
I had success using the PXE server approach described here https://www.arednmesh.org/sites/default/files/AREDN%20Mikrotik%20Installation%20Steps%20April%202019%20NB%20edit.pdf
And then using the last three steps of your instructions from my mac:
11. Now log into the device, "telnet 192.168.1.1" user = 'root' password = 'hsmm'.
12. Copy up the .bin file. typically this is done, "scp -P 2222 <the .bin file name> root@192.168.1.1:/tmp/rb.bin
13. Type the following command in the telnet window on the device: "sysupgrade -n /tmp/rb.bin" wait for it to reboot, now it has AREDN installed and you can go in and set it up. Be sure to renew your IP address after it reboots.
I had to install homebrew (http://osxdaily.com/2018/07/18/get-telnet-macos/)and telnet on my mac to get it to work, the added bonus was that I didn't have to keep setting the static ip and then going back to DNS when doing multiple devices.
This may help others who are getting timeouts or bad gateways even after succesfully loading the .elf file and unchecking the keep settings box.
Bad Gateway is an HTTP Status Code that can mean any of several things. Often it indicates a network communication glitch between your web browser and a web server. During AREDN firmware installs you can usually resolve a Bad Gateway issue by doing one of the following things:
AK4FA, thanks very much for your input. We've clarified the AREDN docs to include the case that you ran into. Really appreciate your efforts! THX
https://arednmesh.readthedocs.io/en/latest/arednGettingStarted/installing_firmware.html#troubleshooting-tips