Managing address space: IPAM and renumbering readiness
Model an addressing plan in an IPAM tool as aggregates, containers, prefixes and reservations, and report utilisation. Identify hard-coded addresses and other dependencies that block renumbering. Outline a renumbering procedure without a flag day, following RFC 4192. Calculate the timing limits that DNS TTLs and SLAAC lifetimes put on a renumbering.
Take the quiz · pass mark 70% · 10 questions
Explanation
A plan in a spreadsheet goes stale the day after it is written. Level 2 ends with two operational skills: keeping the plan true in an IP Address Management (IPAM) system, and keeping the network able to change prefix without an outage.
IPAM as the source of truth
An IPAM tool stores which prefixes exist, what each one is for, and which are free. The open-source NetBox is used in this lesson's lab, but the concepts apply to any IPAM:
| Concept | Meaning | ictNetworks scenario example |
|---|---|---|
| RIR / aggregate | Space you received from a registry | 3fff:a00::/32 from the RIR |
| Container prefix | A block that is subdivided, not used directly | 3fff:a00:2000::/36 business block |
| Active prefix | Assigned and in use | 3fff:a00:23e8::/48 customer 1000 |
| Reserved prefix | Deliberately kept free | 3fff:a00:3000::/36 growth reserve |
| Deprecated prefix | Being phased out (for example during renumbering) | the old prefix in this lesson's procedure |
| Role, site, tenant, VLAN | Metadata that makes the plan searchable | role "residential-pd", site "BNG-2" |
| IP address | An individual assignment | loopback 3fff:a00::1a/128 |
The value of IPAM comes from automation. If router configs, reverse DNS zones (L2.07), DHCPv6 pools, firewall objects and customer provisioning are all generated from IPAM, the plan cannot drift away from reality. NetBox, for example, offers an API endpoint that returns the next available child prefix of a given length. Provisioning a new business customer then becomes one API call instead of a spreadsheet search.
Utilisation is the other key report: how full is each container? For example, if 1,229 of the 4,096 /48s in the business block are assigned, utilisation is 1,229 / 4,096 ≈ 30%. Track this over time to know when to open a reserve (L2.04) or request more space from the RIR (L2.02).
Why renumbering happens
IPv6 makes renumbering more likely than people expect:
- An enterprise with PA space changes ISP (L2.02).
- A residential delegated prefix changes after a CPE reboot or a provider network change.
- Mergers, network consolidation, or moving from PA to PI.
- Correcting an early plan that ignored nibble boundaries or growth.
RFC 4192 describes how to renumber without a flag day (a planned outage). RFC 7010 analyses what still makes it hard.
What gets in the way
RFC 4192 section 1.3 and RFC 7010 list the places where addresses hide. The most common ones are:
- Router and switch configuration: interface addresses, static routes, prefix lists and routing policy.
- Filters: ACLs, firewall rules and security groups, including partners' and customers' allow-lists that you do not control.
- DNS: forward and reverse zones, glue records, and the TTLs that decide how long old answers stay cached.
- Service endpoints configured by address: NTP, syslog, SNMP and RADIUS servers, VPN peers, DHCPv6 relay targets.
- Applications: address literals in config files, licence servers tied to an address, and applications that resolve a name once at start-up and cache it.
- Values derived from addresses: RFC 7010 mentions deriving an IS-IS NET from the loopback address. Monitoring systems keyed on IP addresses are similar.
Ways to reduce the work:
- Use names instead of literals wherever the software allows it, and keep DNS TTLs moderate.
- Use objects or variables in configs (prefix-list objects, firewall address objects) so that each prefix appears once per device.
- Generate configs from IPAM, so that renumbering is a data change followed by a regeneration.
- Use ULA for stable internal services where appropriate (L2.06). Internal references then do not change when the global prefix does.
- Keep an inventory of external parties that filter on your addresses.
The RFC 4192 procedure
Drawing diagram…
The key ideas:
- Both prefixes coexist for a while. IPv6 hosts handle several addresses naturally (L2.06), which is what makes a flag-day-free renumbering possible.
- Deprecate, don't delete: advertising the old prefix with preferred lifetime 0 stops new connections from using it, while existing connections keep working until the valid lifetime runs out.
- Lower DNS TTLs in advance. A record cached with the old TTL can be served until that TTL expires, so lower the TTL at least one old-TTL period before you change the records.
- Watch before you remove. RFC 4192 warns that applications cache addresses in many ways. Use tools such as
ssornetstatand flow logs to confirm that the old prefix is no longer in use.
SLAAC lifetimes and the two-hour rule
RFC 4862 (section 5.5.3) protects hosts from forged RAs that try to expire their addresses. When a host receives an unauthenticated RA for a prefix it already uses:
- If the advertised valid lifetime is more than 2 hours, or more than the remaining lifetime, the host uses the advertised value.
- If the remaining lifetime is 2 hours or less, the host ignores the advertised valid lifetime.
- Otherwise, the host sets the remaining valid lifetime to 2 hours.
(An RA authenticated with SEND, RFC 3971, is exempt, but SEND is rarely deployed.) So you cannot make hosts drop an old SLAAC address in less than about two hours by sending a short valid lifetime. You can only stop them preferring it immediately (preferred lifetime 0). Plan the removal step accordingly, or lower the advertised lifetimes well before the renumbering.
Worked examples
Example 1: Utilisation
The business container 3fff:a00:2000::/36 has 4,096 /48s. 1,229 are assigned (indices 0 to 1,228). Utilisation is 1,229 / 4,096 = 0.300…, which is 30%.
Example 2: Next free prefix
With indices 0 to 1,228 used contiguously, the next free /48 has index 1,229 = 0x4cd: 3fff:a00:24cd::/48. In NetBox you would ask the container's "available prefixes" for a /48 instead of calculating it yourself.
Example 3: DNS TTL lead time
A server's AAAA record has TTL 86,400 seconds (24 hours). You lower it to 300 seconds. Resolvers that cached the record just before the change can keep the old TTL, so you must wait at least 24 hours before changing the address in DNS, after which the change propagates within 5 minutes.
Example 4: The two-hour rule, case 3
A host's SLAAC address from the old prefix has 30 days of valid lifetime left. The router sends the old prefix with valid lifetime 600 seconds. 600 seconds is not more than 2 hours or the remaining lifetime, and the remaining lifetime is more than 2 hours, so the host sets the remaining valid lifetime to 7,200 seconds (2 hours).
Example 5: The two-hour rule, case 2
Another host's address has only 3,600 seconds (1 hour) of valid lifetime left when the same RA arrives. The remaining lifetime is 2 hours or less, so the host ignores the advertised valid lifetime: the address expires in 3,600 seconds, as before.
Example 6: Renumbering a site
An enterprise site moves from 2001:db8:3005::/48 (old ISP, PA) to 2001:db8:3805::/48 (new ISP). Because its plan rules are relative (function digit + VLAN), user VLAN 120 moves from 2001:db8:3005:1078::/64 to 2001:db8:3805:1078::/64. Only the /48 changes, and a generated config changes in one place.
Lab
Goal: Import your L2.04 enterprise plan into NetBox, allocate prefixes through the API, and produce a per-site allocation report. Then write a renumbering runbook for one site.
You need: Docker with Compose and the community netbox-docker project (follow its quick-start), Python 3 with pynetbox (pip install pynetbox), and your L2.04 CSV.
Step 1: Start NetBox
Bring up NetBox with netbox-docker, create a superuser, and create an API token.
Step 2: Model the space
Create an RIR entry (for the lab, call it "Documentation"), an aggregate 2001:db8:3000::/44, sites 0 to b, and the roles you used (users, servers, voice, guest, management, infrastructure). Create each site's /48 as a container and mark sites c to f as reserved.
Step 3: Import the plan
Write import_plan.py that reads your CSV and creates each /64 as an active prefix with its site, role, VLAN and description. Make the script idempotent: running it twice must not create duplicates. NetBox's data model changes between major versions (for example, how a prefix is linked to a site), so check the API documentation of the version you run.
Step 4: Allocate through the API
Use the container's available-prefixes endpoint to allocate the next free /64 in site 3's server range and print it. Confirm that it matches what your L2.04 rules predict.
Step 5: Report
Write report.py that prints, for each site: the /48, the number of active /64s, utilisation as a percentage of the /48 and of each function range, and the next free /64 per function.
Step 6: Renumbering runbook
For site 5, write a one-page runbook to move it from 2001:db8:3005::/48 to 2001:db8:3805::/48 following the RFC 4192 steps. Include TTL and RA lifetime values with timings, a list of hard-coded dependencies to check (using RFC 7010's categories), and how IPAM drives the change.
What to submit
The two scripts, the report output, the API allocation output, and the runbook.
Summary
- IPAM is the source of truth: aggregates, containers, active, reserved and deprecated prefixes, plus metadata. Generate configs, DNS and provisioning from it, and track utilisation.
- Renumbering happens (PA changes, delegated-prefix changes, mergers). RFC 7010 lists where addresses hide: configs, filters, DNS, service endpoints, applications and derived values.
- RFC 4192: run both prefixes side by side, move DNS, deprecate the old prefix with preferred lifetime 0, observe, then remove. No flag day.
- Lower DNS TTLs one old-TTL period in advance. The RFC 4862 two-hour rule stops unauthenticated RAs from expiring addresses faster than about two hours.
- Relative plan rules make renumbering a change of one prefix.
- Level 2 is complete. Level 3 takes these addresses onto real LANs: Neighbor Discovery, Router Advertisements and DHCPv6 in depth.
Quiz imported · 10 questions · pass mark 70%. Lab questions are not auto-marked.