Skip to main content

IP Address Management (IPAM)

NitroNet's IPAM module provides centralized tracking and management of IP addresses, subnets, and VLANs across your network. It automatically discovers devices from flow data and integrates with NetBox, your device inventory, and manual entry.


Overview​

The IPAM system maintains three core tables:

TableDescription
ipam_prefixesSubnets / CIDR blocks — your address plan
ipam_addressesIndividual IP address assignments
ipam_vlansVLAN definitions

IP addresses are discovered automatically from multiple sources and correlated against configured prefixes. The prefix table is the source of truth — configure your subnets here first, then addresses discovered from flows, devices, and NetBox are automatically assigned to the correct prefix.


Data Sources​

SourceBadgeHow it works
flow🌊 cyanDiscovered automatically from NetFlow/IPFIX data via MAC address
device📡 blueSynced from the devices table (mgmt_ip field)
netbox🔗 purpleImported from NetBox IPAM via API sync
manual✏️ greenManually added through the UI
csv_import—Imported via CSV file or REST API

Device Classification​

When IPs are discovered from flow data, the device type is automatically classified using the OUI vendor name from the MAC address and observed application protocols:

TypeDetection Logic
networkCisco, Juniper, Arista, Calix, Fortinet, Palo Alto OUI
serverIntel Corporate OUI + SSH/SNMP/NetFlow protocols observed
workstationApple, Dell, HP, Lenovo OUI
voipGrandstream, Polycom, Yealink OUI
iotGaoshengda, Espressif, Tuya OUI (cheap WiFi chipsets)
unknownUnrecognized OUI

IP Addresses Tab​

The main table shows all discovered and configured IP addresses with filtering and sorting.

Filters​

FilterOptions
SearchFree text — matches IP, hostname, MAC, vendor, owner, description
TypeAll / Workstation / Server / Network / IoT / VoIP / Unknown
SourceAll / Flow / Manual / NetBox / Device
PrefixAll / specific subnet dropdown (auto-populated)
SortSubnet (default) / IP Address / Last Seen / Device Type

Actions​

  • 🔍 Explore — opens IP Explorer modal with full context including flow history and open incidents
  • ✏️ Edit — edit hostname, owner, device type, description, status
  • 🗑 Delete — only available for manually created entries
  • ⬇ CSV — exports current filtered view to CSV, sorted by subnet then IP
  • ↻ Refresh — manually refresh the table
  • + Add IP — manually add an IP address

IP Explorer​

Click any IP address to open the Explorer modal showing:

  • Full address details (MAC, vendor, hostname, owner, prefix, site, device)
  • Top 10 flows in the last 24 hours (peer IP, application, bytes, last seen)
  • Open incidents that reference this IP address

Prefixes Tab​

Manage your subnet address plan. Prefixes are the source of truth — add your CIDRs here and IP addresses will automatically be assigned to the correct prefix.

Adding a Prefix​

Click + Add Prefix and fill in:

FieldRequiredDescription
CIDR✓e.g. 192.168.100.0/24
NameHuman-readable name e.g. "Management Network"
SiteAssign to a site from the dropdown
Rolemanagement / transit / access / server / loopback / dmz
VRFVirtual routing domain (default: Global)
Statusactive / reserved / deprecated

When a prefix is created, any existing IP addresses that fall within the CIDR are immediately assigned to it — no manual sync required.

Expandable Prefix Rows​

Click any prefix row to expand it and see all IP addresses in that subnet inline. Each expanded row shows:

  • IP address with link to IP Explorer
  • Hostname / owner
  • MAC address and vendor
  • Device type
  • Source and status
  • Last seen timestamp

Utilization Bar​

Each prefix shows a utilization bar: discovered addresses / total usable addresses. Colors:

  • 🟢 Green — below 70%
  • 🟡 Amber — 70–89%
  • 🔴 Red — 90%+

VLANs Tab​

Manage VLAN definitions. VLANs can be added manually, imported from NetBox, or used as reference data for prefix assignment.

FieldDescription
VLAN ID1–4094
NameDescriptive name
SiteOptional site assignment
DescriptionFree text
Statusactive / deprecated

Sync Operations​

Sync Flows​

Queries flows_all in ClickHouse for the last 24 hours, extracts unique private IP + MAC combinations, and upserts into ipam_addresses. Only RFC1918 addresses are imported:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16
  • 100.64.0.0/10 (CGNAT)

Multicast (224.x.x.x, 239.x.x.x) and broadcast (255.x.x.x) are excluded.

Sync Devices​

Pulls all devices from the devices table that have a mgmt_ip set and upserts them into ipam_addresses with source = 'device'. Device type is mapped from the device_type field:

device_type containsIPAM device_type
Cisco, Juniper, Arista, Aruba, FortiGate, Palo Altonetwork
Linux Server, Windows Serverserver
probenetwork
vpcskipped

NetBox IPAM Sync​

Available in Settings → Integrations → NetBox → IPAM Sync. Imports from three NetBox IPAM endpoints:

NetBox endpointImported to
/api/ipam/prefixes/ipam_prefixes
/api/ipam/ip-addresses/ipam_addresses
/api/ipam/vlans/ipam_vlans

Existing records are updated on conflict. NetBox is the authoritative source for source = 'netbox' records.


CSV Import​

From the UI​

Navigate to IPAM → Import tab and either drag-and-drop or click to upload a .csv file.

A preview of the first 5 rows is shown before importing. Click Download Template to get a pre-filled example CSV.

CSV Format​

address,prefix,hostname,dns_name,mac_address,owner,device_type,description,status,vrf
10.0.1.1,10.0.1.0/24,router1,router1.corp.com,aa:bb:cc:dd:ee:01,NetOps,network,Core router,active,Global
10.0.1.10,10.0.1.0/24,server1,server1.corp.com,aa:bb:cc:dd:ee:02,IT,server,Web server,active,Global
192.168.100.50,192.168.100.0/24,printer1,,aa:bb:cc:dd:ee:04,Facilities,iot,HP LaserJet,active,Global
ColumnRequiredDescription
address✓IPv4 address
prefixCIDR — auto-created if not exists
hostnameDevice hostname
dns_nameFully qualified domain name
mac_addressFormat: aa:bb:cc:dd:ee:ff
ownerOwner or team name
device_typeworkstation | server | network | iot | voip | unknown
descriptionFree text notes
statusactive | reserved | dhcp | deprecated (default: active)
vrfVRF name (default: Global)

Import behavior:

  • Existing IPs are updated, not duplicated
  • If prefix is specified and doesn't exist, it is auto-created
  • After import, all addresses are automatically assigned to matching prefixes
  • Errors on individual rows are reported but don't stop the import

REST API​

All endpoints require authentication:

Authorization: Bearer YOUR_API_TOKEN

Endpoints​

Addresses​

MethodEndpointDescription
GET/api/ipam/addressesList addresses with filters
GET/api/ipam/addresses/:ipSingle IP detail with flow context
POST/api/ipam/addressesCreate address
PATCH/api/ipam/addresses/:idUpdate address
DELETE/api/ipam/addresses/:idDelete (manual only)

GET /api/ipam/addresses query params:

ParamDescription
searchFree text search
prefix_idFilter by prefix ID
device_typeFilter by device type
sourceFilter by source
statusFilter by status
site_idFilter by site
sortsubnet | address | last_seen | type
limitPage size (default: 100)
offsetPagination offset

Prefixes​

MethodEndpointDescription
GET/api/ipam/prefixesList prefixes
POST/api/ipam/prefixesCreate prefix
PATCH/api/ipam/prefixes/:idUpdate prefix
DELETE/api/ipam/prefixes/:idDelete prefix

VLANs​

MethodEndpointDescription
GET/api/ipam/vlansList VLANs
POST/api/ipam/vlansCreate VLAN
DELETE/api/ipam/vlans/:idDelete VLAN

Sync​

MethodEndpointDescription
POST/api/ipam/sync/flowsDiscover IPs from flow data
POST/api/ipam/sync/devicesSync from devices table
POST/api/ipam/netbox/syncSync from NetBox IPAM

Import​

MethodEndpointDescription
POST/api/ipam/import/apiBulk import JSON records
POST/api/ipam/import/csvImport CSV as request body
GET/api/ipam/import/templateDownload CSV template

Summary​

MethodEndpointDescription
GET/api/ipam/summaryCounts by source, type, activity

Bulk Import via API​

curl -X POST https://YOUR-WHITEOWL/api/ipam/import/api \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"records": [
{
"address": "10.0.1.1",
"hostname": "router1",
"prefix": "10.0.1.0/24",
"owner": "NetOps",
"device_type": "network"
},
{
"address": "10.0.1.10",
"hostname": "server1",
"mac_address": "aa:bb:cc:dd:ee:ff",
"owner": "IT"
}
]
}'

Response:

{
"success": true,
"total": 2,
"inserted": 2,
"updated": 0,
"prefixes_created": 1,
"errors": []
}

CSV Import via API​

curl -X POST https://YOUR-WHITEOWL/api/ipam/import/csv \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: text/csv" \
--data-binary @my-addresses.csv

Database Schema​

-- Subnets / prefixes
CREATE TABLE ipam_prefixes (
id SERIAL PRIMARY KEY,
prefix CIDR NOT NULL,
name VARCHAR(255),
description TEXT,
site_id INTEGER REFERENCES sites(id),
vlan_id INTEGER,
vrf VARCHAR(100) DEFAULT 'Global',
role VARCHAR(50), -- management|transit|access|server|loopback|dmz
status VARCHAR(20) DEFAULT 'active',
source VARCHAR(20) DEFAULT 'manual',
netbox_id INTEGER,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(prefix, vrf)
);

-- Individual IP assignments
CREATE TABLE ipam_addresses (
id SERIAL PRIMARY KEY,
address INET NOT NULL UNIQUE,
prefix_id INTEGER REFERENCES ipam_prefixes(id),
device_id INTEGER REFERENCES devices(id),
mac_address VARCHAR(17),
hostname VARCHAR(255),
dns_name VARCHAR(255),
vendor VARCHAR(255),
device_type VARCHAR(50),
description TEXT,
owner VARCHAR(255),
status VARCHAR(20) DEFAULT 'active',
source VARCHAR(20) DEFAULT 'discovered',
netbox_id INTEGER,
first_seen TIMESTAMPTZ,
last_seen TIMESTAMPTZ,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW()
);

-- VLANs
CREATE TABLE ipam_vlans (
id SERIAL PRIMARY KEY,
vlan_id INTEGER NOT NULL,
name VARCHAR(255),
site_id INTEGER REFERENCES sites(id),
description TEXT,
status VARCHAR(20) DEFAULT 'active',
netbox_id INTEGER,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(vlan_id, site_id)
);

Prefix Assignment Logic​

When an IP address is discovered or imported, it is automatically assigned to a prefix using PostgreSQL's << (contained within) operator:

UPDATE ipam_addresses a
SET prefix_id = p.id
FROM ipam_prefixes p
WHERE a.address << p.prefix
AND (a.prefix_id IS NULL OR a.prefix_id != p.id)

This runs:

  • After every flow sync
  • After every device sync
  • Immediately when a new prefix is created
  • After every CSV/API import

This means you can add prefixes at any time and existing addresses will be automatically assigned on the next operation — no manual re-sync required.


Planned Enhancements​

  • DHCP integration — parse DHCP ACK messages from syslog to track dynamic leases in real time
  • Prefix → flow tags sync — IPAM becomes the source of truth for flow tag CIDRs, replacing the separate flow tag management UI
  • DNS reverse lookup — auto-populate hostname from PTR records using the existing DNS resolver
  • Subnet utilization alerts — alert when a prefix exceeds 80% utilization
  • IPv6 support — extend prefix and address tables for IPv6 CIDR management
  • Parent/child prefix hierarchy — 10.0.0.0/8 → 10.0.1.0/24 tree view