KomuraSoft LLC
Chapter 2

Cache and bailiwick — What can you trust

Separate referral, glue, and bailiwick, and sort out what is safe to put in the cache.

Recap of the previous chapter: In Chapter 1, we confirmed the picture that a forged RRset in the cache of a shared recursive resolver causes the same bad answer to be served to every user. In this chapter, we organize referral / glue / bailiwick as the criteria for "what a resolver should be allowed to put in its cache."

A delegation returns "where to go next," not the "final answer"

A recursive resolver does not receive the final answer directly. The parent zone returns a referral pointing at the child zone's NS records, and the resolver uses that signpost to step to the next authoritative server.

SectionTypical contentsHow to think about it
ANSWERFinal RRsetIs this really the answer for the name and type you wanted?
AUTHORITYNS / SOAIs this a referral or a negative response?
ADDITIONALglue / auxiliary addressesIs it a stepping stone for the next hop, or unrelated additional data?

Practice 2-1 — Glue is a bridging stepping stone

When the Additional section has A / AAAA for an in-bailiwick NS name, the resolver can reach the child zone more easily.

Q1. The parent zone example.com delegates shop.example.com to ns1.shop.example.com, and the referral's Additional section includes ns1.shop.example.com A 192.0.2.53. Which description of this additional data is closest?

Think about whether it is a "stepping stone" for reaching the child zone.

Q2. In dig output, where do the NS records of a delegation mainly appear?

A referral shows "where to go next," not "the final answer."

Three bailiwick scenarios

How to treat a record in the Additional section depends on whether that record falls inside (in-bailiwick) or outside (out-of-bailiwick) the delegation range of the referral.

1. in-bailiwick glue
A / AAAA for an NS name that sits under the child zone. Usable as a stepping stone to follow the delegation.
2. out-of-bailiwick additional
A record for a name outside the delegation range. Do not trust it as authoritative; if needed, resolve it separately.
3. An example that could be confused with a final answer
A record in Additional must not be treated as the final answer for the name that the user actually asked about.

The decisions here are for conceptual learning. Implementations differ in the fine print, but the viewpoint of keeping "a stepping stone for the delegation" and "unrelated additional data" separate is what matters.

Handle out-of-bailiwick additional data with care

If unrelated data can be slipped into the Additional section of a referral, that is dangerous. Resolver implementations therefore treat glue strictly — who to trust, and how far. The word that keeps coming up in this context is bailiwick.

Origin of "bailiwick": Originally a legal term in medieval English law meaning "the jurisdiction of a bailiff," with the connotation of "the range for which a particular party is responsible." Borrowed into DNS, it now refers to the idea of "whether a name lies inside the namespace that the delegating zone is responsible for." A record that appears in a referral's Additional section is called in-bailiwick if it sits inside that delegation range, and out-of-bailiwick if it sits outside.

Practice 2-2 — Handle out-of-bailiwick additional data with care

If unrelated data can be slipped into a referral's Additional section, that is dangerous. Bailiwick is the idea that limits which glue you trust, and how far.

Q3. A referral from example.com to ns.partner.net arrived with ns.partner.net A 198.51.100.10 in Additional. What is the most conservative way to handle it?

Check whether that additional A falls under example.com's authority.

Q4. What is the main purpose of the idea of bailiwick?

Think about "for which range of introductions do you tighten the acceptance rule?"

Q5. Which statement about glue in Additional is correct?

Glue is convenient, but its role is "bridging."

Key takeaways from this chapter

  • Delegation NS records mainly appear in AUTHORITY, and stepping-stone glue appears in ADDITIONAL
  • Do not trust in-bailiwick glue and out-of-bailiwick additional data with the same strength
  • Bailiwick is the viewpoint that suppresses the mixing in of unrelated additional data