Skip to main content
Register and control network routers as Lager nets. A router net wraps a router’s REST API (e.g. a MikroTik hAP) so you can inspect interfaces, list wireless clients and DHCP leases, toggle interfaces, block internet access, and reset the router to a clean baseline — useful for connectivity and network-resilience tests.
Introduced in lager 0.10.0. The default instrument type is MikroTik_hAP.

Syntax

lager router COMMAND [ARGS] [OPTIONS]
Every subcommand accepts --box BOX (Lagerbox name or IP; uses the default box if omitted). Most operate on a NETNAME — the name of a router net previously registered with add-net.

Commands

CommandDescription
add-netRegister a router as a net on the box
connectVerify connectivity to a router net
interfacesList network interfaces
wireless-interfacesList wireless interfaces and their configuration
wireless-clientsList connected wireless clients
dhcp-leasesList DHCP leases (devices that received IP addresses)
system-infoGet system resource information
rebootReboot the router
enable-interfaceEnable a wireless interface
disable-interfaceDisable a wireless interface
block-internetBlock all internet access (drops forwarded traffic)
resetReset the router net to a clean baseline state
runRun an arbitrary router REST API GET call

Command Reference

add-net

Register a router as a net on the box.
lager router add-net NAME --address IP [OPTIONS]
OptionDefaultDescription
--address(required)IP address of the router
--usernameadminRouter username
--password(empty)Router password
--instrumentMikroTik_hAPRouter instrument type
--use-ssloffUse HTTPS instead of HTTP
--boxLagerbox name or IP
lager router add-net router1 --address 192.168.88.1 --username admin --password secret --box my-lager-box

connect

Verify connectivity to a router net.
lager router connect router1 --box my-lager-box

interfaces

List network interfaces on a router net.
lager router interfaces router1 --box my-lager-box

wireless-interfaces

List wireless interfaces and their configuration.
lager router wireless-interfaces router1 --box my-lager-box

wireless-clients

List currently connected wireless clients.
lager router wireless-clients router1 --box my-lager-box

dhcp-leases

List DHCP leases — devices that have received IP addresses.
lager router dhcp-leases router1 --box my-lager-box

system-info

Get system resource information from a router net.
lager router system-info router1 --box my-lager-box

reboot

Reboot a router net. Prompts for confirmation unless --yes is passed.
lager router reboot router1 --box my-lager-box
lager router reboot router1 --yes --box my-lager-box

enable-interface / disable-interface

Enable or disable a wireless interface by name.
lager router enable-interface router1 wlan1 --box my-lager-box
lager router disable-interface router1 wlan1 --box my-lager-box

block-internet

Block all internet access on a router net (drops forwarded traffic). Use reset to restore access.
lager router block-internet router1 --box my-lager-box

reset

Reset a router net to a clean baseline state: removes all test-tagged firewall rules, bandwidth limits, and access-list entries; re-enables DHCP and all wireless interfaces. If --ssid and --password are provided, a fresh baseline WPA2 network is applied. Prompts for confirmation unless --yes is passed.
OptionDescription
--ssidBaseline SSID to restore on wireless interfaces
--passwordBaseline WPA2 password
--yesSkip the confirmation prompt
lager router reset router1 --box my-lager-box
lager router reset router1 --ssid HomeNet --password secret123 --box my-lager-box

run

Run an arbitrary router REST API GET call. PATH is the API path relative to /rest, e.g. /ip/address.
lager router run router1 /ip/address --box my-lager-box

See Also

  • Nets — manage instrument and device nets
  • WiFi — manage the Lager Box’s own WiFi settings