IPAM/DNS Reconciliation Audit
IP Address Management (IPAM) and DNS record reconciliation audit for
assessing the accuracy and health of IP address allocations, subnet
utilization, and DNS records. This skill provides a systematic
methodology for comparing IPAM-recorded state against live subnet
activity and DNS resolution results — identifying conflicts,
orphaned records, exhaustion risks, and stale entries that degrade
network reliability.
IPAM systems maintain the authoritative record of how IP address
space should be allocated: prefix hierarchies, subnet assignments,
VLAN mappings, static reservations, and DHCP scopes. DNS servers
maintain the mapping between names and addresses. Live network
state — ARP tables, DHCP leases, and actual DNS resolution — reveals
what the network actually looks like. The gap between recorded
allocations and live reality is the reconciliation target.
This skill complements source-of-truth-audit (which covers the
full device inventory) by focusing specifically on IP address and
DNS record accuracy. Reference references/cli-reference.md for
DNS query tools, ARP/neighbor table commands, DHCP inspection, and
IPAM API patterns. Reference references/subnet-dns-reference.md
for RFC allocation guidance, CIDR math, DNS record types, and DHCP
scope planning.
When to Use
- - Subnet exhaustion investigation — determining actual utilization when IPAM shows a prefix nearing capacity
- DNS troubleshooting — validating forward/reverse consistency when name resolution failures occur
- IP conflict diagnosis — tracking duplicate IP assignments causing intermittent connectivity
- Pre-migration planning — auditing IP allocations before data center moves or re-addressing projects
- DHCP scope health check — verifying lease utilization and scope configuration against IPAM records
- Compliance audit — demonstrating IP address accountability for regulatory or internal governance requirements
- Post-change verification — confirming that IP moves, DNS updates, or subnet resizing are reflected in IPAM
Prerequisites
- - IPAM data access — read-only access to the IPAM platform via API or export; for NetBox IPAM module: API token with IPAM read permissions; for Infoblox: WAPI credentials with network/record read access; for BlueCat: API credentials with Address Manager read access
- DNS server access — ability to query authoritative DNS servers directly (not just recursive resolvers); zone transfer (AXFR) access preferred for comprehensive audits; at minimum, individual record lookups via
dig or nslookup against the authoritative server - Network device access — read-only credentials for switches and routers to collect ARP tables and DHCP relay information; SNMP v2c/v3 community strings or SSH access for CLI commands
- Scope definition — target subnets, VRFs, and DNS zones identified before the audit begins; large environments should scope by site, VRF, or /16 aggregate to keep the audit manageable
- Baseline IPAM expectations — understand what the IPAM is expected to track: all IPs including DHCP dynamics, or only static allocations? This determines what constitutes a "gap" versus expected behavior
Procedure
Follow these six steps sequentially. Each step builds on the
previous — IPAM extraction and live discovery feed the diff and
conflict detection, which feeds utilization analysis, culminating
in the reconciliation report.
Step 1: IPAM Inventory Analysis
Extract authoritative IP allocation data from the IPAM system to
build a complete picture of intended address space usage.
Prefix Hierarchy Review — Export the prefix hierarchy for in-scope
VRFs. Verify supernet/subnet containment: every child prefix must be
within its parent aggregate. Identify orphaned prefixes (no parent)
and overlapping definitions (same address space in same VRF). See
references/cli-reference.md for IPAM API patterns (NetBox, Infoblox,
BlueCat).
VLAN-to-Subnet Mapping — Cross-reference VLAN assignments with
prefix VLAN fields. Flag VLANs with no subnet (unused or misconfigured)
and subnets with no VLAN association (missing metadata).
IP Reservation Audit — Categorize IPs by status: static, DHCP pool,
reserved (gateways, HSRP/VRRP VIPs), and available. Verify gateway IPs
are marked reserved. Check for IPs marked "Active" with no device or
interface record — orphaned allocations.
IPv4 Exhaustion Assessment — Calculate raw utilization per subnet:
assigned addresses / total usable addresses. Flag prefixes above
threshold (typically 80% warning) and identify remaining contiguous
free blocks.
Step 2: Live Subnet Discovery
Discover actual IP address usage to compare against IPAM records.
No single source captures all active addresses — multiple collection
methods are required.
ARP Table Analysis — Collect ARP tables from Layer 3 gateways
for each in-scope subnet. Each ARP entry represents a recently active
IP. On Cisco IOS: show ip arp vrf <name>. On Juniper JunOS:
show arp interface <l3-interface>. On Arista EOS: show ip arp vrf <name>.
DHCP Lease Correlation — Extract active leases from the DHCP
server. Compare against IPAM DHCP scope definitions to ensure
boundaries match. Identify leases outside defined scopes — these
indicate misconfigured or rogue DHCP servers.
Ping Sweep Validation — For subnets where ARP data is incomplete
(routed subnets with no local L3 interface), use ICMP sweeps:
nmap -sn <prefix> or fping -g <prefix>. Non-responding IPs are
not necessarily unused — firewalls may block ICMP.
Duplicate IP Detection — Analyze ARP tables for multiple MAC
addresses on the same IP (gratuitous ARP conflicts). Rapidly
alternating MACs for a single IP indicate active conflicts causing
intermittent connectivity.
Step 3: DNS Record Audit
Audit DNS records for consistency, accuracy, and hygiene. DNS errors
cause application failures often misdiagnosed as network issues.
Forward/Reverse Consistency — For each A record, verify a
corresponding PTR record points back to the same hostname. For each
PTR, verify the referenced hostname has a matching A record. Use
dig +short <hostname> A and dig +short -x <ip> to test pairs.
Inconsistencies break reverse DNS used by mail servers, logging, and
security tools.
Stale Record Detection — Cross-reference A records against IPAM
and live ARP tables. A records pointing to IPs that IPAM shows as
available or decommissioned are stale. Records pointing to IPs with
no ARP activity for 90+ days may reference removed hosts.
CNAME Chain Validation — Verify CNAME records resolve to valid
targets. Flag chains longer than two hops (add latency and fragility).
Verify no CNAME exists at a zone apex or alongside MX/NS records
(RFC 1034 prohibition).
Delegation Chain Integrity — Verify NS records for delegated zones
point to responding servers. Check MX records resolve to A records
(not CNAMEs, per RFC 2181). Validate SOA serial numbers across primary
and secondary servers for replication currency.
TTL Review — Audit TTL appropriateness: infrastructure records
(NS, MX, SOA) should use 3600–86400s; frequently changing records
(load balancers, failover) need 60–300s; static host records
typically use 3600s.
Step 4: Conflict Detection
Identify conflicts that cause operational problems — higher severity
than record hygiene issues from Step 3.
Overlapping Subnet Definitions — Compare all prefix entries within
each VRF for overlaps. Two /24 prefixes covering the same range, or a
/24 outside its documented /16 parent, indicate data entry errors. Use
bitwise comparison to detect non-obvious overlaps (e.g., 10.1.0.0/23
and 10.1.1.0/24).
Duplicate IP Assignments — Cross-reference IPAM assignments with
live ARP. Two IPAM records for the same IP in the same VRF is a data
conflict. Two MACs for the same IP in ARP is a live conflict. Either
causes packet loss and needs immediate remediation.
DNS Record Conflicts — Multiple A records for the same hostname
(without intentional round-robin) indicate misconfiguration. CNAME
records conflicting with other types at the same name violate
standards. PTR records with no matching forward A record are orphaned.
Orphaned PTR Records — Reverse zone entries pointing to hostnames
with no forward A record, or to IPs that IPAM shows unallocated. These
accumulate after decommissions when reverse zones are not cleaned.
Audit by iterating PTR records and performing forward lookups.
Step 5: Utilization Reporting
Compute utilization metrics for capacity planning, exhaustion risk
identification, and overprovisioning detection.
Subnet Utilization Calculation — For each prefix:
utilization = allocated_addresses / usable_addresses × 100%.
Usable addresses exclude network and broadcast. Compare IPAM-calculated
vs ARP-based utilization (active IPs vs total) — significant divergence
indicates stale IPAM data.
Threshold Classification — Apply standard thresholds: >90% critical
(expand immediately), >80% warning (plan within quarter), 50–80%
healthy, <20% oversized (reclaim candidate). DHCP pools tolerate
higher utilization than static ranges.
DHCP Scope Exhaustion Projection — Calculate remaining leases per
scope and project time-to-exhaustion based on lease growth rate. Scopes
with <10% free and growing demand need immediate expansion or lease
time reduction.
IPv6 Adoption Coverage — For dual-stack environments, measure the
percentage of subnets with corresponding IPv6 prefixes. Track GUA vs
ULA adoption rates. Identify IPv4-only sites as migration gaps.
Step 6: Reconciliation Report
Compile findings into a structured report with health scores,
conflict inventory, and actionable remediation.
IPAM Health Scorecard — Aggregate subnet utilization distribution,
IPAM-vs-live accuracy, prefix hierarchy integrity, and VLAN mapping
completeness into a composite health score.
DNS Audit Findings — Summarize forward/reverse consistency rate,
stale record count, CNAME chain issues, and delegation integrity.
Group by zone for targeted remediation.
Conflict Inventory — List conflicts ordered by severity: duplicate
IPs first (packet loss), overlapping subnets second (routing ambiguity),
DNS conflicts third (resolution failures). Include affected hosts and
recommended resolution.
Capacity Planning Recommendations — Identify subnets needing
expansion within 90 days, recommend oversized subnet reclamation,
suggest DHCP scope adjustments, and flag IPv6 migration gaps.
Threshold Tables
| Metric | Good | Warning | Critical | Notes |
|---|
| Subnet utilization | <80% | 80–90% | >90% | Per-prefix allocated/usable ratio |
| DHCP scope free |
>20% | 10–20% | <10% | Remaining leases in scope |
| Forward/reverse match | ≥95% | 85–95% | <85% | A records with valid PTR |
| Stale A records | <5% | 5–15% | >15% | A records pointing to inactive IPs |
| IPAM vs ARP accuracy | ≥90% | 80–90% | <80% | IPAM entries confirmed by ARP |
| Duplicate IPs detected | 0 | 1–3 | >3 | Per-VRF duplicate IP count |
| Orphaned PTRs | <5% | 5–15% | >15% | PTR records with no forward match |
| VLAN-subnet mapping | ≥95% | 85–95% | <85% | VLANs with correct subnet association |
| IPv6 dual-stack coverage | ≥80% | 50–80% | <50% | Subnets with IPv6 counterparts |
Decision Trees
CODEBLOCK0
Report Template
CODEBLOCK1
Troubleshooting
ARP tables show fewer IPs than expected — ARP entries expire
(240s on Cisco, 1200s on Juniper). Collect during peak usage for
maximum coverage. Devices communicating only within the same VLAN
(L2 adjacent) may not appear in router ARP — check switch MAC
tables. Ping sweeps supplement ARP for idle subnets.
DNS zone transfer (AXFR) denied — Many servers restrict AXFR
to authorized secondaries. Fall back to individual lookups for
known hostnames using dig @<auth-server> <name> A. Slower but
avoids AXFR permissions. Check allow-transfer (BIND) or zone
transfer settings (Windows DNS).
DHCP lease data unavailable — If the DHCP server is not
directly accessible, check IPAM platforms that sync DHCP natively
(Infoblox manages DHCP; NetBox requires external sync).
Alternatively, analyze relay statistics:
show ip dhcp relay statistics.
Subnet utilization mismatch between IPAM and ARP — IPAM shows
high allocation but ARP shows few active hosts, indicating stale
records. Cross-reference against device inventory (source-of-truth-audit
skill). Clean stale allocations to restore accurate metrics.
Overlapping subnets not detected — Overlap detection requires
VRF-scoped comparison. Multi-VRF environments legitimately overlap
(e.g., 10.0.0.0/8 in multiple VRFs). Verify IPAM VRF assignments
are correct — wrong VRF produces false alerts or misses real overlaps.
IPv6 utilization always ~0% — IPv6 /64 subnets have 2^64
addresses, making percentage meaningless. Measure by active host
count instead. Focus audits on prefix hierarchy (/48 per site,
/64 per VLAN) rather than per-subnet exhaustion.
IPAM/DNS 一致性审计
IP地址管理(IPAM)与DNS记录一致性审计,用于评估IP地址分配、子网利用率和DNS记录的准确性与健康度。该技能提供了一套系统化的方法论,用于将IPAM记录的状态与实时子网活动及DNS解析结果进行对比——识别冲突、孤立记录、耗尽风险以及降低网络可靠性的过期条目。
IPAM系统维护着IP地址空间应如何分配的权威记录:前缀层级结构、子网分配、VLAN映射、静态预留和DHCP作用域。DNS服务器维护着名称与地址之间的映射关系。实时网络状态——ARP表、DHCP租约和实际DNS解析——揭示了网络实际的样子。记录分配与现实之间的差距就是一致性审计的目标。
该技能通过专门聚焦IP地址和DNS记录准确性,对真实来源审计(涵盖完整设备清单)形成补充。DNS查询工具、ARP/邻居表命令、DHCP检查和IPAM API模式请参考references/cli-reference.md。RFC分配指南、CIDR计算、DNS记录类型和DHCP作用域规划请参考references/subnet-dns-reference.md。
使用场景
- - 子网耗尽调查——当IPAM显示前缀接近容量时,确定实际利用率
- DNS故障排查——名称解析失败时,验证正向/反向一致性
- IP冲突诊断——追踪导致间歇性连接的重复IP分配
- 迁移前规划——在数据中心搬迁或重新编址项目前审计IP分配
- DHCP作用域健康检查——对照IPAM记录验证租约利用率和作用域配置
- 合规审计——为监管或内部治理要求证明IP地址可问责性
- 变更后验证——确认IP迁移、DNS更新或子网调整已反映在IPAM中
前提条件
- - IPAM数据访问——通过API或导出对IPAM平台的只读访问;对于NetBox IPAM模块:具有IPAM读取权限的API令牌;对于Infoblox:具有网络/记录读取权限的WAPI凭证;对于BlueCat:具有Address Manager读取权限的API凭证
- DNS服务器访问——能够直接查询权威DNS服务器(不仅仅是递归解析器);首选区域传输(AXFR)访问以进行全面审计;至少能通过dig或nslookup针对权威服务器进行单条记录查询
- 网络设备访问——用于收集交换机和路由器ARP表及DHCP中继信息的只读凭证;SNMP v2c/v3团体字符串或用于CLI命令的SSH访问
- 范围定义——在审计开始前确定目标子网、VRF和DNS区域;大型环境应按站点、VRF或/16聚合范围进行划分,以保持审计的可管理性
- 基线IPAM预期——了解IPAM预期跟踪的内容:包括DHCP动态分配的所有IP,还是仅静态分配?这决定了什么是差距与预期行为
操作流程
按顺序执行以下六个步骤。每一步都建立在前一步的基础上——IPAM提取和实时发现为差异和冲突检测提供输入,进而驱动利用率分析,最终形成一致性报告。
步骤1:IPAM清单分析
从IPAM系统中提取权威IP分配数据,构建完整的预期地址空间使用情况图景。
前缀层级审查——导出范围内VRF的前缀层级。验证超网/子网包含关系:每个子前缀必须在其父聚合范围内。识别孤立前缀(无父前缀)和重叠定义(同一VRF中的相同地址空间)。IPAM API模式(NetBox、Infoblox、BlueCat)请参考references/cli-reference.md。
VLAN到子网映射——交叉引用VLAN分配与前缀VLAN字段。标记无子网的VLAN(未使用或配置错误)以及无VLAN关联的子网(缺少元数据)。
IP预留审计——按状态对IP进行分类:静态、DHCP池、预留(网关、HSRP/VRRP VIP)和可用。验证网关IP已标记为预留。检查标记为活跃但无设备或接口记录的IP——孤立分配。
IPv4耗尽评估——计算每个子网的原始利用率:已分配地址/总可用地址。标记超过阈值的前缀(通常80%为警告),并识别剩余的连续空闲块。
步骤2:实时子网发现
发现实际IP地址使用情况,与IPAM记录进行对比。没有单一来源能捕获所有活跃地址——需要多种收集方法。
ARP表分析——从每个范围内子网的三层网关收集ARP表。每个ARP条目代表一个最近活跃的IP。在Cisco IOS上:show ip arp vrf 。在Juniper JunOS上:show arp interface 。在Arista EOS上:show ip arp vrf 。
DHCP租约关联——从DHCP服务器提取活跃租约。与IPAM DHCP作用域定义对比,确保边界匹配。识别作用域外的租约——这些表明存在配置错误或恶意的DHCP服务器。
Ping扫描验证——对于ARP数据不完整的子网(无本地三层接口的路由子网),使用ICMP扫描:nmap -sn 或fping -g 。未响应的IP不一定未使用——防火墙可能阻止ICMP。
重复IP检测——分析ARP表中同一IP上的多个MAC地址(免费ARP冲突)。单个IP的MAC快速交替表明存在活跃冲突,导致间歇性连接。
步骤3:DNS记录审计
审计DNS记录的一致性、准确性和规范性。DNS错误会导致应用程序故障,常被误诊为网络问题。
正向/反向一致性——对于每个A记录,验证对应的PTR记录指向相同的主机名。对于每个PTR,验证引用的主机名具有匹配的A记录。使用dig +short A和dig +short -x 测试配对。不一致会破坏邮件服务器、日志记录和安全工具使用的反向DNS。
过期记录检测——将A记录与IPAM和实时ARP表交叉引用。指向IPAM显示为可用或已退役IP的A记录是过期的。指向90天以上无ARP活动IP的记录可能引用已移除的主机。
CNAME链验证——验证CNAME记录解析到有效目标。标记超过两跳的链(增加延迟和脆弱性)。验证区域顶点或与MX/NS记录共存处不存在CNAME(RFC 1034禁止)。
委派链完整性——验证委派区域的NS记录指向响应的服务器。检查MX记录解析到A记录(而非CNAME,根据RFC 2181)。验证主从服务器之间的SOA序列号,确保复制时效性。
TTL审查——审计TTL的适当性:基础设施记录(NS、MX、SOA)应使用3600–86400秒;频繁变化的记录(负载均衡器、故障转移)需要60–300秒;静态主机记录通常使用3600秒。
步骤4:冲突检测
识别导致操作问题的冲突——严重程度高于步骤3中的记录规范性问题。
重叠子网定义——比较每个VRF内的所有前缀条目是否存在重叠。两个覆盖相同范围的/24前缀,或一个在其记录的/16父范围之外的/24,表明数据录入错误。使用位运算比较检测非明显的重叠(例如,10.1.0.0/23和10.1.1.0/24)。
重复IP分配——将IPAM分配与实时ARP交叉引用。同一VRF中同一IP的两个IPAM记录是数据冲突。ARP中同一IP的两个MAC是实时冲突。两者都会导致丢包,需要立即修复。
DNS记录冲突——同一主机名的多个A记录(非故意轮询)表明配置错误。CNAME记录与同一名称的其他类型冲突违反标准。无匹配正向A记录的PTR记录是孤立的。
孤立PTR记录——指向无正向A记录主机名或IPAM显示未分配IP的反向区域条目。这些在退役后反向区域未清理时积累。通过遍历PTR记录并执行正向查询进行审计。
步骤5:利用率报告
计算利用率指标,用于容量规划、耗尽风险识别和过度配置检测。
子网利用率计算——对于每个前缀:利用率 = 已分配地址 / 可用地址 × 100%。可用地址排除网络地址和广播地址。比较IPAM计算的利用率与基于ARP的利用率(活跃IP与总IP)——显著差异表明IPAM数据过时。
阈值分类——应用标准阈值:>90%严重(立即扩展),>80%警告(本季度内规划),50–80%健康,<20%过大(回收候选)。DHCP池比静态范围能容忍更高的利用率。
DHCP作用域耗尽预测——计算每个作用域的剩余租约,并根据租约增长率预测耗尽时间。空闲<10%且需求增长的作用域需要立即扩展或减少租约时间。
IPv6采用覆盖率——对于双栈环境,测量具有对应IPv6前缀的子网百分比。跟踪GUA与ULA采用率。将仅IPv4站点识别为迁移缺口。
步骤6:一致性报告
将发现结果编译成结构化报告,包含健康评分、