DNS Delegation and Forwarding: Hybrid DNS Architectures
DNS delegation and forwarding (for example, conditional forwarding)
DNS Delegation and Forwarding: Hybrid DNS Architectures
This study guide covers the advanced implementation of DNS delegation and forwarding within the context of AWS Route 53. These mechanisms are critical for multi-account management and hybrid connectivity between AWS VPCs and on-premises environments.
Learning Objectives
By the end of this guide, you should be able to:
- Differentiate between DNS delegation and conditional forwarding.
- Configure subdomain delegation across multiple AWS accounts.
- Implement conditional forwarding rules using Route 53 Resolver.
- Design a hybrid DNS solution that connects VPCs to on-premises data centers.
Key Terms & Glossary
- NS (Name Server) Record: A record that identifies the authoritative DNS servers for a specific zone.
- Delegation: The process of assigning authority for a subdomain from a parent domain to a different set of name servers.
- Conditional Forwarder: A DNS server rule that forwards queries for specific domain names to a designated IP address instead of using standard recursion.
- Route 53 Resolver Endpoint: A specialized network interface in a VPC that allows DNS queries to flow into (Inbound) or out of (Outbound) the VPC.
- Hosted Zone: A container for DNS records that defines how traffic is routed for a specific domain (e.g.,
example.com).
The "Big Idea"
In modern cloud architecture, DNS is rarely centralized. Large organizations use Delegation to decentralize administration (e.g., letting the 'Dev' team manage dev.example.com) and Forwarding to bridge the gap between cloud and legacy infrastructure. Mastery of these concepts ensures that a user in an office in New York can resolve a private IP address for a microservice running in an AWS VPC in Ireland.
Formula / Concept Box
| Mechanism | Best Used For... | Record Type Required |
|---|---|---|
| DNS Delegation | Splitting administrative control of a subdomain to another account/service. | NS Records |
| Conditional Forwarding | Routing queries for a specific external domain (on-prem) from within AWS. | Resolver Rule |
| Standard Forwarding | Routing all DNS traffic that doesn't match a local zone to a specific resolver. | System Level |
Hierarchical Outline
- I. DNS Delegation
- A. Purpose: Distribute DNS management across departments or accounts.
- B. Configuration Steps:
- Create a Hosted Zone in the target (secondary) account.
- Capture the Name Servers provided by the new zone.
- Create an NS Record in the parent (primary) account pointing to those name servers.
- C. Verification: Using tools like
digto trace the referral path.
- II. DNS Forwarding (Route 53 Resolver)
- A. Conditional Forwarding Rules: Defined for specific domain patterns (e.g.,
*.corp.internal). - B. Outbound Endpoints: Required to send queries from AWS to on-premises resolvers.
- C. Inbound Endpoints: Required to allow on-premises clients to resolve AWS Private Hosted Zones.
- A. Conditional Forwarding Rules: Defined for specific domain patterns (e.g.,
- III. Hybrid DNS Workflow
- A. VPC Integration: Associating Private Hosted Zones with specific VPCs.
- B. Shared Services: Using AWS RAM (Resource Access Manager) to share Resolver rules across accounts.
Visual Anchors
DNS Delegation Flow
Hybrid Forwarding Architecture
\begin{tikzpicture}[node distance=2cm, every node/.style={draw, rectangle, align=center, minimum height=1cm}] \node (VPC) [fill=orange!20] {AWS VPC$10.0.0.0/16)}; \node (OUT) [right of=VPC, xshift=2cm, fill=blue!10] {Outbound\Endpoint}; \node (VPN) [right of=OUT, xshift=2cm, shape=ellipse, fill=gray!10] {VPN/Direct Connect}; \node (ONPREM) [right of=VPN, xshift=2cm, fill=green!20] {On-Premises\DNS Resolver};
\draw[->, thick] (VPC) -- node[above]{Query: onprem.internal} (OUT);
\draw[->, thick] (OUT) -- (VPN);
\draw[->, thick] (VPN) -- (ONPREM);\end{tikzpicture}
Definition-Example Pairs
- Zone Referral: The process where a DNS server tells a client, "I don't have this, but go ask these servers over there."
- Example: When
example.comname servers return the NS records formarketing.example.comto the client.
- Example: When
- Recursive Lookup: A query where the DNS client asks a server to provide the complete answer, doing all the legwork itself.
- Example: An EC2 instance asking the Route 53 Resolver (169.254.169.253) to find the IP for
google.com.
- Example: An EC2 instance asking the Route 53 Resolver (169.254.169.253) to find the IP for
- Split-Horizon DNS: Maintaining different versions of the same DNS zone for internal vs. external users.
- Example:
api.myapp.comresolving to a Private IP for internal VPC users and a Public IP for internet users.
- Example:
Worked Examples
Step-by-Step Subdomain Delegation
Scenario: You own tipofthehat.com in Account A and want the Production team in Account B to manage production.tipofthehat.com.
- In Account B (Production):
- Create a Public Hosted Zone named
production.tipofthehat.com. - AWS assigns 4 Name Servers (e.g.,
ns-1.awsdns-01.com, etc.). Copy these.
- Create a Public Hosted Zone named
- In Account A (Corporate):
- Open the
tipofthehat.comhosted zone. - Click Create Record.
- Record Name:
production - Record Type:
NS(Name Server) - Value: Paste the 4 Name Servers from Account B.
- TTL: 172800 (standard for NS records).
- Open the
- Validation:
- Run
dig production.tipofthehat.com NSand ensure the Answer Section returns the Name Servers from Account B.
- Run
Checkpoint Questions
- What is the primary difference between a CNAME record and a DNS delegation?
- Which Route 53 component is required to allow an on-premises server to resolve an AWS Private Hosted Zone?
- True or False: You must use an Outbound Endpoint to resolve public internet addresses from a VPC.
- How does AWS Resource Access Manager (RAM) facilitate hybrid DNS?
▶Click to view answers
- A CNAME points one alias to another domain name. Delegation hands over authority for an entire namespace/subdomain to different name servers.
- An Inbound Endpoint.
- False. Route 53 Resolver can resolve public internet addresses natively without an outbound endpoint; endpoints are for private/conditional forwarding.
- RAM allows you to share Resolver Forwarding Rules across multiple accounts, ensuring consistent resolution of on-premises domains across the entire AWS Organization.
Muddy Points & Cross-Refs
- Delegation vs. Forwarding: Remember that Delegation is for subdomains you own (Hierarchy), while Forwarding is for external domains you need to reach (Bridge).
- Endpoint IPs: Many students forget that Inbound/Outbound endpoints consume IP addresses from your VPC subnets. Ensure you have free IPs in at least two AZs for high availability.
- Cross-Reference: For more on how health checks affect these records, see Unit 3: Traffic Management and Health Checks.
Comparison Tables
Inbound vs. Outbound Endpoints
| Feature | Inbound Endpoint | Outbound Endpoint |
|---|---|---|
| Traffic Direction | On-Prem -> AWS | AWS -> On-Prem |
| Use Case | Resolve Private Hosted Zones from HQ. | Resolve .local or .internal from VPC. |
| Requirement | VPC with Private Hosted Zone associated. | Resolver Rule defined for the domain. |
| Cost | Hourly per Elastic Network Interface (ENI). | Hourly per Elastic Network Interface (ENI). |