Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi RV Router with ALFA

This document is about setting up a small router for an RV that uses a long range dual band wifi adapter for connecting to a RV park's wifi service.

TOC

Major Update: New Ubuntu Server 26.04 LTS, IPv6, troubleshooting steps, faster and more stable.

Prerequisites:

To setup the Pi to act as a RV router with the ALFA Tube, make sure you have these:

  • Raspberry Pi Zero 2 W, 4B or 5: Purchase it via raspberrypi.com. This process is tested with the Zero 2 W and 4b. However, 5 will most likely also work.

  • Case: A case is not required, but it is recommended. Some cases come with heat sink and fan to help keep your Pi a little cooler.

  • Power supply: A USB power supply rated for the Pi you will have.

  • SD Card: You need a 32GB or larger micro SD card. A Kingston or SanDIsk is recommend. If you already have one, you can use that. This process will delete its content.

  • Small unused (nothing else connected) Ethernet hub with two patch cables or a single Ethernet crossover cable.

  • The ALFA Tube-UAC2 with antenna, available from Rokland. In May 2026, Rokland was out of antennas. You can still get the ALFA Tube-UAC2 from Rokland and the antenna from Amazon.

For your laptop or desktop computer:

  • Adapter: Make sure your desktop/laptop computer has a SD card reader/writer. If not, you can purchase a USB to Micro SD adapter for about $10.

  • An Ethernet port.

  • A Wifi adapter.

  • Raspberry Pi Imager software: Download and Install the software from raspberrypi.com/software. It will write the Ubuntu server software to the SD card.

  • An SSH client. A popular client is Putty. Modern operating systems have an SSH client built in.

Operating System Install

We'll initially setup the Pi as a headless (no keyboard or monitor) Ubuntu server.

Follow these steps to install and configure Ubuntu:

  1. Insert the SD card into your laptop/desktop reader or adapter.

  2. Open the Raspberry Pi Imager application.

  3. Select your device, Raspberry Pi Zero 2 W, 4 (model B) or other.

  4. Select the OS, under "Other General-purpose OS", select the Ubuntu Server 26.04 LTS version, 64-bit. (The 26.04 version is LTS even if it's not shown as LTS.)

  5. Select the storage device as the SD card you inserted in step 1.

  6. Select Customization and enter the following:

    1. A host name, i.e. "raspi02w" or something like that.

    2. Localization for timezone and keyboard type (despite no keyboard!)

    3. User name and password for logon.

    4. Enter Wifi SSID and password. If unsure, logon to your router to confirm. Look for the wireless or Wifi settings section.

    5. Enable SSH and use password authentication.

  7. Write the image to the SD card.

  8. Once done, remove the SD card from laptop/desktop and insert into the Raspberry Pi.

  9. Don't connect anything else to the Pi.

  10. Power on the Pi.

  11. Logon to your local router and check for current IP addresses. It may be under DHCP or current clients or other.

  12. Look for the "raspi02w" or other name you gave it in step 6.1 and note the IP address. If you don't see it after a few minutes, just be patient. The first boot may take quite awhile. It is does not appear after a significant amount of time, you can power cycle the Pi.

  13. Open your SSH client and connect to the IP address. SSH-via-wifi

  14. Logon using the ID and password set in step 6.3.

  15. Need some updates. For a new system, it may be running some background updates. You can use the htop command to wat the update process. During updates, you may receive an error using these commands. In that case, wait a few minutes and try again. Depending on your Pi model and your home network, this may take awhile.

    sudo apt -y update && sudo apt -y upgrade
  16. If you see a message about a reboot, use this command:

    sudo reboot
  17. Need some wifi power management software.

    sudo apt -y install iw
  18. To disable power management, type this command:

    sudo iw wlan0 set power_save off
  19. We'll schedule power save off at each reboot:

    { sudo crontab -l; echo '@reboot /usr/sbin/iw wlan0 set power_save off > /tmp/power_save_log.txt 2>&1'; }| sudo crontab -
  20. Setup swap space using these commands: (Adjust the "256M" in the first line to increase the swap space. Recommend 50% of physical memory.)

  21. sudo fallocate -l 256M /swap.img
    sudo chmod 600 /swap.img
    sudo mkswap /swap.img
    sudo swapon /swap.img
  22. To re-enable after next reboot:

    echo '/swap.img swap swap defaults 0 0'| sudo tee -a /etc/fstab
  23. Adjust the swappiness value lower so as to not use the swap file unless needed. Ubuntu default is 60. We'll set it to 30:

  24. sudo sysctl vm.swappiness=30
  25. To make sure it remembers after reboot, create a sysctl.d file:

    echo 'vm.swappiness=30' | sudo tee /etc/sysctl.d/99-swappiness.conf
  26. Reboot and confirm everything is set:

  27. sudo reboot
  28. After a minute or two, reconnect via SSH and logon.

  29. Type these commands to confirm settings:

    iw wlan0 get power_save
    free -h
    cat /proc/sys/vm/swappiness
  30. If it looks good, you can continue!

Now that Ubuntu is all set, we can turn it into a router.

Router Setup

To have Ubuntu act as a router, we'll need to specify the network interfaces and their roll, enable IP packet routing, add DNS and DHCP services, setup a special DHCPv6 client to get a extra data needed for an IPv6 router and configure the firewall.

Network

Remember the regulatory domain for later:

sudo netplan get wifis.wlan0.regulatory-domain >reg-dom.txt

Add some needed software:

sudo apt -y install network-manager isc-dhcp-server radvd wide-dhcpv6-client

If prompted for "Interfaces", enter "wwan0" for the interface. You may see an error that wide-dhcpv6-client.service failed. That is due to the fact that wwan0 does not yet exist.

Do not attach the ALFA adapter. For a Pi Zero W, attach the USB Ethernet adapter. Use this command to check the devices:

sudo lshw -C network

The report will list network devices. Each will have a "description:" like "Ethernet" or "Wireless", a "logical name:" and a serial number (the mac address). Look for the "Ethernet" device. If it's logical name is "eth0" then skip this command. Otherwise, make note of it's mac address. Run these commands and enter the mac address (example "01:23:45:67:89:ab") when prompted:

read -p "Enter Ethernet mac/serial number: " MAC
IFACE=eth0
echo 'SUBSYSTEM=="net",' \
  'ACTION=="add",' \
  'DRIVERS=="?*",' \
  'ATTR{address}=="'$MAC'",' \
  'ATTR{dev_id}=="0x0",' \
  'ATTR{type}=="1",' \
  'NAME="'$IFACE'"' | \
  sudo tee /etc/udev/rules.d/70-$IFACE-name-persistent-net.rules
sudo udevadm trigger \
  --action=add \
  --subsystem-match=net \
  --attr-match=address=$MAC

Also, look for the wifi/wireless device. If it has a logical name of "wlan0" then skip this command. Otherwise, make note of it's mac address. Run these commands and enter the mac address (example "01:23:45:67:89:ab") when prompted:

read -p "Enter Wireless/wifi mac/serial number: " MAC
IFACE=wlan0
echo 'SUBSYSTEM=="net",' \
  'ACTION=="add",' \
  'DRIVERS=="?*",' \
  'ATTR{address}=="'$MAC'",' \
  'ATTR{dev_id}=="0x0",' \
  'ATTR{type}=="1",' \
  'NAME="'$IFACE'"' | \
  sudo tee /etc/udev/rules.d/70-$IFACE-name-persistent-net.rules
sudo udevadm trigger \
  --action=add \
  --subsystem-match=net \
  --attr-match=address=$MAC

Check the devices again:

sudo lshw -C network

Look for the Ethernet device. The Ethernet adapter's name should now be eth0. If not, it's likely due to a typo in the mac address. Go back and try again. Same for the wlan0 device.

Set default wifi power saver to disabled for Network Manager using these commands:

sudo rm /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
sudo tee /etc/NetworkManager/conf.d/default-wifi-powersave-off.conf <<EOF >/dev/null
[connection]
wifi.powersave = 2
EOF

Ethernet Setup

We need a bridge for multiple network devices. The router's IPv4 subnet will be 192.168.37.0/24. Paste these commands:

sudo nmcli con add ifname br0 type bridge con-name br0
sudo nmcli con add type bridge-slave ifname eth0 master br0
sudo nmcli con mod br0 ipv4.addresses 192.168.37.1/24
sudo nmcli con mod br0 ipv4.method manual
sudo nmcli con mod br0 ipv6.method link-local
sudo nmcli con mod br0 bridge.stp no

Apply configuration:

sudo nmcli gen reload conf
sudo nmcli con up br0
sudo nmcli con up bridge-slave-eth0

We'll setup the DHCP server for IPv4 by creating a new config and starting it. Use these commands:

sudo tee /etc/dhcp/dhcpd.conf <<EOF >/dev/null
default-lease-time 86400;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.37.255;
option domain-name "local.lan";
authoritative;
subnet 192.168.37.0 netmask 255.255.255.0 {
  range 192.168.37.100 192.168.37.200;
  option routers 192.168.37.1;
  option domain-name-servers 192.168.37.1;
}
EOF

sudo tee /etc/default/isc-dhcp-server <<EOF >/dev/null
INTERFACESv4="br0"
EOF

sudo systemctl disable isc-dhcp-server6
sudo systemctl start isc-dhcp-server
sudo systemctl status isc-dhcp-server

If the DHCP server status was not good, go back and check the commands. If it shows good "active (running)", you can now connect your laptop/desktop to the Pi's Ethernet port. Use the Ethernet crossover cable or a hub and two patch cables. If using the hub, don't connect any other devices to it. The new DHCP server will give them an address, but they can't yet access the Internet.

To confirm your laptop/desktop got an IPv4 address after a minute or so, use this command:

cat /var/lib/dhcp/dhcpd.leases

Using your SSH client, connect to 192.168.37.1. If it fails, SSH to the the same IP address you got earlier on the wifi. Check the status of the dhcp server. Also, reboot the Pi. Try again to SSH to 192.168.37.1.

If the DHCP server did not assign an IP to your laptop/desktop, check the cables and hub or crossover cable. Once you see it assigned your laptop/workstation an IP address, SSH to 192.168.37.1. You can't move forward until you can SSH to 192.168.37.1.

Now that we know we have a good Ethernet connection, we'll stop using the wifi network and connect via Ethernet.

ssh-via-eth

Hotspot Setup

The imaging software used the cloud-init system to configure the Raspberry Pi's wifi. We need to disable and remove it before we can continue. Use these commands to remove it:

sudo apt -y purge cloud-init
sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
sudo rm /etc/netplan/*-cloud-init.yaml

Test and clean up netplan:

sudo netplan apply

We need to set the wlan0 with the proper regulatory domain. Use these commands:

SCRPT=config-wlan0.sh
echo '#!/bin/bash' >$SCRPT
echo REGDOM=$(cat reg-dom.txt) >>$SCRPT
tee -a $SCRPT <<'EOF' >/dev/null
IFACE=wlan0

if [ "$1" == "$IFACE" ]; then
  iw reg set $REGDOM
fi
EOF
chmod 700 $SCRPT
sudo chown root:root $SCRPT
sudo ln -s ~/$SCRPT /etc/NetworkManager/dispatcher.d/pre-up.d/$SCRPT

Create the wifi hotspot (AP) and add to bridge using this command, adjusting the SSID name and/or password as needed:

sudo nmcli con add con-name 'RouterHotspot' \
  ifname wlan0 type wifi slave-type bridge master br0 \
  wifi-sec.proto rsn wifi-sec.pairwise ccmp \
  wifi.mode ap wifi.ssid "WiFiCampPro-2.4ghz" wifi-sec.key-mgmt wpa-psk \
  wifi-sec.psk 'OurCamper12!+'

The router's wifi hotspot should now be active and allow connections.

Config ALFA

Connect the ALFA Tube to one of the Pi's USB ports. Use this command to check it's connection:

sudo lshw -C network

Look for the new wifi/wireless device. If it's logical name is "wwan0" then skip this command. Otherwise, make note of it's mac address (serial). Run these commands and enter the mac address (example "01:23:45:67:89:ab") when prompted:

read -p "Enter Wireless/wifi mac/serial number: " MAC
IF=wwan0
echo 'SUBSYSTEM=="net",' \
  'ACTION=="add",' \
  'DRIVERS=="?*",' \
  'ATTR{address}=="'$MAC'",' \
  'ATTR{dev_id}=="0x0",' \
  'ATTR{type}=="1",' \
  'NAME="'$IF'"' | \
  sudo tee /etc/udev/rules.d/70-$IF-name-persistent-net.rules
sudo udevadm trigger \
  --action=add \
  --subsystem-match=net \
  --attr-match=address=$MAC

Use this command and confirm the ALFA Tube is called wwan0:

sudo lshw -C network

If you don't see the wwan0 device, go back and check the mac address you entered and try again.

We'll use events for Network Manager to do a custom config for the ALFA. Use these commands:

sudo nmcli dev set wwan0 managed yes
SCRPT=config-wwan0.sh
tee $SCRPT <<'EOF' >/dev/null
#!/bin/bash
IFACE=wwan0

if [ "$1" == "$IFACE" ]; then
  # wide-dhcp6c will do the dhcp IPv6 config, not Network Manager
  nmcli c modify $CONNECTION_UUID ipv6.method link-local
  # get default route from RA
  sysctl net.ipv6.conf.$IFACE.accept_ra=2
fi
EOF
chmod 700 $SCRPT
sudo chown root:root $SCRPT
sudo ln -s ~/$SCRPT /etc/NetworkManager/dispatcher.d/pre-up.d/$SCRPT

SCRPT2=config-wwan0-up.sh
tee $SCRPT2 <<'EOF' >/dev/null
#!/bin/bash
IFACE=wwan0

if [ "$1" == "$IFACE" -a "$2" == "up" ]; then
  # wide-dhcp6c will do the dhcp IPv6 config, not Network Manager
  systemctl restart wide-dhcpv6-client.service
fi
EOF
chmod 700 $SCRPT2
sudo chown root:root $SCRPT2
sudo ln -s ~/$SCRPT2 /etc/NetworkManager/dispatcher.d/$SCRPT2

Local DNS Server

We'll setup Dnsmasq as a local caching DNS server. Use these commands:

sudo sed -i "s/#DNSStubListener=yes/DNSStubListener=no/" /etc/systemd/resolved.conf

sudo tee /etc/NetworkManager/conf.d/dnsmasq.conf <<EOF >/dev/null
[main]
dns=dnsmasq
EOF

sudo tee /etc/NetworkManager/dnsmasq.d/cfg1.cfg <<EOF >/dev/null
interface=br0
addn-hosts=/etc/hosts
EOF

We'll use wide-dhcp6c to set IPv6 addresses and get the needed info for IPv6 DNS. Use these commands:

SCRPT=~/wide-dhcpv6-event.sh
sudo tee /etc/wide-dhcpv6/dhcp6c.conf <<EOF >/dev/null
# external facing interface (WAN)
interface wwan0 { 
    # request a non-temporary address   
    send ia-na 1;
    # request prefix delegation address
    send ia-pd 1;
    # send rapid commit, don't wait for RA
    send rapid-commit;
    # we'd like information about DNS, too
    request domain-name-servers;
    request domain-name;
    # script to update dns srvs, config radvd and dnsmasq
    script "$SCRPT";
};

id-assoc pd 1 {
    # internal facing interface (LAN), you can duplicate this section if you want more subnets for more interfaces   
    prefix-interface br0 { 
        # subnet. Combined with ia-pd to configure the subnet for this interface.   
        sla-id 0; 
        # IP address "postfix". if not set it will use EUI-64 address of the interface. Combined with SLA-ID'd prefix to create full IP address of interface. In my case, ifid 1 means that interface will get a IPv6 ending with ::1
        ifid 1; 
        # prefix bits assigned. Take the prefix size you're assigned (something like /48 or /56) and subtract it from 64. In my case I was being assigned a /56, so 64-56=8
        sla-len 8; 
    };
};

id-assoc na 1 {
    # id-assoc for lan interface
};
EOF

tee $SCRPT <<'EOF' >/dev/null
#!/bin/bash
IFACEWAN=wwan0
IFACELAN=br0
{
# log some data
date
echo $@
env
ip -6 a
#
# update DNS servers in local /etc/resolve.conf for IPv6 via resolvectl
#
NEWSRVLIST=" "
while read JDNS; do
  echo "-> $JDNS"
  CURDNS=$(echo "$JDNS"|jq -r ".addressString")
  NEWSRVLIST="$NEWSRVLIST$CURDNS "
done < <(resolvectl -j dns $IFACEWAN|jq -r -c  ".[].servers.[]")
CURSRVLIST="$NEWSRVLIST"
echo current dns servers: $CURSRVLIST
echo IPv6 DHCP provided dns servers: $new_domain_name_servers
for NEWDNS in $new_domain_name_servers; do
  if [[ "$NEWSRVLIST" != *" $NEWDNS "* ]]; then
    NEWSRVLIST="$NEWSRVLIST$NEWDNS "
  fi
done
echo new dns servers: $NEWSRVLIST
if [[ "$NEWSRVLIST" != "$CURSRVLIST" ]]; then
  resolvectl -j dns $IFACEWAN $NEWSRVLIST
  echo dns servers updated via resolvectl
fi
#
# setup radvd to provide DNS on local LAN via local server running dnsmasq
#
RADVDDNSIPV6=
RADVDIPV6LEN=
NEEDDNSRELOAD=N
# check each IPv6 on br0 and confirm it can connect to dnsmasq.  also, collect IPv6 addr on br0 for radvd
while read JIF; do
  echo "-> $JIF"
  LANIPV6=$(echo "$JIF"| jq -r ".local")
  LANIPV6LEN=$(echo "$JIF"| jq -r ".prefixlen")
  [ "$LANIPV6" == "null" ] && break
  echo $LANIPV6/$LANIPV6LEN
  # need an IPv6 address for radvd DNS
  [ "$RADVDDNSIPV6" == "" ] && { RADVDDNSIPV6=$LANIPV6; RADVDIPV6LEN=$LANIPV6LEN ; }
  # an internet address is preferred
  [ "$RADVDDNSIPV6" != "" ] && [[ $LANIPV6 == 2* ]] && { RADVDDNSIPV6=$LANIPV6; RADVDIPV6LEN=$LANIPV6LEN ; }
  # test dnsmasq available on the LAN IP?
  nslookup localhost $LANIPV6 || NEEDDNSRELOAD=Y
done < <( ip -j -6 addr ls -deprecated primary dev $IFACELAN scope global | jq -c ".[].addr_info[]" )
echo NEEDDNSRELOAD $NEEDDNSRELOAD
if [ "$NEEDDNSRELOAD" == "Y" ]; then
  nmcli g reload dns-full
  echo "reloaded nm dns-full (for dnsmasq)"
fi
echo $RADVDDNSIPV6/$RADVDIPV6LEN
RADVDCHG=N
if ! grep "RDNSS $RADVDDNSIPV6" /etc/radvd.conf; then
  sed -i 's/RDNSS [0-9,a-f,:]* /RDNSS '$RADVDDNSIPV6' /' /etc/radvd.conf
  echo updated RDNSS in radvd.conf - $RADVDDNSIPV6
  RADVDCHG=Y
fi
if ! grep "prefix ::/$RADVDIPV6LEN" /etc/radvd.conf; then
  sed -i 's_prefix ::/[0-9]*_prefix ::/'$RADVDIPV6LEN'_' /etc/radvd.conf
  echo updated prefix in radvd.conf - ::/$RADVDIPV6LEN
  RADVDCHG=Y
fi
echo RADVDCHG $RADVDCHG
if [ "$RADVDCHG" == "Y" ]; then
  systemctl restart radvd
  echo restarted radvd
fi
} 2>&1 >> /var/log/wide-dhcpv6-event.log
EOF

chmod +x $SCRPT
sudo chown root:root $SCRPT

We'll also use radvd to setup IPv6 and DNS for clients on the local network. Use these commands:

sudo tee /etc/radvd.conf <<EOF >/dev/null
interface br0
{
        AdvSendAdvert on;
        prefix ::/48
        {
                AdvOnLink on;
                AdvAutonomous on;
        };
        RDNSS fd1f:5f77:37::1 { };
};
EOF

Routing and Firewall

To setup routing, use these commands to enable masquerade (NAT) for IPv4, enable routing and configure the firewall.

sudo sed -i 's%#net/ipv4/ip_forward=1%net/ipv4/ip_forward=1%' /etc/ufw/sysctl.conf
sudo sed -i 's%#net/ipv6/conf/default/forwarding=1%net/ipv6/conf/default/forwarding=1%' /etc/ufw/sysctl.conf
sudo sed -i 's%#net/ipv6/conf/all/forwarding=1%net/ipv6/conf/all/forwarding=1%' /etc/ufw/sysctl.conf

sudo ufw allow in on br0
sudo ufw route allow in on br0

sudo sed -i '9r/dev/stdin' /etc/ufw/before.rules <<EOF >/dev/null
# nat Table rules
*nat
:POSTROUTING ACCEPT [0:0]

# Forward traffic from br0 through wwan0.
-A POSTROUTING -s 192.168.37.0/24 -o wwan0 -j MASQUERADE

# don't delete the 'COMMIT' line or these nat table rules won't be processed
COMMIT
EOF

And finally, enable the firewall (answer "y" when asked):

sudo ufw disable && sudo ufw enable

To confirm operations of the firewall, use this command:

sudo ufw status verbose

The output will look like this:

Status: active

Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip

To Action From


Anywhere on br0 ALLOW IN Anywhere
Anywhere (v6) on br0 ALLOW IN Anywhere (v6)

Anywhere ALLOW FWD Anywhere on br0
Anywhere (v6) ALLOW FWD Anywhere (v6) on br0

In general, the firewall will trust the internal LAN (via br0) and allow devices to connect to it. However, everything else, i.e. wwan, will be un-trusted and blocked from connecting. Also, routed traffic will be allowed through the firewall from br0.

Perform a final reboot and SSH back into it again to confirm everything is working.

sudo reboot

Operation

When arriving at a RV park that provides wifi service, connect to the Raspberry Pi router via wifi hotspot or Ethernet. Then ssh into it via 192.168.37.1 and use this command:

sudo nmtui

Use up/down keys and select "Activate a connection" via enter key. Under "USB Wi-Fi", select an available network and hit enter. You should be prompted for a password. If the password is correct, you will be connected and an asterisk (*) will appear next to the network. Selecting it again will deactivate it. Hit the esc key to exit. Note: Do not connect the ALFA USB wifi to the local hotspot called "WiFiCampPro-2.4ghz".

Once the USB Wifi has an active connection, any device connected to the router via Ethernet or it's hotspot will have Internet access through the RV camp site's wifi service.

USB-wifi-camp

To switch networks, be sure to deactivate the current connected network first. Then select the new network and enter the password when prompted. It will remember these passwords, so it won't ask a second time for the same network.

In addition, the "nmtui" command allows you to view and adjust many of the network settings defined in this document. That includes viewing and changing the wifi hotspot password.

For hotspot settings, select "Edit a connection". Then highlight "br0" and select "Edit...". Then highlight "RouterHotspot" and select "Edit...".

While in "Edit a connection", you can also delete old remembered networks and their passwords.

Troubleshooting

If you are having trouble, take these basic actions to figure out what's wrong.

Connect a client to the Pi. If you can't, make sure the client can see the Pi's wifi hotspot. If not, try an Ethernet connection.

Make sure the Pi has power. Depending on the Pi's case, you may have to open it to confirm the Pi has power. You should see an LED light.

Once connected, ssh into 192.168.37.1. Use the following commands to get more information:

ip address
  • Interface "eth0" will only be green "UP" if an active device is connected to the Ethernet port.

  • Interface "wlan0" will show green "UP" as long as the hotspot is available.

  • Interface "wwan0" will only show green "UP" if it has an active connection to an RV campsite's wifi service.

  • Interface "br0" should show green "UP". Keep in mind,"br0" is the bridge that joins the hotspot's wifi with the Ethernet network.

  • Both "br0" and "wwan0" (if green "UP") should both have IP addresses. Most likely there will be IPv4 (inet) and IPv6 (inet6) addresses. Interfaces "wlan0" and "eth0" should not have IP address.

ip route
ip -6 route
  • This lists the IP routing tables. It includes how to get to different network segments and the interface to use for access.

  • Most important are the defaults. The defaults are used for networks that are not directly available on an interface, like the Internet. There should be at least one. Most likely two, one for IPv4 and one for IPv6.

ping -4 -c 10 -O 8.8.8.8
ping -6 -c 10 -O 2001:4860:4860::8888
  • This sends test packets to Internet addresses that are almost always available. It is a good test of the wwan0 device and it's connection.

  • Look for the packet loss percent. A few packets missing is expected. A poor connection will have a significant number of missing packets.

  • Also look at the average round trip time (rtt) for the packets in milliseconds (ms). A connection with average rtt in hundreds of ms (tenths of a seconds) will be kinda slow. If it's thousands of ms (seconds) will be very slow.

nslookup google.com 192.168.37.1
  • This tests the local DNS server.
sudo dmesg
  • This is the kernel log.
tail -n 500 /var/log/syslog
  • This is the system log.
tail -n 500 /var/log/wide-dhcpv6-event.log
  • This is the log from the wide-dhcpv6-event.sh script.
sudo systemctl status radvd
sudo systemctl status wide-dhcpv6-client.service
sudo systemctl status isc-dhcp-server.service
  • This lists the status of some key services.
  • Service radvd provides IPv6 configuration information to clients connected via br0.
  • Service wide-dhcpv6-client gets IPv6 information from wwan0 and sets the IPv6 addresses on wwan0 and br0. It also passes needed information to radvd.
  • Service isc-dhcp-server provides IPv4 configuration information to clients connected via br0.
htop
  • This displays all the processes and threads running on the system.
  • To just show processes, hit upper-case H.
  • to view the processes as a tree, hit lower-case t. The tree shows the parent-child relationship of the processes. The parent spawned the child.
  • You can also see the memory and CPU usage for the system and all processes.
  • To exit, hit lower-case q or F10.

Super useful tip: If something odd is going on, just reboot.

sudo reboot

Extra Credit

Normally, the Pi power supply runs off 120v AC. However, with a proper adapter, like a https://www.droking.com/Power-Supply-Module-DC-9V-36V-to-5.2V-5A-Double-Output-Buck-Converter-USB-Charger-Voltage-Regulator-Adapter-Driver-Module, you can wire it directly into the 12v DC power system of the RV.

About

This document is about setting up a small router for an RV that uses a long range dual band wifi adapter for connecting to a RV park's wifi service.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors