Designing an addressing plan
Build a hierarchical addressing plan (region, site or service, function, VLAN) on nibble boundaries. Size end-site assignments (/48 for businesses, /56 for homes, a routed /64 per VPS) and reserve space for growth. Calculate any customer's or VLAN's prefix directly from the plan's rules. Encode useful meaning in the plan without leaking sensitive information.
Take the quiz · pass mark 70% · 10 questions
Explanation
An addressing plan is a set of rules that turns facts ("business customer 1000", "site 5, VLAN 120") into prefixes. A good plan lets anyone in the team work out a prefix in their head, makes routes and filters summarise cleanly, and still has free space in ten years. This lesson builds two plans: one for an ISP and hosting provider (the ictNetworks scenario), and one for a multi-site enterprise (your lab).
Principles
- Follow the routing hierarchy. Allocate so that everything behind one router, PoP, BNG or data centre falls inside one prefix. Then one summary route and one filter line cover it.
- Stay on nibble boundaries. Use /32, /36, /40, /44, /48, /52, /56, /60 and /64 where you can. Each level is then one or more whole hex digits, and reverse DNS delegation (L2.07) is clean.
- Be generous to end sites. RFC 6177 asks for multiple subnets for every end site, and RFC 7934 for many addresses per host. You save nothing by being stingy. You only create renumbering work later.
- Reserve for growth. Leave the neighbouring space of each block free, so that a block can grow by shortening its prefix rather than by adding a second, unrelated block. RFC 3531 describes a flexible way to do this: assign high-level bits from the left, low-level bits from the right, and leave the middle free until you know which level grows.
- Prefer simple, readable rules. "The fourth group is the VLAN number in hex" beats a clever scheme that saves two bits.
- Do not leak what should stay private. Prefixes appear in traceroutes, logs, reverse DNS and abuse reports. Building names, VLAN numbers and service types are usually fine. Customer account numbers, the exact location of security systems, or a person's name are not.
Steps
- Inventory: count regions, sites or PoPs, services, customers by type, and VLANs per site, with ten-year growth estimates.
- Choose end-site sizes: for example a /48 per business or enterprise site, a /56 per home, and a /64 per VPS or per LAN.
- Choose the levels of the hierarchy and how many bits each needs, rounded up to a nibble.
- Write the rules as formulas: "business customer n gets
3fff:a00:2000::/36+ n as a /48". - Mark reserves explicitly, so nobody "borrows" them.
- Document and import the plan into IPAM (L2.08).
The ictNetworks scenario plan
The provider has 3fff:a00::/32 (65,536 /48s). The first hex digit of the third group, which gives 16 /36s, defines the top level:
| Block | Use | Rule |
|---|---|---|
3fff:a00::/36 | Infrastructure | 3fff:a00::/48 holds loopbacks, point-to-point links and management (L2.05). The rest is reserved. |
3fff:a00:1000::/36 | Hosting (data centres) | 16 data centres as /44s. Each DC has 16 Proxmox clusters as /48s. Each VPS gets one routed /64 (L2.03). |
3fff:a00:2000::/36 | Business customers | One /48 per customer: customer n (0 to 4,095) gets 3fff:a00:2000::/36 + n. |
3fff:a00:3000::/36 to 3fff:a00:7000::/36 | Reserved | Growth for business and hosting, kept next to them |
3fff:a00:8000::/33 | Residential | Eight /36 regions. Each region holds up to 16 BNGs as /40s, and each BNG serves up to 65,536 homes as /56s. |
Drawing diagram…
Why these choices:
- Business /48 and residential /56 follow RFC 6177 practice and common RIR guidance. RIPE-690 (an operator best-practice document, not an RFC) is good further reading on persistent prefixes and sizes for end users.
- Residential is the largest block because it has the most customers: 8 regions × 16 BNGs × 65,536 homes = 8,388,608 /56s, using half of the /32.
- A /40 per BNG means each BNG announces one aggregate. On a MikroTik RouterOS BNG, the delegation pool is one line:
/ipv6 pool add name=bng2-pd prefix=3fff:a00:8200::/40 prefix-length=56, used by the DHCPv6 server with/ipv6 dhcp-server add name=pd-bng2 interface=<access-if> prefix-pool=bng2-pd(RouterOS v7 syntax). - Hosting gives each VPS a routed /64, not an address from a shared /64. A customer's prefix is routed to their VM, so they can use as many addresses as they want, and one prefix can be filtered without touching neighbours (L2.05 shows the routing).
- Reserves sit next to the blocks that will grow. If business customers pass 4,096,
3fff:a00:2000::/36+3fff:a00:3000::/36aggregate into3fff:a00:2000::/35.
The enterprise plan (your lab block)
An enterprise has 2001:db8:3000::/44: 16 /48s, of which 12 are needed now. The rule is site s gets 2001:db8:300s::/48, with s as one hex digit (0 to f). Sites 0 to b are in use and c to f are reserved.
Inside each site's /48, the fourth group is split into function (1 hex digit) + VLAN ID (3 hex digits):
| Fourth group | Function |
|---|---|
0xxx | Infrastructure: 0000 loopbacks (as /128s), 0001 to 0fff point-to-point and transit |
1vvv | User VLANs, vvv = VLAN ID in hex |
2vvv | Server VLANs |
3vvv | Voice |
4vvv | Guest and Wi-Fi |
5xxx to exxx | Reserved |
fvvv | Management (out-of-band) |
So site 5, user VLAN 120 is: site digit 5 → 2001:db8:3005::/48; function 1; 120 = 0x078 → 2001:db8:3005:1078::/64.
A common alternative writes the VLAN number with decimal digits in the hex field (VLAN 120 → …:1120::/64). It is easier to read, but it only works for VLANs up to 999, and it skips the hex values containing a–f. Either choice is fine if it is written down and used consistently. Mixing them is not.
Reserves and growth patterns
- Per-level reserves: in the enterprise plan, sites c to f and functions 5 to e are reserved.
- Bisection (RFC 3531): if you do not know which level will grow, assign the left-hand level from the left (site 0, 1, 2 …) and the right-hand level from the right. The free bits in the middle can later go to either level.
- Sparse customer assignment: some providers leave a free /48 after each business /48 (assign only even indices), so that any customer can grow to a /47 without renumbering. This halves capacity, so decide it up front.
What not to encode
- Customer account numbers or names in the prefix or IID. Use a database lookup instead.
- IPv4 addresses embedded in IPv6 IIDs (for example
::192:0:2:10). These are readable, but they tie the IPv6 plan to the IPv4 plan and reveal it. Use them only for a deliberate transition reason. - Security-sensitive locations (for example "CCTV network in the server room") in reverse DNS names.
Worked examples
Example 1: Business customer prefix
Business customer n = 0x123 (decimal 291) gets 3fff:a00:2000::/36 + 0x123 as a /48. The /48 index occupies the last three hex digits of the third group: 3fff:a00:2123::/48.
Example 2: Residential prefix
Region 0, BNG 2 is 3fff:a00:8200::/40. Home index 0x1234 (decimal 4,660) fills hex digits 11 to 14: the last two digits of the third group and the first two of the fourth. Result: 3fff:a00:8212:3400::/56.
Example 3: Capacities
- Homes per BNG /40: 2^(56 − 40) = 65,536.
- Homes per region /36: 2^20 = 1,048,576.
- Homes in the residential /33: 2^23 = 8,388,608.
- Business customers in a /36: 2^12 = 4,096.
Example 4: VPS prefix
DC1 is 3fff:a00:1000::/44, and cluster 3 is the /48 with index 3 inside it: 3fff:a00:1003::/48. VPS 300 (0x12c) gets 3fff:a00:1003:12c::/64. The VPS can configure 3fff:a00:1003:12c::1 for its main service address.
Example 5: Enterprise VLAN
Site 11 (0xb), server VLAN 200 (0x0c8): 2001:db8:300b::/48, function 2 → 2001:db8:300b:20c8::/64. Site 5, user VLAN 120 → 2001:db8:3005:1078::/64.
Example 6: Growing a block
The business block 3fff:a00:2000::/36 fills up. Its neighbour 3fff:a00:3000::/36 was reserved. The two aggregate exactly into 3fff:a00:2000::/35 because 0x2 is even, so the business filter becomes one line.
Lab
Goal: Produce a complete, defensible addressing plan for a 12-site enterprise from 2001:db8:3000::/44, and defend it in a peer review.
You need: A spreadsheet, or Python with ipaddress. Keep the result: L2.07 (reverse DNS) and L2.08 (IPAM) build on it.
Step 1: Requirements
The enterprise has an HQ (site 0) with 40 VLANs, two data-centre sites (1 and 2) with 120 server VLANs each, and nine branches (3 to b) with up to 8 VLANs each. It expects up to 4 more sites within five years. All sites need loopbacks, point-to-point links to the WAN, a management network, guest Wi-Fi and voice.
Step 2: Write the rules
Write your rules as formulas, as in this lesson. You may use the function + VLAN scheme shown above or design your own. If your scheme differs, explain why.
Step 3: Generate the plan
Write plan.py that applies your rules and outputs a CSV with one row per prefix: site, function, vlan, prefix, description. Check with ipaddress that no two prefixes overlap and that every prefix lies inside 2001:db8:3000::/44.
Step 4: Check the summaries
For each site, show the single /48 that summarises it, and show that the four reserved sites summarise as 2001:db8:300c::/46.
Step 5: Peer review
Swap plans with another learner. Each reviewer answers: Can I calculate a VLAN's prefix without the spreadsheet? Where will this plan run out first? Does anything in it leak sensitive information? Is reverse DNS delegation clean?
What to submit
The rules (half a page), plan.py, the CSV, the summary check output, and your responses to the peer review.
Summary
- A plan is a set of rules. Follow the routing hierarchy, use nibble boundaries, be generous to end sites (RFC 6177, RFC 7934), and reserve space next to blocks that will grow (RFC 3531).
- Scenario rules: business customer n →
3fff:a00:2000::/36+ n as a /48. Home k on BNG b → the /40 for that BNG + k as a /56. VPS v → cluster /48 + v as a /64. - Enterprise rules: site s →
2001:db8:300s::/48. Fourth group = function digit + VLAN ID in hex. - Neighbouring reserves allow growth by aggregation, for example two /36s into one /35.
- Encode structure, not secrets: no account numbers, names or sensitive locations.
- Next lesson (L2.05): numbering the network itself, from loopbacks to point-to-point links.
Quiz imported · 10 questions · pass mark 70%. Lab questions are not auto-marked.