First Sync¶
This walkthrough takes a freshly installed plugin from zero to a populated NetBox database, using ARIN as the example backend.
Prerequisites¶
- NetBox 4.5 with the plugin installed and migrations applied (see Installation).
- The RQ worker (
netbox-rq) is running. Without it, sync jobs queue but never execute. - An ARIN Online account with an Org ID and a personal API key.
- At least one
ipam.RIRrecord (NetBox ships withARIN,RIPE,APNIC,LACNIC,AFRINICafter a freshmanage.py loaddata; otherwise create them under IPAM > RIRs). - One or more
ipam.Aggregaterows under that RIR, covering the prefixes you want to manage.
Step 1: Create an RIR Config¶
Configs bind the plugin to a specific RIR account. Each combination of (rir, name) must be unique.
- Go to RIR Manager > Configs and click Add.
- Fill in:
- RIR: the NetBox RIR (typically
ARIN). - Name: a short label, e.g.
production-arin. - API URL: leave blank to use the ARIN Reg-RWS default. For OT&E, use
https://reg.ote.arin.net/regrws/. - Org handle: your ARIN Org ID, e.g.
EXAMPLE-1. - Is active: keep checked. The scheduled sync only touches active configs.
- RIR: the NetBox RIR (typically
- Save.
The config detail page now shows a Sync action and tabs for Sync Logs, Tickets, and Jobs.
Step 2: Add your API key¶
Each user has their own encrypted key, scoped to one config. Without a key, sync and write actions are blocked.
- Go to RIR Manager > User Keys and click Add.
- Choose your user (admins can add keys for other users).
- Choose the RIR Config you just created.
- Paste the API key. It is stored encrypted; subsequent edits will not display the cleartext.
- Save.
See User API Keys for details on rotation and encryption.
Step 3: Trigger a manual sync¶
From the RIR Config detail view, click Sync. This enqueues a SyncRIRConfigJob for your user. Two things happen:
- The org and its POCs are pulled and persisted as
RIROrganizationandRIRContactrows. - For each NetBox
Aggregateunder this RIR, the plugin queries ARIN for the matchingNetand writes anRIRNetworkrow, linking it to the aggregate. A childSyncPrefixesJobis enqueued per aggregate to discover any reassigned subnets.
Watch progress under RIR Manager > Sync Logs or on the Jobs tab of the config. Each operation produces a row with status success, error, or skipped.
Step 4: Browse the synced data¶
After the job finishes, you should see entries under:
- Resources > Organizations -- one row per synced ORG, including its address.
- Resources > Contacts (POCs) -- linked to the organization and (optionally) to a NetBox
tenancy.Contact. - Resources > Networks -- one row per RIR Net, linked to its
AggregateorPrefix. - Resources > Customers -- only for child Nets reassigned to a customer (simple reassignment).
- Resources > Addresses -- de-duplicated structured addresses.
Visiting an Aggregate or Prefix detail page in NetBox now shows an RIR Network panel on the right, plus action buttons to Sync and (for prefixes) Reassign.
Step 5 (optional): Schedule recurring syncs¶
The plugin registers ScheduledRIRSyncJob as a NetBox system job at the daily interval. It iterates every active RIRConfig, picks the most-recently-used RIRUserKey, and runs sync_rir_config for each. No additional setup is required: the worker picks it up after restart.
To inspect or trigger it manually, go to System > Background Jobs in NetBox and look for Scheduled RIR Sync.
Next steps¶
- Syncing Resources -- how the sync pipeline maps RIR data into NetBox.
- Write Operations -- reassign, reallocate, remove, and delete networks at the RIR.
- IPAM Integration -- the buttons and panels added to NetBox
Aggregate,Prefix, andSitepages. - Auto-Reassignment -- the signal-driven workflow that reassigns prefixes automatically when they get a Site and Tenant.