NetBox Network documentation
NetBox is a fantastic tool for documentation, IPAM and DCIM systems. Can give you IPAM for SDN setups.
NetBox is the leading solution for modelling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and data-center infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation. Read on to discover why thousands of organizations worldwide put NetBox at the heart of their infrastructure.
NetBox is an enterprise grade solution for housekeeping of networks and their resources. I document my networks, machines and VM with it.
History of NetBox
NetBox was originally developed by its lead maintainer, Jeremy Stretch, while he was working as a network engineer at DigitalOcean in 2015 as part of an effort to automate their network provisioning. Recognizing the new tool's potential, DigitalOcean agreed to release it as an open source project in June 2016.
Design Philosophy
NetBox was designed with the following tenets foremost in mind.
Replicate the Real World
Careful consideration has been given to the data model to ensure that it can accurately reflect a real-world network. For instance, IP addresses are assigned not to devices, but to specific interfaces attached to a device, and an interface may have multiple IP addresses assigned to it.
Serve as a "Source of Truth"
NetBox intends to represent the desired state of a network versus its operational state. As such, automated import of live network state is strongly discouraged. All data created in NetBox should first be vetted by a human to ensure its integrity. NetBox can then be used to populate monitoring and provisioning systems with a high degree of confidence.
Keep it Simple
When given a choice between a relatively simple 80% solution and a much more complex complete solution, the former will typically be favored. This ensures a lean codebase with a low learning curve.
Setting up NetBox
I prefer to run everything in Docker.
We will use the official NetBox Community git for it:
git clone -b release https://github.com/netbox-community/netbox-docker.git
Now go to the NetBox directory:
cd netbox-docker
Create this file, use an unused port
tee docker-compose.override.yml <<EOF
version: '3.4'
services:
netbox:
ports:
- 8000:8080
EOF
First we need to pull the required images for Netbox, PostgreSQL and Redis.
docker-compose pull
You should first edit the /env directory and personalize the environment.
Change passwords, edit email address and settings.
Then you can start NetBox to check the logs in Portainer or Dozzle
docker-compose up -d && docker-compose logs -f
Default settings
- Web page for your NetBox: <server ip>:8000
- Username: admin
- Password: admin
- API Token: 0123456789abcdef0123456789abcdef01234567
Login as admin:admin and change the password from the thingy in the upper right corner and then click Change Password. You can also add users if needed.
Start setting up your lab environment. Start from the basics like utilities and racks and work your way up to NIC, VLAN and VM.
References
NetBox [1]