Topology
About 747 words
unifi topology draws how the site is wired: the internet on top, the gateway below it, and every switch and access point under the device it uplinks to.
$ unifi topology
╭──────────────────────────────╮
│ ● Nordlicht Fiber WAN │
│ WAN 203.0.113.42 · active │
│ WAN2 100.64.18.7 · standby │
╰───────────────┬──────────────╯
│
WAN
↓ 170 Mbps ↑ 28.2 Mbps
│
╭──────────────┴──────────────╮
│ ● Dream Machine Pro Max GW │
│ UDM Pro Max │
│ 192.168.1.1 │
╰──────────────┬──────────────╯
│
10 GbE · port 11
↓ 170 Mbps ↑ 28.2 Mbps
│
╭──────────────┴──────────────╮
│ ● Core Switch SW │
│ USW Pro Max 24 PoE │
│ 192.168.99.2 · 14 clients │
╰──────────────┬──────────────╯
╭────────────────────────────────┼────────────────────────────────╮
1 GbE · port 13 2.5 GbE · port 17 2.5 GbE · port 18
↓ 35 kbps ↑ 2.3 Mbps ↓ 19.1 Mbps ↑ 1.3 Mbps ↓ 19.9 Mbps ↑ 4.5 Mbps
│ │ │
╭──────────────┴─────────────╮ ╭───────────────┴──────────────╮ ╭──────────────┴─────────────╮
│ ● Garage Switch SW │ │ ● AP Living Room AP │ │ ● Office Switch SW │
│ USW Lite 8 PoE │ │ U7 Pro │ │ USW Flex 2.5G 8 PoE │
│ 192.168.99.4 · 3 clients │ │ 192.168.99.11 · 11 clients │ │ 192.168.99.3 · 5 clients │
╰──────────────┬─────────────╯ ╰───────────────┬──────────────╯ ╰──────────────┬─────────────╯
│ │ │
port 1 ≈ mesh · 866 Mbps 2.5 GbE · port 2
│ ↓ 1.3 Mbps ↑ 134 kbps ↓ 7.3 Mbps ↑ 1.5 Mbps
│ ┆ │
╭─────────────┴─────────────╮ ╭──────────────┴──────────────╮ ╭──────────────┴──────────────╮
│ ✗ AP Garden AP │ │ ● AP Hallway Mesh AP │ │ ● AP Office AP │
│ U7 Outdoor │ │ U6 Mesh │ │ U7 Pro Max │
│ 192.168.99.14 · offline │ │ 192.168.99.13 · 9 clients │ │ 192.168.99.12 · 4 clients │
╰───────────────────────────╯ ╰─────────────────────────────╯ ╰─────────────────────────────╯
Not connected to the gateway
╭───────────────────────────────────╮
│ ▲ USW Flex Mini SW │
│ USW Flex Mini │
│ 192.168.1.47 · pending adoption │
╰───────────────────────────────────╯
9 devices · ── wired · ┄┄ wireless · ↓↑ current trafficRead the diagram
Each box is a device with its state mark, model, address and client count. The connector between two boxes carries the link: its speed, the port on the upstream device, and the traffic flowing right now.
A dashed connector marked ≈ mesh is a wireless uplink, with its negotiated rate instead of a port. Devices the controller knows but can't place under the gateway, such as a switch waiting for adoption, are listed below the diagram.
The diagram answers the question you have before maintenance: what goes down with this device. Everything below a box depends on it.
Layouts
unifi topology --layout diagram # the boxes above
unifi topology --layout tree # an indented tree
unifi topology --layout auto # the default: diagram when it fits, tree otherwiseThe diagram needs width. When the terminal is too narrow for it, auto falls back to the tree, which works in 80 columns and in a pipe to less:
$ unifi topology --layout tree
Internet WAN Nordlicht Fiber 203.0.113.42 (active) · WAN2 Polarnetz Mobile LTE 100.64.18.7 (standby)
└─ Dream Machine Pro Max ↓ 170 Mbps ↑ 28.2 Mbps · UDM Pro Max · 192.168.1.1
└─ Core Switch 10 GbE · port 11 · ↓ 170 Mbps ↑ 28.2 Mbps · USW Pro Max 24 PoE · 192.168.99.2 · 14 clients
├─ Garage Switch 1 GbE · port 13 · ↓ 35 kbps ↑ 2.3 Mbps · USW Lite 8 PoE · 192.168.99.4 · 3 clients
│ └─ AP Garden port 1 · U7 Outdoor · 192.168.99.14 · offline
├─ AP Living Room 2.5 GbE · port 17 · ↓ 19.1 Mbps ↑ 1.3 Mbps · U7 Pro · 192.168.99.11 · 11 clients
│ └─ AP Hallway Mesh mesh · 866 Mbps · ↓ 1.3 Mbps ↑ 134 kbps · U6 Mesh · 192.168.99.13 · 9 clients
└─ Office Switch 2.5 GbE · port 18 · ↓ 19.9 Mbps ↑ 4.5 Mbps · USW Flex 2.5G 8 PoE · 192.168.99.3 · 5 clients
└─ AP Office 2.5 GbE · port 2 · ↓ 7.3 Mbps ↑ 1.5 Mbps · U7 Pro Max · 192.168.99.12 · 4 clients
USW Flex Mini USW Flex Mini · 192.168.1.47 · pending adoption
9 devices · ↓↑ current trafficInclude the clients
unifi topology --clients
unifi topology --layout tree --clients--clients draws the clients below the device they're attached to: wired clients with their port and link speed, wireless ones with band and signal. Busy devices show their first few clients and a count of the rest, which keeps the picture readable on a site with a few hundred clients.
Watch it live
unifi topology --watch
unifi topology --watch --refresh 2sThe static diagram first, then --watch: l switches to the tree layout and v adds the clients.
Like the dashboard, the view opens at once from the snapshot of the last run, marked as cached, and refreshes behind it.
--watch opens a full-screen view that refreshes itself, with v to toggle clients, l to cycle the layout, c to switch between dark and light, and the arrow keys to scroll. A diagram wider than the terminal opens centered on the gateway, and the footer shows where there is more to see. The Topology tab of unifi dashboard shows the same picture with the same keys.
Use the data
unifi topology --output json prints the tree as nested data under roots, each node with its device, its uplink link and its children, for drawing your own diagram or for checks such as "which devices have a wireless uplink".
