Reconciling Network Data: Sources, Source of Truth, and Who Wins

2026-11-24

Every network team I know has the same quiet problem: the network says one thing, the spreadsheet says another, the CMDB says a third, and the monitoring tool has a fourth opinion. Before you can automate anything, you have to know which one is right.

This post covers why reconciliation is hard, the mistakes that keep showing up, and a practical way to fix it without a six-month "data cleanup project".

Why the data never agrees

Network data comes from many places, and each one is correct about something different.

Source What it knows well Where it goes wrong
Live devices (CLI, NETCONF, gNMI) What is actually running right now Says nothing about intent. A mistake looks the same as a design.
Source of truth (NetBox, Nautobot, Infrahub) What the network should look like Only as good as the last person who updated it
CMDB / ITSM Ownership, contracts, business service mapping Updated by process, not by the network. It drifts fast.
Monitoring / NMS What is reachable and alive Discovers by polling, so it misses anything that is quiet
IPAM / DNS / DHCP Addresses and names Stale records for hosts that no longer exist
Spreadsheets and Visio Historical context nobody wrote down elsewhere Everything, eventually

None of these is "the truth". They are witnesses, and reconciliation is the job of working out which witness to believe for which question.

Common issues

1. No agreed source of truth. Two teams each keep their own inventory and both think theirs is authoritative. Every sync becomes an argument.

2. One source "wins" for everything. Teams pick a single winner, such as "NetBox always wins", then discover the device has the right VLAN and NetBox has the typo. A blanket rule is wrong for roughly half the fields.

3. Identity mismatch. The same device is sw-core-01 in NetBox, SW-CORE-01.corp.local in the CMDB, and 10.0.0.1 in monitoring. If you can't match records, you can't compare them. Most "data quality" problems are really key problems.

4. Intent versus state confusion. An interface being down is state. An interface being meant to be down is intent. Mixing them creates false drift alerts forever.

5. Timing. The live device was polled at 02:00 and the SoT was edited at 09:00. The two differ, and neither is wrong. They just describe different moments.

6. Format and normalisation. GigabitEthernet0/1 against Gi0/1 against ge-0/0/1. MAC addresses with dots, colons or dashes. Case differences. Trailing whitespace. These produce thousands of fake differences.

7. Silent overwrites. A sync job "fixes" the difference by overwriting. It overwrites a legitimate emergency change that someone made at 3 a.m. and nobody has documented yet.

8. Fixing symptoms. Someone cleans the data, and three months later it has drifted back because the process that created the bad data never changed.

Which dataset takes precedence?

The key idea: precedence is per field, not per system. Ask "who is the authority for this attribute?" for each attribute.

A practical starting point:

Attribute Authority Why
Device role, site, tenant, rack position Source of truth It is design intent. Humans decide it.
Intended IPs, VLANs, VRFs, circuits Source of truth Intent. Planned before it is built.
Serial number, hardware model, OS version Device The device knows what it is. Nobody types this better.
Operational state (up/down, neighbours, routes) Device / telemetry It is observed, so it can't be "intended".
Actual running config Device It is reality. Compare it against intent.
Owner, cost centre, support contract CMDB / ITSM Business data the network doesn't hold.
Hostname and management IP Source of truth, validated by device It is the identity key. Mismatches must be flagged.

Two simple rules sit behind that table:

A practical approach

You don't need a perfect model. You need a loop that you can start small and tighten over time.

Step 1: Pick one source of truth, and write down its scope. It doesn't have to cover everything. Say what it owns (for example sites, devices, IPs, VLANs, circuits) and publish that list. Anything outside the scope belongs to another system, and that is fine.

Step 2: Fix identity first. Choose a stable key per object. A device's serial number or an immutable ID is better than a hostname, because names change. Keep a mapping table for the aliases you inherit. Do this before touching any other data.

Step 3: Normalise before you compare. Write small functions that canonicalise interface names, MAC addresses, casing and whitespace, and run both sides through them. This alone removes a large share of the "differences".

import re

def norm_intf(name: str) -> str:
    n = name.strip().lower()
    n = re.sub(r"^gigabitethernet", "gi", n)
    n = re.sub(r"^tengigabitethernet", "te", n)
    return n

def norm_mac(mac: str) -> str:
    return re.sub(r"[^0-9a-f]", "", mac.lower())

Step 4: Define precedence per field, as data. Keep the rules in a small file next to your code, not in people's heads. That makes the rules reviewable.

fields:
  site:         { authority: sot }
  vlan_intent:  { authority: sot }
  serial:       { authority: device, on_diff: update_sot }
  os_version:   { authority: device, on_diff: update_sot }
  oper_status:  { authority: device, on_diff: ignore_for_intent }
  owner:        { authority: cmdb }
  hostname:     { authority: sot,    on_diff: alert }

Step 5: Classify every difference. Don't treat all differences alike. There are about four useful outcomes:

  1. Auto-fix: safe and low-risk (for example, the OS version in the SoT is behind the device).
  2. Fix with approval: a human confirms before the change (for example, an IP mismatch).
  3. Alert only: it might be an outage or an attack (for example, an unknown device on the network).
  4. Accept: a documented exception, recorded with an owner and an expiry date.

Step 6: Run it read-only first. For the first few weeks, only report. Look at the diffs and you will find that most of them are normalisation bugs and identity problems, which you fix in your rules and not in the data. Turn on write-back only after the report is quiet.

Step 7: Make it continuous, and fix the cause. Run the comparison on a schedule or in CI. For every recurring difference, ask which process creates it. If engineers add VLANs on the CLI because the SoT workflow is too slow, the problem is the workflow. Making the right path easy is what keeps data clean.

Quick checklist

Closing thought

Reconciliation is not a one-off cleanup. It is a feedback loop between what you intended and what exists. The aim isn't zero differences. It is that every difference is visible, explained, and owned.

In a follow-up post I'll walk through a worked example: pulling devices from a live network and from NetBox, normalising them, and producing a drift report.