DIY a wifi / network analyzer

From wikiluntti

Introduction

Use old Debian laptops to analyze wifi behavior. Perhaps use multiple. Make a Grafana or similar interface.

An Ethernet probe also for comparison


Use Grafana, InfluxDB and Telegraf.

Analyze

  • Wi-Fi signal/interference
  • the local access point
  • LAN switching/routing
  • ISP/WAN link
  • DNS
  • a particular destination/service
  • congestion at certain times
  • packet loss/jitter rather than simply low bandwidth

Collect

  • Ping latency: Is connectivity getting slower?
  • Packet loss: Are packets disappearing?
  • Jitter: Is latency unstable?
  • DNS response time: Is DNS contributing to slowness?
  • HTTP/HTTPS response time: Is reaching real services slow?
  • Download speed: Available throughput
  • Wi-Fi RSSI: Signal strength
  • Wi-Fi noise/channel: Possible radio problems
  • Wi-Fi bitrate: Actual negotiated link quality
  • Retransmissions: Wi-Fi/network quality
  • Interface traffic: How heavily the network is being used
  • Gateway latency: Local network vs Internet problem
  • WAN latency: Which link is having trouble
  • DHCP/connectivity events: Intermittent local failures
  • Speed test


Record

  • SSID
  • BSSID
  • channel
  • RSSI
  • noise
  • channel width
  • MCS/rate
  • frequency
  • disconnects
  • roaming
  • packet loss
  • latency

The network measurements:

  • ping
  • fping
  • mtr
  • iperf3
  • DNS queries
  • HTTP probes
  • speedtest/other speed-test clients

Wi-Fi information

  • iw
  • iwconfig where applicable
  • NetworkManager tools
  • nmcli

Software

  1. Grafana (dashboard)
  2. Prometheus of db (influxDB)(time-series store)
    1. Node Exporter (laptop)
      • CPU, RAM, disk, interface bytes received/sent, interface errors, interface state, system load, uptime, filesystem, etc.
    2. Blackbox exporter (network measurement)
    3. optionally Telegraf (general-purpose collection agent).
      • ICMP/ping, HTTP, HTTPS, DNS, TCP, gRPC (192.168.1.1 ← local gateway, ISP gateway ← WAN, 1.1.1.1 ← Internet, 8.8.8.8 ← Internet)
    4. iw dev wlan0 link provides Wi-Fi-specific information, eg wifi_signal_dbm, wifi_tx_bitrate_mbps, wifi_rx_bitrate_mbps, wifi_frequency, wifi_bssid, wifi_disconnects
    5. Scheduled (every 30 min?) speedtester

Wireshark/tcpdump

Or use Telegraf:

  • HOST
    • CPU
    • RAM
    • disk
    • uptime
    • interface statistics
  • NETWORK
    • ping gateway
    • ping ISP
    • ping Internet
    • DNS response time
    • HTTP response time
    • TCP connection tests
  • WIFI
    • RSSI
    • frequency
    • channel
    • bitrate
    • BSSID
    • connection state
  • ACTIVE TESTS
    • download speed
    • upload speed
    • latency
    • packet loss