Using an OpenWRT router to provide multiple ports to an AREDN node that has a single network port

The Ubiquiti devices, with the exception of the AirRouter, have only have 1 network port. A switch with basic VLAN capability can be configured to have multiple ports and enable gateway (internet) access to your AREDN node. The AREDN node requires (on the port that it is connected to) traffic tagged as VLAN 1 for the Internet (WAN) and untagged for its own LAN network. And it wants DtD traffic to be tagged, on VLAN 2. Instead of using a NETGEAR 5-Port Gigabit Smart Managed Plus Switch for this, you could use an OpenWRT flashed WRT54G router, by configuring its switch. In the OpenWRT web user interface, set its LAN to be a DHCP client. The AREDN node will be the DHCP server. And go to the "switch" tab, and set things as below: (Be aware that the port numbers OpenWRT uses don't necessarily match the port numbers on the WRT54G router's case.) And be sure to have the router's CPU be on the untagged LAN VLAN, below that's the 0 VLAN (this is to allow you access to the router's web user interface in the future. The AREDN node will assign this router user interface web page its own LAN IP address).

In case you manage to lose access to the OpenWRT web page user interface (seems that setting the LAN to be a DHCP client sometimes sends the router off to La-La-Land), you can use Telnet and this procedure below (from Stack Overflow.com):

A user who lost contact with his router asks "I disabled the DHCP server on the LAN and enabled it as a DHCP client. I saved and applied the configuration to the router. Now after a restart I am not able to connect to the router webpage. How do I enable the DHCP server again or can anyone let me know how to reset this OpenWrt router to default settings? I tried in the serial port console. but I can't see any IP address for any interfaces. Before It was 192.168.1.1."

The procedure to recover your unresponsive partly bricked router:

  1. Set your PC's IP address: 192.168.1.2 and subnetmask 255.255.255.0 and gateway 192.168.1.1
  2. Power off the router
  3. Disconnect the WAN cable
  4. Only connect your PC Ethernet cable to ETH0 (one of the router's LAN ports)
  5. Power on the router
  6. Wait for the router to start the boot sequence (SYS LED starts blinking)
  7. When the SYS LED is blinking, hit the restart button (the SYS LED will be blinking at a faster rate means your router is in failsafe mode). (You have to hit the button before the router boots.) (on my WRT54G V2.2 the SYS (power) LED and the DMZ LED were then both blinking after doing the reset button)
  8. on your PC, run a telnet program and telnet to 192.168.1.1
  9. Run these commands:

    mount_root ## this remounts your partitions from read-only to read/write mode

    firstboot ## This will reset your router after reboot (my router said it already did a firstboot, but doing this command did no harm)

    reboot -f ## And force reboot

  10. Log in the web interface after the rebooting using a web browser at 192.168.1.1 and you should see the router restored back to its default mode.