OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • Benchmark each WAN bandwidth on multi-WAN setup ?
« previous next »
  • Print
Pages: [1]

Author Topic: Benchmark each WAN bandwidth on multi-WAN setup ?  (Read 2113 times)

CDuv

  • Newbie
  • *
  • Posts: 43
  • Karma: 2
    • View Profile
Benchmark each WAN bandwidth on multi-WAN setup ?
« on: January 16, 2019, 02:27:50 pm »
Hello,

To periodically benchmark the bandwidth of my WAN connection I use speedtest-cli: which works fine.
But I want to extend this benchmark to the other WANs (I have a multi-WAN failover setup) so I guess I need a firewall rule with gateway policy to force traffic to go via the other WAN.

Say the computer running speedtest-cli has IP 192.168.0.100, I can add a OPNsense firewall rule "from=192.168.0.100; gw=WAN_FAILOVER" but I don't want enable/disable the rule each time... so I am looking for a way to make this permanent/stable.

I see 3 ways:
  • Add virtual network interface (eg. eth0:1, eth0:2, ...) to the computer running speedtest-cli (with dedicated LAN IP address 192.168.0.x) for each WAN to benchmark (WAN_PRIMARY, WAN_FAILOVER) and add a OPNsense firewall rules for each WAN:
    • from=192.168.0.101; gw=WAN_PRIMARY
    • from=192.168.0.102; gw=WAN_FAILOVER
  • Choose a remote speedtest server (get the list with speedtest-cli --list) for each WAN to benchmark (WAN_PRIMARY, WAN_FAILOVER) and add a OPNsense firewall rule per speedtest server (destination) IP address:
    • from=192.168.0.100; to=SpeedTestA; gw=WAN_PRIMARY
    • from=192.168.0.100; to=SpeedTestB; gw=WAN_FAILOVER
  • Add one virtual network interface (eg. eth0:1) to the computer running speedtest-cli (with dedicated LAN IP address 192.168.0.101). This IP will be exclusively used by the computer for benchmark. Add a OPNsense firewall rule "from=192.168.0.101; gw=WAN_PRIMARY"  and use the OPNsense API to update (change gateway) and enable/disable the firewall from computer running speedtest-cli.

I think solution 1 (virtual network interface) is the best but I am open to other solutions I have not thought about :)
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • Benchmark each WAN bandwidth on multi-WAN setup ?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2