Skip to main content
A router net puts a real access point under test control, so a test can change the SSID, break the network on purpose, and put it back. It is how you exercise a DUT’s reconnect, roaming, and offline behavior without touching hardware by hand. Unlike WiFi, which manages the Lager Box’s own wireless interface, a router net is a separate device on the bench that the box drives over the MikroTik REST API.

Import

Credentials (username, password, use_ssl) come from the net’s saved configuration, so scripts never hard-code them.

Connection and system

Interfaces

Security profiles

Clients

Fault injection

These are the methods that make a router net worth having: they break the network in specific, repeatable ways so you can assert how firmware responds.

Test isolation

reset_to_defaults(baseline_ssid=None, baseline_pass=None, wireless_interfaces=None) restores the router to a known baseline. The rule of thumb: anything this API adds is tagged as test state, and the remove_* and clear_* methods above remove only those tagged entries — so a cleanup cannot delete a rule that was already on the router before the test ran.

Examples

Verify the DUT reconnects after the AP drops

Rotate the SSID password mid-session

Supported hardware

Notes

  • Every method is a REST call to the router, so failures surface as connection or HTTP errors rather than as instrument errors.
  • reboot() drops the connection by design. Always follow it with wait_for_ready() before issuing further calls.
  • Cleanup methods only remove test-tagged state, so they are safe to call in a finally block on a shared bench router.