Function | Package: socket | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## configure-dns

Arguments: &key nameserver search domain auto

In order to work, the DNS utility needs to know the IP address of at least one nameserver willing to respond to recursive queries (that is, to do the work of the query if it doesn't know the answer). This function is used to specify the nameserver addresses. It can also specify other optional information. When DNS is configured, the variable `*dns-configured*` is set to true.

Name | What
--- | ---
nameserver | An IP address or a list of IP addresses of the nameservers we should consult
search | a list of strings naming the domains we should search in dns-lookup-hostname.
domain | the domain of this machine (e.g. "foo.com"). This value is stored in the variable `*dns-domain*` for programs to use.
auto | If true, determine as much of this information as possible automatically, overriding the values set by the other arguments.

We would like to be able to compute this information automatically in every situation. Currently we can handle Unix machines that specify this information in a file called /etc/resolv.conf, and we try to handle all versions of Windows (but see the note under the heading Automatic DNS configuation on Windows below).

When dns-query is called, it checks to see if configure-dns has been called since lisp started, and if not it calls configure-dns with `:auto t`. If this doesn't work it means that you need to call configure-dns with the appropriate information before you call dns-query on this machine.

### Automatic DNS configuation on Windows

On Windows the information we need to automatically configure this module is found in the Windows registry. Unfortunately the information we need is in a different place in each on the various Windows configurations we tested (such as Win NT 4 and Win2000, each with a fixed IP address or using DCHP to configure the IP address). Therefore it's likely that information will move around again in future versions of Windows. Furthermore sometimes we encounter stale information in the registry (for example, a laptop computer that used to be on a network but isn't at the moment may hold the last known nameserver information in the registry even though those nameservers are unreachable). Therefore, if you wish to make use of the Allegro CL DNS facility, you should be prepared to manually configure-dns on machines (by calling this function with auto `nil` and filling in the necessary information) when auto configuration fails.

See dns.htm for information on the domain naming system utility in Allegro CL and see socket.htm for general information on sockets in Allegro CL.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version