Skip to content

Customizing

angela edited this page Feb 10, 2022 · 8 revisions

Overview

After initial setup, your config is saved to:

  • Cross-platform short-hand path:
    • ~/.nettest or $HOME/.nettest
  • Linux:
    • /home/myuser/.nettest
  • Mac/Windows
    • /Users/myuser/.nettest

To start fresh and re-generate all of your caches and config, simply delete the ~/.nettest directory

About

This config file is originally copied from your installations config-template.conf - in an enterprise scenario, you'll modify config-template.conf to suit your organization, before deployment.

In this directory, you'll see config.conf, modify any option to suit your environment.

Enterprise variables

The above options are not used unless in an enterprise scenario.



  • LATENCY_DEST=http://status.example.com/

    • Some ISPs offer latency test domains for you to use, if you have one available to you, enter it here. Something like http://status.[someisp].com
  • SKIP_PRELIM=1

    • Auto-run a test on first run, probably not used outside of enterprise scenario.
  • CHECK1=9.9.9.9

    • A reliable IP-based host to ping once to see if the user can reach the internet.
  • CHECK2=example.com

    • A reliable FQDN to ping once to see if the user can reach the internet with DNS.
  • IFCFG=/sbin/ifconfig

    • If the ifconfig command resides elsewhere, specify such here. In the application, its triggered by the $IFCFG variable.
  • PINGPROTOCOL=""

    • See: ping: socket: Address family not supported by protocol - On Debian at least, ping defaults to ipv6 and will throw this error if you're not using ipv6 on your network.
      • Leave blank/default: let your OS/ping decide
      • IPv4 only: PINGPROTOCOL="-4"
      • IPv6 only: PINGPROTOCOL="-6"
  • AP_MANUFACTURER=Ubiquiti

    • Expected manufacturer of the access points - will colorize a warning if a match is not met. If the manufacturer name has a space in it, use the first part of the name only. Instead of Xirrus, Inc. use Xirrus. This is obtained from the OUI list the connected router's MAC is compared to.
  • RELOAD_MENU=0

    • If you want the main menu to auto-load after every test, set to 1
  • DEFAULT_TEST=

    • Set a default test
  • SETUP_DONE=1

    • Auto-generated; leave it alone.
  • INSTALLPATH=/home/username/wifi-network-testing/

    • Install location at the time of setup. If you move it's location, notify your installation of such, here.

~/.nettest Content Explained

What the stuff in the dotfile directory is all about.

mac.cache file

After first run, you may also find a copy of mac.cache, which is obtained from the OUI list as this information doesn't change frequently, it's not necessary to go out and check it each time you run a test; a local copy is saved for you.

Open in any text editor to view it's contents.

Alpha-numeric files

nettest caches You will also see several text files like the following, appear:

  • 308BB2
  • DCA632

...and so on. These are caches of neighboring router lookups.

Open one of the files in a text editor and you'll see something like:

Cisco Systems, Inc

meaning one of your neighbors with the MAC prefix of 308BB2 are using a Cisco-made router.

As this won't change and will continually appear in your tests, subsequent tests will be faster because that lookup already has been cached.

How many and which appear can vary by your neighboring usage.

config.conf.bak

This is a backup of the file before it gets modified. Feel free to delete it.

Create a Shortcut

Optionally create a symbolic link so you can easily call upon the application with an alias instead of a path, or needing to be in its directory while inside the terminal (call it from anywhere).

Symlink it, so you can run it like:

ntest

(or whatever shortcut name you'd like to use) instead of:

./nettest.sh

Change /path/to for the location where your git directory is, that way you'll always run the latest master version:

sudo ln -s /path/to/nettest.sh /usr/local/bin/ntest