Traditionally applications have been linked with a stub resolver library that sends recursive DNS queries to a local caching name server.
IPv6 once introduced new complexity into the resolution process, such as following A6 chains and DNAME records, and simultaneous lookup of IPv4 and IPv6 addresses. Though most of the complexity was then removed, these are hard or impossible to implement in a traditional stub resolver.
BIND 9 therefore can also provide resolution services to local clients using a combination of a lightweight resolver library and a resolver daemon process running on the local host. These communicate using a simple UDP-based protocol, the "lightweight resolver protocol" that is distinct from and simpler than the full DNS protocol.
To use the lightweight resolver interface, the system must run the resolver daemon lwresd or a local name server configured with a lwres statement.
By default, applications using the lightweight resolver library will
UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
address can be overridden by lwserver
The daemon currently only looks in the DNS, but in the future
it may use other sources such as
The lwresd daemon is essentially a
caching-only name server that responds to requests using the
resolver protocol rather than the DNS protocol. Because it needs
to run on each host, it is designed to require no or minimal
Unless configured otherwise, it uses the name servers listed on
nameserver lines in
as forwarders, but is also capable of doing the resolution
none are specified.
The lwresd daemon may also be
configured with a
named.conf style configuration file,
/etc/lwresd.conf by default. A name
server may also
be configured to act as a lightweight resolver daemon using the
lwres statement in
BIND 9.9.12rc1 (Extended Support Version)