Connected: An Internet Encyclopedia
7.3. Processing responses
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1035
Up:
7. RESOLVER IMPLEMENTATION
Prev: 7.2. Sending the queries
Next: 7.4. Using the cache
7.3. Processing responses
7.3. Processing responses
The first step in processing arriving response datagrams is to parse the
response. This procedure should include:
- Check the header for reasonableness. Discard datagrams which
are queries when responses are expected.
- Parse the sections of the message, and insure that all RRs are
correctly formatted.
- As an optional step, check the TTLs of arriving data looking
for RRs with excessively long TTLs. If a RR has an
excessively long TTL, say greater than 1 week, either discard
the whole response, or limit all TTLs in the response to 1
week.
The next step is to match the response to a current resolver request.
The recommended strategy is to do a preliminary matching using the ID
field in the domain header, and then to verify that the question section
corresponds to the information currently desired. This requires that
the transmission algorithm devote several bits of the domain ID field to
a request identifier of some sort. This step has several fine points:
- Some name servers send their responses from different
addresses than the one used to receive the query. That is, a
resolver cannot rely that a response will come from the same
address which it sent the corresponding query to. This name
server bug is typically encountered in UNIX systems.
- If the resolver retransmits a particular request to a name
server it should be able to use a response from any of the
transmissions. However, if it is using the response to sample
the round trip time to access the name server, it must be able
to determine which transmission matches the response (and keep
transmission times for each outgoing message), or only
calculate round trip times based on initial transmissions.
- A name server will occasionally not have a current copy of a
zone which it should have according to some NS RRs. The
resolver should simply remove the name server from the current
SLIST, and continue.
Next: 7.4. Using the cache
Connected: An Internet Encyclopedia
7.3. Processing responses