📄 draft-ietf-dnsop-bad-dns-res-02.txt
字号:
With glue fetching enabled, however, an authoritative server will generate queries whenever it needs to look up an unknown address record to complete the additional section of a response. We have observed situations where a glue-fetching name server can send queries that reach other name servers, but apparently is prevented from receiving the responses. For example, perhaps the name server is authoritative-only and therefore its administrators expect it to receive only queries. Perhaps unaware of glue fetching and presuming that the name server will generate no queries, its administrators place the name server behind a network device that prevents it from receiving responses. If this is the case, all glue-fetching queries will go answered.Larson & Barber Expires August 16, 2004 [Page 7]Internet-Draft Observed DNS Resolution Misbehavior February 2004 We have observed name server implementations that retry excessively when glue-fetching queries are unanswered. A single com/net name server has received hundreds of queries per second from a single name server. Judging from the specific queries received and based on additional analysis, we believe these queries result from overly aggressive glue fetching.2.4.1 Recommendation Implementers whose name servers support glue fetching should take care to avoid sending queries at excessive rates. Implementations should support throttling logic to detect when queries are sent but no responses are received.2.5 Aggressive retransmission behind firewalls A common occurrence and one of the largest sources of repeated queries at the com/net and root name servers appears to result from resolvers behind misconfigured firewalls. In this situation, a recursive name server is apparently allowed to send queries through a firewall to other name servers, but not receive the responses. The result is more queries than necessary because of retransmission, all of which are useless because the responses are never received. Just as with the glue-fetching scenario described in Section 2.4, the queries are sometimes sent at excessive rates. To make matters worse, sometimes the responses, sent in reply to legitimate queries, trigger an alarm on the originator's intrusion detection system. We are frequently contacted by administrators responding to such alarms who believe our name servers are attacking their systems. Not only do some resolvers in this situation retransmit queries at an excessive rate, but they continue to do so for days or even weeks. This scenario could result from an organization with multiple recursive name servers, only a subset of whose traffic is improperly filtered in this manner. Stub resolvers in the organization could be configured to query multiple name servers. Consider the case where a stub resolver queries a filtered name server first. This name server sends one or more queries whose replies are filtered, so it can't respond to the stub resolver, which times out. The resolver retransmits to a name server that is able to provide an answer. Since resolution ultimately succeeds the underlying problem might not be recognized or corrected. A popular stub resolver has a very aggressive retransmission schedule, including simultaneous queries to multiple name servers, which could explain how such a situation could persist without being detected.2.5.1 RecommendationLarson & Barber Expires August 16, 2004 [Page 8]Internet-Draft Observed DNS Resolution Misbehavior February 2004 The most obvious recommendation is that administrators should take care not to place recursive name servers behind a firewall that prohibits queries to pass through but not the resulting replies. Name servers should take care to avoid sending queries at excessive rates. Implementations should support throttling logic to detect when queries are sent but no responses are received.2.6 Misconfigured NS records Sometimes a zone administrator forgets to add the trailing dot on the domain names in the RDATA of a zone's NS records. Consider this fragment of the zone file for "example.com": $ORIGIN example.com. example.com. 3600 IN NS ns1.example.com ; Note missing example.com. 3600 IN NS ns2.example.com ; trailing dots The zone's authoritative servers will parse the NS RDATA as "ns1.example.com.example.com" and "ns2.example.com.example.com" and return NS records with this incorrect RDATA in responses, including typically the authority section of every response containing records from the "example.com" zone. Now consider a typical sequence of queries. A recursive name server attempting to resolve A records for "www.example.com" with no cached information for this zone will query a "com" authoritative server. The "com" server responds with a referral to the "example.com" zone, consisting of NS records with valid RDATA and associated glue records. (This example assumes that the "example.com" zone information is correct in the "com" zone.) The recursive name server caches the NS RRset from the "com" server and follows the referral by querying one of the "example.com" authoritative servers. This server responds with the "www.example.com" A record in the answer section and, typically, the "example.com" NS records in the authority section and, if space in the message remains, glue A records in the additional section. According to Section 5.4 of RFC 2181 [4], NS records in the authority section of an authoritative answer are more trustworthy than NS records from the authority section of a non-authoritative answer. Thus the "example.com" NS RRset just received from the "example.com" authoritative server displaces the "example.com" NS RRset received moments ago from the "com" authoritative server. But the "example.com" zone contains the erroneous NS RRset as shown in the example above. Subsequent queries for names in "example.com" will cause the server to attempt to use the incorrect NS records and so the server will try to resolve the nonexistent namesLarson & Barber Expires August 16, 2004 [Page 9]Internet-Draft Observed DNS Resolution Misbehavior February 2004 "ns1.example.com.example.com" and "ns2.example.com.example.com". In this example, since all of the zone's name servers are named in the zone itself (i.e., "ns1.example.com.example.com" and "ns2.example.com.example.com" both end in "example.com") and all are bogus, the recursive server cannot reach any "example.com" name servers. Therefore attempts to resolve these names result in A record queries to the "com' authoritative servers. Queries for such obviously bogus glue A records occur frequently at the com/net name servers.2.6.1 Recommendation An authoritative server can detect this situation. A trailing dot missing from an NS record's RDATA always results by definition in a name server name that is in the zone. But any in-zone name server should have a corresponding glue A record also in the zone. An authoritative name server should report an error when a zone's NS record references an in-zone name server without a corresponding glue A record.2.7 Name server records with zero TTL Sometimes a popular com/net subdomain's zone is configured with a TTL of zero on the zone's NS records, which prohibits these records from being cached and will result in a higher query volume to the zone's authoritative servers. The zone's administrator should understand the consequences of such a configuration and provision resources accordingly. A zero TTL on the zone's NS RRset, however, carries additional consequences beyond the zone itself: if a recursive name server cannot cache a zone's NS records because of a zero TTL, it will be forced to query that zone's parent's name servers each time it resolves a name in the zone. The com/net authoritative servers do see an increased query load when a popular com/net subdomain's zone is configured with a TTL of zero on the zone's NS records. A zero TTL on an RRset expected to change frequently is extreme but permissible. A zone's NS RRset is a special case, however, because changes to it must be coordinated with the zone's parent. In most zone parent/child relationships we are aware of, there is typically some delay involved in effecting changes. Further, changes to the set of a zone's authoritative name servers (and therefore to the zone's NS RRset) are typically relatively rare: providing reliable authoritative service requires a reasonably stable set of servers. Therefore an extremely low or zero TTL on a zone's NS RRset rarely makes sense, except in anticipation of an upcoming change. In this case, when the zone's administrator has planned a change and does not want recursive name servers throughout the Internet to cache the NS RRset for a long period of time, a low TTL is reasonable.Larson & Barber Expires August 16, 2004 [Page 10]Internet-Draft Observed DNS Resolution Misbehavior February 20042.7.1 Recommendation Because of the additional load placed on a zone's parent's authoritative servers imposed by a zero TTL on a zone's NS RRset, under such circumstances authoritative name servers should issue a warning when loading a zone or refuse to load the zone altogether.2.8 Unnecessary dynamic update messages The UPDATE message specified in RFC 2136 [6] allows an authorized agent to update a zone's data on an authoritative name server using a DNS message sent over the network. Consider the case of an agent desiring to add a particular resource record. Because of zone cuts, the agent does not necessarily know the proper zone to which the record should be added. The dynamic update process requires that the agent determine the appropriate zone so the UPDATE message can be sent to one of the zone's authoritative servers (typically the primary master as specified in the zone's SOA MNAME field). The appropriate zone to update is the closest enclosing zone, which is the lowest zone in the name space. The closest enclosing zone cannot be determined only by inspecting the domain name of the record to be updated, since zone cuts can occur anywhere. One way to determine the closest enclosing zone involves working up the name space tree and sending repeated UPDATE messages until success. For example, consider an agent attempting to add an A record with the name "foo.bar.example.com". The agent could first attempt to update the "foo.bar.example.com" zone. If the attempt failed, the update could be directed to the "bar.example.com" zone, then the "example.com" zone, then the "com" zone, and finally the root zone. A popular dynamic agent follows this algorithm. The result is many UPDATE messages received by the root name servers, the com/net authoritative servers, and presumably other TLD authoritative servers. A reasonable question is why the algorithm proceeds with sending updates all the way to TLD and root name servers. In enterprise DNS architectures with an "internal root" design, there could conceivably be private, non-public TLD or root zones that would be the appropriate target for a dynamic update. However, we question if designing an algorithm to accommodate these limited cases is worth the load it places on the public DNS in the form of unnecessary UPDATE messages.2.8.1 Recommendation Dynamic update agents should not attempt to send UPDATE messages to authoritative servers for TLD zones or the root zone by default. If this functionality is supported, it should be require specific actionLarson & Barber Expires August 16, 2004 [Page 11]Internet-Draft Observed DNS Resolution Misbehavior February 2004 by a user to be enabled.2.9 Queries for domain names resembling IP addresses The root name servers receive a significant number of A record queries where the qname is an IP address. The source of these queries is unknown. It could be attributed to situations where a user believes an application will accept either a domain name or an IP address in a given configuration option. The user enters an IP address, but the application assumes any input is a domain name and attempts to resolve it, resulting in an A record lookup. There could also be applications that produce such queries in a misguided attempt to reverse map IP addresses. These queries result in Name Error (RCODE=3) responses. A recursive name server can negatively cache such responses, but each response requires a separate cache entry, i.e., a negative cache entry for the domain name "192.0.2.1" does not prevent a subsequent query for the domain name "192.0.2.2".2.9.1 Recommendation It would be desirable for the root name servers not to have to answer these queries: they unnecessarily consume CPU resources and network bandwidth. One possibility is for recursive name server implementations to produce the Name Error response directly. We suggest that implementors consider the option of synthesizing Name Error responses at the recursive name server. The server could claim authority for synthesized TLD zones corresponding to the first octet of every possible IP address, e.g. 1., 2., through 255. This behavior could be configurable in the (probably unlikely) event that numeric TLDs are ever put into use. Another option is to delegate these numeric TLDs from the root zone to a separate set of servers to absorb the traffic. The "blackhole servers" used by the the AS 112 Project [8], which are currently delegated the in-addr.arpa zones corresponding to RFC 1918 [7] private use address space, would be a possible choice to receive these delegations.2.10 Misdirected recursive queries The root name servers receive a significant number of recursive queries (i.e., queries with the RD bit set in the header). Since none of the root servers offer recursion, the servers' response in such a situation ignores the request for recursion and the response probably does not contain the data the querier anticipated. Some of these queries result from users configuring stub resolvers to query aLarson & Barber Expires August 16, 2004 [Page 12]Internet-Draft Observed DNS Resolution Misbehavior February 2004 root server. (This situation is not hypothetical: we have received complaints from users when this configuration does not work as hoped.) Of course, users should not direct stub resolvers to use name servers that do not offer recursion, but we are not aware of any stub resolver implementation that offers any feedback to the user when so configured, aside from simply "not working".2.10.1 Recommendation When the IP address of a (supposedly) recursive name server is configured in a stub resolver using an interactive user interface, the resolver could send a test query to verify that the server supports recursion (i.e., the response has the RA bit set in the header). The user could be immediately notified if the server is non-recursive. The stub resolver could also report an error, either through a user interface or in a log file, if the queried server does not support recursion. Error reporting should be throttled to avoid a notification or log message for every response from a non-recursive server.2.11 Suboptimal name server selection algorithm An entire document could be devoted to the topic of problems with different implementations of the recursive resolution algorithm. The entire process of recursion is woefully underspecified, requiring each implementor to design an algorithm. Sometimes implementors make poor design choices that could be avoided if a suggested algorithm and best practices were documented, but that is a topic for another document. Some deficiencies cause significant operational impact and are therefore worth mentioning here. One of these is name server selection by a recursive name server. When a recursive name server wants to contact one of a zone's authoritative name servers, how does it choose from the NS records listed in the zone's NS RRset? If the selection mechanism is suboptimal, queries are not spread evenly among a zone's authoritative servers. The details of the selection mechanism are up to the implementor, but we offer some suggestions.2.11.1 Recommendation This list is not conclusive, but reflects the changes that would produce the most impact in terms of reducing disproportionate query load among a zone's authoritative servers. I.e., these changes would help spread the query load evenly.Larson & Barber Expires August 16, 2004 [Page 13]Internet-Draft Observed DNS Resolution Misbehavior February 2004 o Do not make assumptions based on NS RRset order: all NS RRs should be treated equally. (In the case of the "com" zone, for example, most of the root servers return the NS record for "a.gtld-servers.net" first in the authority section of referrals. As a result, this server receives disproportionately more traffic than the other 12 authoritative servers for "com".) o Use all NS records in an RRset. (For example, we are aware of implementations that hard-coded information for a subset of the root servers.) o Maintain state and favor the best-performing of a zone's authoritative servers. A good definition of performance is response time. Non-responsive servers can be penalized with an extremely high response time. o Do not lock onto the best-performing of a zone's name servers. A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -