-*- Mode:Text; Fonts:(CPTFONT HL12B HL12I) -*- 1Quick introduction to the Domain Name System and Stub Resolver* 1for the TI Explorer* 2Björn Victor* 2 Department of Computer Systems* 2Uppsala University, SWEDEN* [These notes regard the systems "DNS 5.1" and "DNS Stub resolver 3.0", as of 22-Nov-89]. First, copy DNS.SYSTEM and STUB-RESOLVER.SYSTEM to SYS:SITE;. Then modify DNS.TRANSLATIONS and put it in SYS:SITE; too. Then (make-system :dns :noconfirm :silent) and (make-system :stub-resolver :noconfirm :silent) (after loading the IP system, of course). Then (or first, I guess) add the following attributes to your SITE object in your standard network namespace: :domain-safety-belt-servers This should be a list of IP addresses to servers that support recursive queries. Without this, you lose. Remember 1NEVER* to set this to any of the root servers (e.g. "10.0.0.51" (NIC.DDN.MIL)). If you don't know which your local servers are, you could try (2ONCE*) evaluating the form (dns:stub-get-resource-record "." #xFFFFFFFF *type-name-server*) and using the addresses of the first value. 1DO NOT* use #xFFFFFFFF (or any other broadcast address) as a server, since doing that will probably cause "broadcast storms" and serious network disturbances. :domain-search-list This should be a list of domain names to search in for names without dots. At our site, this is ("DoCS.UU.SE" "CSD.UU.SE"), which means that if I try to parse "zorn", it tries "zorn.DoCS.UU.SE" and then "zorn.CSD.UU.SE". Then call (NAME:DNS-STUB-NAMESPACE-INITIALIZATION-FORM). Loading the systems create a new namespace called "DNS" (for Domain Name System). It is built on a basic-namespace, so it isn't saved to disk, and hasn't got as fancy an editor as the standard network namespaces. This namespace is put last on the namespace search list, so it's after all the standard namespaces. The patch that does this is in STUB-NAME-MANAGER, where you can check out this and three other patches to see if they suit you. Tuning parameters (see the variable doc or the code): NAME:*DNS-STUB-RESOLVER-ENABLED* NAME:*DNS-STUB-NEGATIVE-CACHE-TIMEOUT* DNS:*STUB-RESOLVER-N-RETRIES* DNS:*STUB-RESOLVER-INDIVIDUAL-TIMEOUT* DNS:*CASE-OF-HOSTS-MATTER* DNS:*DEBUG-DNS* NAME:*USE-ORIGINAL-RESOLVER-SEARCH-ALGORITHM* To make your Explorer feel good about using the DNS, you might want to do the following: * Make sure your hosts have at least an alias with the canonical name (including full domain), since the mailer may not realize that "DNS|Foo.Bar.Baz.EDU" and "Foo" in your standard namespace are really the same. A patch in STUB-NAME-MANAGER tries to fix this problem, but I'm not sure it works all the time... The best thing is probably to rename your hosts to their canonical names, and have shortnames as aliases. * Or, if you want to and don't believe too much in code purity, you can set the variable NAME:*USE-ORIGINAL-RESOLVER-SEARCH-ALGORITHM* to NIL, thereby enabling another search algorithm by Jamie Zawinski. Myself, I think that the above way of doing things is the preferred, but if you already have a1 LARGE* TI Namespace, you'll probably find it easier to switch to using Jamie's algorithm. * When your Explorer complains that "no service was available" or something like that, check if the DNS host has such a service, and if not ask the Zone manager of the DNS zone to add the corresponding WKS record. If that fails, patch NAME:DNS-STUB-MAKE-HOST-OBJECT to add that service by default. Or if you use zones that don't use WKS at all, you could setf (get :ip :default-network-services) to something appropriate. This defaults to Telnet and Finger. Notice that DNS time-to-live is never honored (even though it's easy to incorporate it if you rewrite STUB-RESOLVER). The standard timeouts for host objects apply, though. The host object created when you parse a host found in the DNS namespace holds :short-name, :aliases, :system-type, :machine-type, (:services :group), (:addresses :group), and :mail-gateway attributes. The :short-name is the first label in the name - you tell me if this should only be set up for hosts in the local zone(s). The :aliases is set up if the name parsed was a non-canonical name. The :system-type and :machine-type is set up using some yucky heuristics, since the standard names don't always fit the Explorer, and since all too many people set up their DNS resources with non-standard names. The (:services :group) attribute uses some other heuristics that usually work. Also, the (:status :tcp :ip-status) service is always put in, since it's usually not in the DNS resource. The :mail-gateway attribute is set up using the best MX record excluding any MX record pointing at the host itself. (I added this when I sent out the "announcement" that I had written this software, and my Explorer complained that SUMEX-AIM didn't have neither a :mail-to-user service or a :mail-gateway attribute). You tell me if this works. Hmm, there are probably more things I should tell you, but you'll notice. Yell if you need help - I hope I'll have time to help you. 1Please try and tell me about all bugs and misfeatures you find, and tell me about more features you'd like!* Real Soon Now I'll take up the work on a real resolver. You might want to tell me what you want to see in that, too. Of course, no warranties whatsoever, but copyright. Please send me a note if you use this software, so I can send you updates. If TI wants to use this as a base for an official product, please talk to me first (but don't hesitate, I'm not unreasonable). Many thanks to Jamie Zawinski of UC Berkeley (jwz@Teak.Berkeley.EDU) for improvements and suggestions. Yours in hacking, 22-Nov-89 14:49:04 --Bjorn Victor Victor@John-Jameson.DoCS.UU.SE Dept. of Computer Systems or Uppsala University, SWEDEN Victor%John-Jameson.DoCS.UU.SE@uunet.UU.NET