Wireless Water Cooler

New Contributor

WiFi Dongle for Aruba Gateway/Switch

I recently had to set up a site using Aruba Central, the problem is when I got there the customer didn't have internet service yet and he couldn't wait for service.  


Lucky for me I carry lots of 'junk' in my bag and one of these pieces of junk was a Raspberry Pi 3B+ with a 3.5 LCD display and I knew I could convert this into a NAT device since it uses Linux OS..   So once i got this working 30min since I already had it acting as a WAP so I only needed to reverse the NAT and then finished the customers network and everyone was happy.  Once they get their official Internet circuit I only need to add it to the gateway and I'm finished.  Customer Happy....


Then I thought I would write it up for the community...

Start with the following hardware:

1) Raspberry Pi 3 Model B+ https://www.amazon.com/gp/product/B07P4LSDYV/
2) 32GB U1 microSDHC EVO https://www.amazon.com/gp/product/B06XWN9Q99/
3) 5V 2.5A Power Supply https://www.amazon.com/gp/product/B00MARDJZ4/
4) 3.5inch RPi LCD (B) 320x480 https://www.amazon.com/gp/product/B01N48NOXI/
5) Case for Raspberry Pi 3B+ https://www.amazon.com/gp/product/B07B5YG4LC/


If you have been playing with Pi's for a while you probably have 1-3 already and 4 and 5 won't break the budget and are optional anyway.  I could drop the display and case by using a Pi W with an microUSB/Ethernet dongle to save space.. An exercise left to the user.


I'll assume you already have a hot spot capable phone and already know the SSID and passwords to gain access to the internet.


##Step 0:
If you already have a running Pi just skip this section

Configure the Pi

In order to configure my Pi, I followed [this tutorial in Desertbot for headless setup using Windows](https://desertbot.io/blog/headless-pi-zero-w-wifi-setup-windows),
which can be summarized as:


This step will need to be done at a sight where you have WiFi and a PC already configured so you can perform these tasks.

  1. [Download the Raspbian image](https://www.raspberrypi.org/downloads/raspbian/) (Raspbian Lite is fine)
  2. Flash the image file in the SD card using [balena Etcher](https://www.balena.io/etcher)
  3. Reinsert the SD card in your computer, Windows will create a few drive letters and tell you that all are unformatted but one. In that one create an empty file named `ssh` (withot any extension), and a file named `wpa_supplicant.conf` with the details of your WiFi access point as follows: 




ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

ssid="<the name of your WiFi network>"
psk="<the password for your WiFi network>"





  • Insert the SD card in your Pi and let it boot. Wait till it boots the 2nd time (two or three minutes or so).
  • If you have dynamic DNS you should be able to find the IP number with nslookup raspberrypi.local, if not you'll need to scan for the IP using angryIP or simular scanner; then use ssh pi@IP#
  • If everything worked you have an IP number for the Pi and you should now be able to SSH to your Pi using `pi` as the user name and `raspberry` as the password. Hooray! In the future this device will have access to the internet So, CHANGE THE PASSWORD NOW




$ ssh pi@IP#
(use passwork rasberry when asked)
$ sudo passwd
(enter new password)
(repeat new password)





The next steps are to be done via the SSH prompt directly in the Pi. To edit files text you can use the `pico` editor by running `sudo pico {filename}`.


## Step 1: Setup Ethernet Port

Configure the DHCP client so that the Ethernet port of the Pi gets a fixed IP address and network mask.


Edit the `/etc/network/interfaces.d/eth0` file and add the following content to it: 




allow-hotplug eth0 
iface eth0 inet static 





## Step 2: Setup DHCP Services


Install the dhcp-server software so we can host DHCP Services




sudo apt-get install isc-dhcp-server





Configure type DHCP client options edit `/etc/dhcp/dhcpd.conf` file by adding the following: 




subnet netmask {
   option broadcast-address;
   option routers;
   default-lease-time 600;
   max-lease-time 7200;
   option domain-name-servers,;
   option domain-name "local-network";





Set the default interface for dhcp to eth0 edit `/etc/default/isc-dhcp-server` file and add the following line at end of file: 









Last is the assure eth0 is never the default route edit the `/etc/dhcpcd.conf` file and add the lines at the end of the file as follows: 




interface eth0





Start the DHCP server now and make sure the DHCP service starts after each reboot by running:




$ sudo service isc-dhcp-server start
$ sudo systemctl enable isc-dhcp-server





## Step 3: configure IP forwarding


Now we need to configure IP forwarding: we want all the network traffic coming from the Ethernet port to be forwarded to the WiFi network, and viceaversa. These commands will do the trick:

Tell the server it will be forwarding ipv4 edit `/etc/sysctl.conf` file in order to enable IP forwarding









Now we just turn on IP masquerading make sure the wlan0 power saving mode is disabled edit ` /etc/rc.local` file and add the following before the exit 0 line; in order to enable IP forwarding:




sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eht0 -o wlan0 -j ACCEPT

/sbin/iwconfig wlan0 power off





## Step 4: Try it!

Reboot your Pi and connect its Ethernet port to your Aruba Switch.
If everything goes as planned now your device has an IP address in the range 192.168.254.x and has Internet access via IP Masquerading thanks the Pi's WiFi interface


## Step 5: Optional Display for iftop

If you want a display and a case to look pretty 


Plug the LCD in to the Pi's SPI pins then run the following commands to get LCD software: 




sudo rm -rf LCD-show
git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
sudo ./LCD35-show

cd LCD-show/
sudo ./LCD-show 180





Install iftop and make sure your Pi have xterm terminal settings: 




sudo apt-get install iftop
sudo apt-get install xterm





Add iftop to your .profile so it starts automagicly edit ~/.profile and at the end add the following: 




sudo TERM=xterm-color iftop -n





Pop the Pi and the LCD into the case and screw it all together then,

Reboot and not only will you have a WiFi dongle but now you have a traffic monitor!




MVP Guru

Re: WiFi Dongle for Aruba Gateway/Switch

Thanks for sharing. I use a similar device for years to create a wired uplink for my remote AP when I travel. The RPI connects with the wireless interface to the hotel/guest network (but it is indeed also configured for my phone hotspot, as you can add multiple networks to wpa_supplicant.conf), then I connect the RAP to the ethernet port and once I cleared the captive portal it can connect to the internet.


Over the Christmas break when I was traveling around with every day a new hotel, I also added a bluetooth network interface to the RPI, so it's easy to connect over bluetooth with my laptop to the device and configure to which SSID it should connect.


Also, I added an additional USB wireless dongle which is configured to connect to my Canon digital camera and once connected syncs my new photos and drops them in my Nextcloud cloud storage to back them up. I then turn the WiFi on my camera, see the lights flashing for the transfer, and shortly after, all is synced to my cloud server. Then on another system, I automatically create (much) smaller thumbnails from the high-resolution 10-20MB images, which then are synced back in the other direction to my phone and tablet for faster viewing.


These Raspberry pi devices are amazing stuff.

If you have urgent issues, please contact your Aruba partner or Aruba TAC (click for contact details).
New Contributor

Re: WiFi Dongle for Aruba Gateway/Switch

or for a cheep usfull device to carry around get a product grom here 



i have 


in my box of guddies

New Contributor

Re: WiFi Dongle for Aruba Gateway/Switch

Be careful because many Hotspots only work from Ethernet to WiFi not like the 'Dongle' which is WiFi to Ethernet.


Not to be picky but it will matter if you're looking to add WiFi to an internet only device like an Aruba 3810M.


I already carry a commercial hotspot and it works great for adding WiFi to an existing network with an SSID you know so that you can access the switches without having to work in the datacenter on greenfield switches. (https://www.amazon.com/dp/B08229WMSM/)


The hotspot works great if you need to add WiFi to Ethernet but not if you want to add Ethernet to WiFi....