On-premises DNS query logs

Updated at:

To collect query logs for On-premises DNS, bind your resolution cluster to a log service cluster.

View query logs

  1. Go to the Alibaba Cloud DNS-Logs page.

  2. On the Query Logs tab, choose Private Zone > On-premises DNS.

    The list displays the details of On-premises DNS query logs. For the meaning of each field, see Query log fields below.

  3. Use the following conditions to search query logs:

    • Log service cluster: Query the logs of a specified cluster.

    • Time-based query: Filter logs by a pre-defined or custom time range. Logs from the last 180 days can be queried.

      Note

      If the query returns too many logs, repeat the query multiple times. Logs are returned in batches.

    • Keyword-based query: Query the logs by keywords such as the zone name, source IP address, record type, response status, and resolution delay.

Query log fields

Query Time: The time when the on-premises DNS server received the query.

Response Time: The time when the on-premises DNS server responded to the query.

Resolution Delay (ms): The overall latency from when the DNS server receives the domain name query to when it returns the response.

Source IP Address: The IP address of the client that initiated the internal DNS resolution request. This is typically the address of an internal server or an office endpoint.

ECS Client Subnet IP: A local DNS server (LocalDNS) that supports the EDNS Client Subnet (ECS) protocol converts the client source IP address to protect privacy and places it in the ECS protocol extension. The authoritative DNS server then uses the client source IP address included in the extension for more accurate scheduling.

Zone Name: The target domain name queried in the DNS request.

Query Record Types: The DNS record type of the query, such as A, AAAA, CNAME, TXT, and MX.

Query Flag: The flags in the DNS query packet header. Multiple flags are separated by spaces. A hyphen (-) indicates that no flag is set.

Flag

Description

RD (Recursion Desired)

Indicates that the client wants the DNS server to resolve the query recursively. The client sets this flag in the query request that it sends to the DNS server.

CD (Checking Disabled)

When Domain Name System Security Extensions (DNSSEC) is enabled, this flag indicates that the client requests the resolver not to perform DNSSEC validation.

Response Flag: The flags in the DNS response packet header. Multiple flags are separated by spaces.

Flag name

Description

AA (Authoritative Answer)

Indicates that the response comes from the authoritative DNS server of the domain name. Otherwise, the response is a cached response or a response from another non-authoritative DNS server.

TC (Truncation)

Indicates that the response packet was truncated because it was too long.

RA (Recursion Available)

Indicates that the DNS server supports recursive queries.

AD (Authenticated Data)

Indicates that the returned data has been authenticated. This flag is used in DNSSEC environments.

RD (Recursion Desired)

Echoes back the value of the RD flag in the request packet, indicating that the client wants the DNS server to resolve the query recursively.

QR (Query/Response)

Indicates whether a packet is a query request or a response. The presence of the QR flag indicates that the packet is a response.

Agreement Type: The transport protocol used for the DNS query, such as UDP, TCP, and HTTPS.

Resolution Results: The domain name resolution result.

Response Status: Common statuses include the following:

Status

Description

NOERROR

The DNS resolution succeeded.

NXDOMAIN (Non-Existent Domain)

The queried domain name does not exist.

SERVFAIL (Server Failure)

The query could not be processed because of a problem with the target DNS server.

REFUSED

The DNS server refused to perform the specified operation for policy reasons. For example, the DNS server may refuse to provide resolution for the specified requester, or may refuse to perform a specific operation, such as a zone transfer, on the specified data.

FORMERR (Format Error)

The DNS server could not interpret the query request.

NOTIMP (Not Implemented)

The DNS server does not support the query type of this request.

DROP

The DNS server drops the specified request for policy reasons, for example, when the request packet is malformed.

Important

Detailed query logs may contain entries with the NXRRSET status. In RFC specifications, this status indicates that the corresponding DNS record does not exist during a DNS record update operation. In Alibaba Cloud DNS traffic analysis scenarios, NXRRSET indicates that the queried domain name exists but no DNS record of the queried type exists. This helps you distinguish response statuses at a finer granularity.

For example, in a dual-stack (IPv4 and IPv6) environment, many users configure only A records for their domain names, while clients request both A and AAAA records. As a result, the AAAA request returns NXRRSET, while the A request returns the correct result. Therefore, an NXRRSET status does not necessarily indicate a resolution error. Check whether a DNS record of this type is configured.

DNS Server IP Address: The IP address of the on-premises DNS server that responded to the DNS query.

Push logs to SLS

  1. To push On-premises DNS query logs to a specific SLS Logstore for management, click Syslog Message Push in the upper-right corner of the On-premises DNS query log page.

  2. In the dialog box, turn on the switch, set Syslog Protocol (for example, UDP), and enter Syslog Server.

    Format: Domain/IP address:Port (If no port is specified, port 514 is used by default). Examples: 192.168.1.1:8080 or example.com.

  3. Click OK.