DNS and DHCP
Your VPC hands out its own addresses and names.
Every VPC can have a DNS server and a DHCP server sitting on its gateway address. You describe what you want with two resources in your project and we run the servers. There is no box to log in to and no zone file to edit by hand.
What you create
You write a DNSService and a DHCPService. Each one points at a single VPC through vpcRef, and that link is fixed once you set it. A VPC gets at most one of each, so if you create a second one for the same VPC it goes to Failed with reason DuplicateService.
DNSService
Answers for your zone. You declare A, AAAA, CNAME and TXT records, and every account in the VPC gets a name as well. Names outside the zone go to forwarders you list, or get refused.
kubectl get dnsservices
DHCPService
Gives each account the address it was allocated, adds reservations for devices that sit behind a member, and can run a dynamic pool if you want one. Replies carry routers, DNS servers, domain, MTU and lease time.
kubectl get dhcpservices
How a request gets answered
The zone defaults to <vpc>.<project>.etorm.internal. Here is what each kind of request gets back.
| Someone asks for | They get |
|---|---|
| A name inside the zone | An answer with authority: the record, no data, or no such name. |
| A name outside the zone | Whatever the forwarders you listed say. If you listed none, the query is refused. |
| DHCP from an account of the VPC | Exactly its allocated address, matched by the account's MAC, with the account name as hostname. |
| DHCP from a device with a reservation | The reserved address. |
| DHCP from any other client | The lowest free address of the pool, if you declared one. Pool addresses never include a reserved address. |
What happens underneath
When you create or change one of these resources, a controller renders the complete configuration for that VPC into the resource's status.config. Once that is done the resource reaches Ready. The gateway reads only that rendered status. It never interprets your resources itself. Everything it needs to answer is already in that rendered configuration.
One server process on the gateway serves many tenants, which is why there is nothing for you to run. It listens on each VPC's own bridge, so a packet is only ever answered from the configuration of the VPC it arrived on. Two customers can both use the same prefix, and each gets their own leases, options, zone and records.
The DNS server only knows your zone
It answers for its own zone and has no recursion of its own. There is no DNSSEC, no zone transfer and no reverse zone. Everything goes over UDP, and answers are capped at 512 bytes. A longer answer comes back marked truncated.
For anything outside the zone you can list up to 4 forwarders. They have to be public IPv4 addresses. We refuse private, loopback, link-local, shared (100.64.0.0/10) and multicast addresses, because otherwise a tenant could use the gateway as a way into internal networks. So a resolver on a private address can't be a forwarder, and answers are not cached.
DHCP is IPv4 only
The DHCP server speaks DHCPv4. An IPv6-only VPC has DNS and no DHCP, and its IPv6 addresses come from the VPC prefix. There is no relay and no classless routes.
Account addresses and reservations come straight from the configuration, so they are always the same. Leases from the dynamic pool are different. We keep them only in memory.
If the gateway goes away
Both servers live on the VPC's gateway and answer from the VPC's first address. There is one gateway per VPC and no standby server, so the two services share the gateway's fate. We think that is the right trade for a service you never have to run, but plan for it if a client of yours cannot tolerate a gap.
When the gateway agent restarts, pool leases are lost because they were only in memory. Clients ask again and get an address from the pool. Accounts and reserved devices get the same address as before.
Limits
| What | Limit |
|---|---|
| Services per VPC | One DNSService and one DHCPService. A second one is Failed with reason DuplicateService. |
| DNS transport | UDP only, answers up to 512 bytes. A longer answer is marked truncated. |
| DNS records | A, AAAA, CNAME and TXT. Up to 512 declared records per DNSService. TTL 0 to 86 400 seconds, default 60. No wildcard records. |
| Forwarders | Up to 4, public IPv4 addresses only. Private, loopback, link-local, shared (100.64.0.0/10) and multicast addresses are refused. |
| DNS scope | Its own zone. No recursion of its own, no DNSSEC, no zone transfers, no reverse zones. |
| DHCP family | DHCPv4 only. An IPv6-only VPC has DNS and no DHCP. |
| Lease time | 60 seconds to 7 days, default 3600 seconds. |
| Reservations | Up to 256 per DHCPService. |
| Routers and DNS servers in replies | Up to 4 of each. |
| Pool leases | Kept in memory. No relay, no classless routes. |
| Server address | The VPC's first address. One gateway per VPC, no standby server. |
Guides and reference
- Quickstart
- Dual-stack network guide
- DNS records guide
- DNSService reference and DHCPService reference
- How the network fits into the rest of the platform
Tell us what you are connecting and which networks need names and addresses.