From d25403bb6fc2437482a67bd8383df9e12aafe6a2 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 23 Jun 2021 12:29:02 -0400 Subject: [PATCH] contrib: Update DNS table description --- contributing/service-discovery/dns.md | 37 ++++++++++++++++----------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/contributing/service-discovery/dns.md b/contributing/service-discovery/dns.md index cfc9566e3..357ecc57d 100644 --- a/contributing/service-discovery/dns.md +++ b/contributing/service-discovery/dns.md @@ -24,19 +24,26 @@ the DNS protocol can be found in the RFCs: [RFC 1035], [RFC 6891], [RFC 2782], a The DNS interface is implemented as a DNS server using [miekg/dns] and the handlers for requests are in `agent/dns.go`. -The following table describe the current DNS behaviour depending on the dns query kind (node, service...), and the query type (A/AAAA, SRV...) - -| | service | connect (enterprise) | ingress (enterprise) | node | query | addr | -|----------------|-------------------------|-------------------------|-------------------------|------------------------|-----------------|------------------------------| -| TypeSOA | Supported | Supported | Supported | Supported | Supported | Supported | -| TypeNS | Supported | Supported | Supported | Supported | Supported | Supported | -| TypeAXFR | Not Implemented | Not Implemented | Not Implemented | Not Implemented | Not Implemented | Not Implemented | -| TypeA/TypeAAAA | Supported | Supported | Supported | Supported | | Supported | -| TypeANY | Supported (return A) | Supported (return A) | Supported (return A) | Supported | | Supported (return A) | -| TypeCNAME | Supported (node cname) | Supported (node cname) | Supported (node cname) | Supported (node cname) | | return empty with A as extra | -| TypeOPT | Supported (node OPT) | Supported (node OPT) | Supported (node OPT) | Supported (node OPT) | | return empty with A as extra | -| TypePTR | Supported (node PTR) | Supported (node PTR) | Supported (node PTR) | Supported (node PTR) | | return empty with A as extra | -| TypeSRV | Supported (service SRV) | Supported (service SRV) | Supported (service SRV) | No error but empty | | return empty with A as extra | -| TypeTXT | Answer A record (????) | Answer A record (????) | Answer A record (????) | Supported | | return empty with A as extra | - [miekg/dns]: https://github.com/miekg/dns + +## DNS Queries and Records + +The DNS interface handles queries where OPCODE=0 (standard query). The following table describe the current +DNS behaviour for different record types and domain names. The Domain names (along the +top) are always in the form `..`, where `domain` is +generally documented as `consul` but can be set using the `domain` or `alt_domain` config +fields. The `prefix` is an identifier (service name, node name, prepared query name, etc). + +| Type | service | connect | ingress | node | query | addr | +|---------|-------------------------|-------------------------|-------------------------|------------------------|-----------------|------------------------------| +| SOA | Supported | Supported | Supported | Supported | Supported | Supported | +| NS | Supported | Supported | Supported | Supported | Supported | Supported | +| AXFR | Not Implemented | Not Implemented | Not Implemented | Not Implemented | Not Implemented | Not Implemented | +| A/AAAA | Supported | Supported | Supported | Supported | | Supported | +| ANY | Supported (return A) | Supported (return A) | Supported (return A) | Supported | | Supported (return A) | +| CNAME | Supported (node cname) | Supported (node cname) | Supported (node cname) | Supported (node cname) | | return empty with A as extra | +| OPT | Supported (node OPT) | Supported (node OPT) | Supported (node OPT) | Supported (node OPT) | | return empty with A as extra | +| PTR | Supported (node PTR) | Supported (node PTR) | Supported (node PTR) | Supported (node PTR) | | return empty with A as extra | +| SRV | Supported (service SRV) | Supported (service SRV) | Supported (service SRV) | No error but empty | | return empty with A as extra | +| TXT | Answer A record (????) | Answer A record (????) | Answer A record (????) | Supported | | return empty with A as extra | +