> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lagerdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Router

> Manage routers as Lager nets

Register and control network routers as Lager nets. A router net wraps the REST
API that the router publishes, such as the API on a MikroTik hAP. Through that
net you can:

* inspect the interfaces, and toggle them
* list the wireless clients and the DHCP leases
* block internet access
* reset the router to a clean baseline

A router net is useful for connectivity tests and for network-resilience tests.

> [!NOTE]
>
> Introduced in **lager 0.10.0**. The default instrument type is `MikroTik_hAP`.

## Syntax

```bash theme={null}
lager router COMMAND [ARGS] [OPTIONS]
```

Every subcommand accepts `--box BOX` (Lager Box 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

| Command | Description |
| - | - |
| `add-net` | Register a router as a net on the box |
| `connect` | Verify connectivity to a router net |
| `interfaces` | List network interfaces |
| `wireless-interfaces` | List wireless interfaces and their configuration |
| `wireless-clients` | List connected wireless clients |
| `dhcp-leases` | List DHCP leases (devices that received IP addresses) |
| `system-info` | Get system resource information |
| `reboot` | Reboot the router |
| `enable-interface` | Enable a wireless interface |
| `disable-interface` | Disable a wireless interface |
| `block-internet` | Block all internet access (drops forwarded traffic) |
| `reset` | Reset the router net to a clean baseline state |
| `run` | Run an arbitrary router REST API GET call |

***

## Command Reference

### `add-net`

Register a router as a net on the box.

```bash theme={null}
lager router add-net NAME --address IP [OPTIONS]
```

| Option | Default | Description |
| - | - | - |
| `--address` | (required) | IP address of the router |
| `--username` | `admin` | Router username |
| `--password` | (empty) | Router password |
| `--instrument` | `MikroTik_hAP` | Router instrument type |
| `--use-ssl` | off | Use HTTPS instead of HTTP |
| `--box` | | Lager Box name or IP |

```bash theme={null}
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.

```bash theme={null}
lager router connect router1 --box my-lager-box
```

### `interfaces`

List network interfaces on a router net.

```bash theme={null}
lager router interfaces router1 --box my-lager-box
```

### `wireless-interfaces`

List wireless interfaces and their configuration.

```bash theme={null}
lager router wireless-interfaces router1 --box my-lager-box
```

### `wireless-clients`

List currently connected wireless clients.

```bash theme={null}
lager router wireless-clients router1 --box my-lager-box
```

### `dhcp-leases`

List DHCP leases — the devices that received an IP address.

```bash theme={null}
lager router dhcp-leases router1 --box my-lager-box
```

### `system-info`

Get system resource information from a router net.

```bash theme={null}
lager router system-info router1 --box my-lager-box
```

### `reboot`

Reboot a router net. Prompts for confirmation unless `--yes` is passed.

```bash theme={null}
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.

```bash theme={null}
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.

```bash theme={null}
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.

| Option | Description |
| - | - |
| `--ssid` | Baseline SSID to restore on wireless interfaces |
| `--password` | Baseline WPA2 password |
| `--yes` | Skip the confirmation prompt |

```bash theme={null}
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`.

```bash theme={null}
lager router run router1 /ip/address --box my-lager-box
```

***

## See Also

* [Nets](https://docs.lagerdata.com/source/reference/cli/nets.md) — manage instrument and device nets


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.