mr-canoehead / network_performance_monitor

Network Performance Monitor - a portable tool for troubleshooting performance issues with home networks
GNU General Public License v3.0
84 stars 21 forks source link

Is this setup configurable? #20

Closed idank closed 4 years ago

idank commented 4 years ago

Hello, firstly thanks for a wonderful project. Code is easy to navigate, and works great.

I'm trying to deploy the net perf mon with the following setup:

I'd like net perf mon to use the ethernet port as its test_exec_namespace. And I'd like to be able to ssh to the rpi from the internal network. The end goal here is to know whether my internal network is the cause of some flakiness in the network performance I'm experiencing.

I tried many configurations, without much success. Here's my latest version:

{
        "configure_interfaces" : true,
        "test_exec_namespace" : "ns_enxb827ebfced4d",
        "interfaces" : {
                "wlan0" : {
                        "type" : "wireless",
                        "wpa_supplicant_config" : "/opt/netperf/config/wpa_supplicant/wlan0.conf",
                        "ipv4_addr" : "192.168.0.116",
                        "ipv4_gw" : "192.168.0.1",
                        "namespace": "root",
                        "alias" : "if_2.4Ghz"
                },
                "enxb827ebfced4d" : {
                        "type" : "ethernet",
                        "namespace" : "ns_enxb827ebfced4d",
                        "alias" : "if_lan"
                }
        },
        "bandwidth_monitor_bridge" : {
                "configure" : false
        }
}

This fails with:

$ sudo /usr/bin/python3 /opt/netperf/configure_interfaces.py
Reading interfaces file /opt/netperf/config/interfaces.json
Configuring the bandwidth monitoring bridge...
Configuring the performance testing interfaces...

WARNING: No interfaces will be configured in the root namespace. The network will not be reachable from the console shell. To access the network you will need to switch to a namespace with a configured interface.

WARNING: The network interfaces are being reconfigured, if you are connected via ssh your session will disconnect or hang.
To terminate a ssh session that has hung, type the key sequence <Enter><Tilde><Dot> (The 'Enter' key, then the '~' key, then the '.' key.)
To reconnect, ssh to one of the configured namespace IP addresses, or to the address of the interface in the root namespace.

Configuring interfaces for network performance monitoring:

Configuring wireless interface wlan0
Leaving interface in the root network namespace
Bringing up interface wlan0 in root
Configuring IPv4 address for interface wlan0
RTNETLINK answers: File exists

ERROR: Unble to assign IPv4 address for interface wlan0

I tried other variants too, but all seem to fail one way or another. Would love some help.

mr-canoehead commented 4 years ago

This is not a valid configuration, the test execution interface and all test target interfaces must be configured with static IP addresses. The project does not currently support the use of DHCP for configuring addresses for the various interfaces.

This configuration is also risky; connecting the test execution interface to the modem and the WiFi interface to your local network creates a potential path to bypass the firewall on your Google router. The test execution interface should be connected to one of the LAN ports on your Google router.