Reverse Zones for CIDR Delegation
Minimal reverse DNS zones needed to properly delegate IPv4 and IPv6 CIDR blocks with practical examples.
What are Reverse Zones?
Reverse DNS zones map IP addresses back to domain names using special domains (.in-addr.arpa for IPv4, .ip6.arpa for IPv6). When you're delegated a CIDR block, you need to create the corresponding reverse zones for proper DNS operation. Reverse zones are essential for mail servers, logging, security tools, and network troubleshooting.
How Reverse Delegation Works
Your ISP or RIR delegates reverse DNS authority for your IP blocks to your DNS servers. You then create the reverse zones and populate them with PTR records that map IP addresses to hostnames. The delegation happens at specific boundaries that align with IP addressing hierarchy.
IPv4 Reverse Zones (in-addr.arpa)
Classful Boundaries (Octet-Aligned)
CIDR | Example | Reverse Zone | Description | Delegation |
---|---|---|---|---|
/8 | 10.0.0.0/8 | 10.in-addr.arpa | Entire Class A network | Usually handled by RIRs, not end users |
/16 | 172.16.0.0/16 | 16.172.in-addr.arpa | Class B network | Large organizations or ISPs |
/24 | 192.168.1.0/24 | 1.168.192.in-addr.arpa | Class C network - most common delegation | Standard small business / organization |
Classless Delegation (CNAME Method)
0-25.113.0.203.in-addr.arpa
1-25.113.0.203.in-addr.arpa
64-26.113.0.203.in-addr.arpa
128-27.113.0.203.in-addr.arpa
Practical IPv4 Examples
192.0.2.0/24
2.0.192.in-addr.arpa
1.2.0.192.in-addr.arpa. IN PTR mail.example.com.
10.2.0.192.in-addr.arpa. IN PTR web.example.com.
50.2.0.192.in-addr.arpa. IN PTR server1.example.com.
198.51.100.0/23
100.51.198.in-addr.arpa
101.51.198.in-addr.arpa
IPv6 Reverse Zones (ip6.arpa)
Nibble Boundaries (4-bit Aligned)
CIDR | Example | Reverse Zone | Description | Delegation |
---|---|---|---|---|
/32 | 2001:db8::/32 | 8.b.d.0.1.0.0.2.ip6.arpa | Typical RIR allocation to ISP | RIR delegates to ISP |
/48 | 2001:db8:1234::/48 | 4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa | Typical site allocation | ISP delegates to organization |
/56 | 2001:db8:1234:ab00::/56 | 0.0.b.a.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa | Large home or small business | Common residential allocation |
/64 | 2001:db8:1234:5678::/64 | 8.7.6.5.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa | Single subnet | Individual subnet reverse zone |
Practical IPv6 Examples
2001:db8:1234::/48
4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa
0.0.0.0.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa (/64)
1.0.0.0.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa (/64)
a.b.c.d.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa (/64)
Creating Reverse Zones
2.0.192.in-addr.arpa
Zone File:
$TTL 86400
2.0.192.in-addr.arpa. IN SOA ns1.example.com. hostmaster.example.com. (
2024010101 ; serial
3600 ; refresh
1800 ; retry
1209600 ; expire
86400 ) ; minimum
IN NS ns1.example.com.
IN NS ns2.example.com.
1 IN PTR mail.example.com.
10 IN PTR web.example.com.
50 IN PTR server1.example.com.
100 IN PTR workstation.example.com.
Explanation:
- Zone name is network reversed + in-addr.arpa
- SOA record defines zone authority and parameters
- NS records point to authoritative name servers
- PTR records map IP to hostname (just last octet for /24)
4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa
Zone File:
$TTL 86400
4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa. IN SOA ns1.example.com. hostmaster.example.com. (
2024010101 ; serial
3600 ; refresh
1800 ; retry
1209600 ; expire
86400 ) ; minimum
IN NS ns1.example.com.
IN NS ns2.example.com.
; Delegate /64 subnets
0.0.0.0 IN NS ns1.example.com.
0.0.0.0 IN NS ns2.example.com.
1.0.0.0 IN NS ns1.example.com.
1.0.0.0 IN NS ns2.example.com.
Explanation:
- Zone name is full prefix in nibble format + ip6.arpa
- Each hex digit becomes separate label in reverse
- Can delegate individual /64 subnets within /48
- Much longer zone names than IPv4
Delegation Scenarios
- Set up DNS servers with reverse zone
- Create PTR records for important hosts
- Test reverse lookups work correctly
- Add NS delegation in parent zone
- Update WHOIS records if required
- Verify customer DNS servers are working
- Create master zone for entire /16
- Delegate individual /24s to department DNS servers
- Each department manages their own PTR records
Troubleshooting
Possible Causes: Zone not delegated, DNS server not responding, PTR records missing
Diagnosis: Use dig -x [ip] to test reverse resolution
Solution: Check delegation, verify DNS server config, add PTR records
Possible Causes: Missing PTR record for mail server IP, PTR doesn't match HELO name
Diagnosis: Check mail server logs, test PTR record
Solution: Create PTR record that matches mail server hostname
Possible Causes: Complex nibble format errors, Zone delegation issues
Diagnosis: Verify zone name format, test with dig -x
Solution: Double-check nibble format, verify IPv6 DNS configuration
Best Practices
- Always create reverse zones for your allocated IP blocks
- Ensure PTR records match forward DNS (A/AAAA records)
- Use consistent naming conventions for reverse records
- Monitor reverse DNS resolution for important services
- Automate PTR record creation/updates where possible
- Test reverse lookups from multiple external locations
- Keep reverse zone serial numbers updated when making changes