ZDNS Service
Overview
Zenlayer DNS (ZDNS) is a highly available DNS service with global configuration and regional delivery provided by Zenlayer Elastic Compute.
The ZDNS cluster uses a stateless architecture, where each server can independently handle DNS queries. All servers in the cluster advertise the same VIP via BGP. If a node becomes unhealthy, its BGP advertisement is automatically withdrawn, and traffic is routed to other healthy nodes—ensuring high availability.
The ZDNS uses TCP/UDP port 53 by default, with the following resolver addresses:
IPv4:
169.254.169.253IPv6:
fd00:a9fe:a9fd::1
ZDNS supports both private domain resolution and public recursive resolution. The private DNS feature enables service discovery, load balancing, and high availability. You can also use private DNS records to centrally manage various cloud resources within a VPC—such as cloud servers and load balancers—enhancing resource management efficiency and overall service reliability.

Features
High Availability: Single-node failures do not affect overall DNS resolution, as traffic automatically shifts to healthy nodes.
Stateless Architecture: Nodes can be added or removed quickly without global state synchronization.
Horizontal Scalability: Adding new nodes immediately increases the cluster’s processing capacity.
VPC Isolation: Supports authoritative DNS resolution for private domains across different VPCs.
Public Recursive Resolution: Performs public recursive queries for domain names that miss in the local zone.
Private Subdomain Recursive Fallback: When a private authoritative parent domain matches but the subdomain does not, the system automatically falls back to public recursive resolution.
ZDNS Resolution Workflow
Client Configuration The client (VM) should configure the DNS server addresses as follows:
IPv4:
169.254.169.253IPv6:
fd00:a9fe:a9fd::1
Request Ingress When the client sends DNS queries to the above addresses, the requests are routed to the ZDNS cluster in the corresponding region.
Validity Check The ZDNS cluster first validates whether the request is a well-formed DNS packet. Only valid requests proceed to the resolution phase.
Domain Resolution
Miss on private authoritative domains: The query is forwarded to the public internet for recursive resolution, and the final result is returned.
Hit on a VPC private authoritative domain:
Subdomain match: Resolve and return the result directly.
Subdomain miss:
Recursive enabled: Forward to public recursive resolution and return the final answer.
Recursive disabled: Return an empty response.
Response to Client The final resolution result is sent back to the client, delivering a fast and reliable DNS response.
Virtual Machine DNS Configuration
Currently, only manual DNS configuration is supported. Automatic default DNS via DHCP will be available in the future.
IPv4 Instance Default DNS:
169.254.169.253IPv6-only Instance Default DNS:
fd00:a9fe:a9fd::1
CentOS (including CentOS 7/9)
1. Temporary Configuration
Edit /etc/resolv.conf:
sudo vim /etc/resolv.confAdd:
nameserver 169.254.169.253Save and exit. Changes take effect immediately.
2. Persistent Configuration
Edit the network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth0:
sudo vim /etc/sysconfig/network-scripts/ifcfg-eth0Add:
DNS1=169.254.169.253
PEERDNS=noExample default file:
# Created by cloud-init on instance boot automatically, do not edit.
BOOTPROTO=dhcp
DEVICE=eth0
DHCPV6C=yes
IPV6INIT=yes
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
DNS1=169.254.169.253
PEERDNS=no3. Verification
Run:
sudo cat /etc/resolv.confExpected output:
nameserver 169.254.169.253Ubuntu (including 20.04/22.04/24.04)
1. Configuration (Recommended: Netplan)
Edit the network config file /etc/sysconfig/network-scripts/ifcfg-eth0:
sudo vim /etc/netplan/50-cloud-init.yamlAdd:
dhcp4-overrides:
use-dns: false
dhcp6-overrides:
use-dns: false
nameservers:
addresses:
- 169.254.169.253Complete example (replace with actual MAC address):
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
eth0:
dhcp4: true
match:
macaddress: 52:54:00:8d:a7:d3
set-name: eth0
dhcp4-overrides:
use-dns: false
dhcp6-overrides:
use-dns: false
nameservers:
addresses:
- 169.254.169.2532. Apply Network Changes
sudo netplan apply3. Verification
Run:
sudo resolvectlExpected output:
DNS Servers: 169.254.169.253Last updated