What NetBox Is
You have a network — a rack, a room, a building, a scattering of small machines in several places — and you want to know what is in it: which devices, plugged in where, using which addresses. The familiar way to hold that knowledge is a file somebody maintains: a spreadsheet with a tab per room, a wiki page with a table, a text file that started life as someone's good intention. These files share a fate. They are wrong, in small ways, almost immediately — an address reused because the sheet said it was free, a device that moved rooms in March and moved in the sheet never.
NetBox is that knowledge kept as a database instead of a document. It is a web application you run on your own machine. It records the intended state of a network — its source of truth: the sites where equipment lives, the devices in those sites, the interfaces on the devices, the cables between the interfaces, and the IPAM half of the story (IP Address Management): the prefixes you hold and the individual IP addresses handed out from them. Every record is a row in a real database, with rules the database enforces: an address cannot be handed to two interfaces by accident without the record saying so, and a site's name cannot quietly exist twice. When the lab asked NetBox to create a second site under a name already taken, the answer was a refusal in plain words:
{"slug":["site with this slug already exists."]}
(Verified in the lab; transcript
netbox-lab/transcripts/t09-ui-login-and-refusals.txt.)
The second half of the idea matters as much as the first: NetBox is not only a place a person reads. The same records are offered to programs through a REST API — the ordinary web-shaped interface other tools already know how to call. A script can ask "what address does this device have" and get an answer it can act on. That is what turns a notebook into infrastructure: the configuration generator, the monitoring setup and the provisioning script can all read the same truth instead of each keeping a private copy of the spreadsheet.
A first taste
After installing (chapter 3) and signing in (chapter 4), the whole tool is visible in one API call. This is the lab's invented network, read back through the API — one device, with its site, type and role resolved:
site: Example North Lab | type: ExampleSwitch 2400 | role: Lab Switch
and its address, assigned to an interface and made the device's primary one:
{'id': 1, 'address': '10.250.0.10/24', 'status': 'active',
'description': 'lab-sw-01 management address'}
assigned to: dcim.interface 1
(From the lab's transcript
t08-api-proof.txt, which builds the
whole example and reads it back.)
The word "intended", and why it is load-bearing
NetBox records what the network is supposed to look like. It does not watch the network. It does not scan, ping, discover or poll; if a device is unplugged and thrown in a skip, its NetBox record sits there, accurate as fiction, until a person or a script changes it. This surprises people, and chapter 12 returns to it, but it is a design, not an omission: a source of truth is a statement of intent that other systems are checked against. The monitoring tool tells you what is; NetBox tells you what should be; the interesting alarms live in the difference.
Handle the map with care
A complete, current NetBox is also a complete, current target list. The same database that answers "where does this service live" for your scripts answers it for anyone who obtains a copy. So: document only networks you own or are authorised to document; put NetBox behind the same care you give anything that holds credentials; guard its database backups like passwords; and treat its API tokens — chapter 9 — as keys to the map room, because that is what they are. The lab in this guide runs on loopback with invented names for exactly this reason.
Who it is for
The network that outgrew its spreadsheet — usually somewhere between ten devices and the first reused IP address. The small team whose automation needs somewhere trustworthy to read addresses from. The careful home lab whose owner is tired of being the only record. The common thread is not size; it is the moment "we should write this down properly" stops being a wish.