Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2022-09-24 03:10:48
Size: 1910
Comment:
Revision 4 as of 2023-06-22 20:46:52
Size: 1629
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
'''Domain Name Resolution''' ('''DNS''') was [[BIND|invented for BSD]], so in many ways ''DNS for BSD'' is just textbook DNS. '''Domain Name Resolution''' ('''DNS''') was [[Bind|invented for BSD]], so in many ways ''DNS for BSD'' is just textbook DNS.
Line 13: Line 13:

Line 15: Line 17:
The '''Name Service Switch''' ('''NSS''') file (`/etc/nsswitch.conf`) defines the order of operations for various services, among them being name resolution.

A minimal configuration looks like...
The [[BSD/NsSwitchConf|Name Service Switch (NSS) configuration file]] (`/etc/nsswitch.conf`) defines the order of operations for various services, among them being name resolution.
Line 23: Line 23:
This configuration will require a fully configured hosts file, as seen below.

See [[BSD/nsswitch.conf|here]] for more details on configuring `/etc/nsswitch`.
Line 31: Line 27:
The '''hosts''' file (`/etc/hosts`) is a list of addresses and names, especially for local hosts and machines. A basic hosts file looks like: The [[Linux/Hosts|hosts file]] (`/etc/hosts`) is a list of addresses and names, especially for local hosts and machines.
Line 41: Line 37:
The '''resolver''' configuration file (`/etc/resolv.conf`) is a list of nameservers to query for name resolution. The [[Linux/ResolvConf|resolver configuration file]] (`/etc/resolv.conf`) is a list of nameservers to query for name resolution. Changes are immediately effective.
Line 43: Line 39:
It isn't recommended to manage this file directly. Instead, allow `dhclient(8)` and `resolvconf(8)` to overwrite the file and configure the behavior of those programs. It isn't recommended to manage this file directly. Instead, allow [[Dhclient|dhclient(8)]] and [[OpenResolv|resolvconf(8)]] to overwrite the file and configure the behavior of those programs.

At any time, the resolver file can be re-generated by running `resolvconf -u`.



=== Utilities ===

 * `drill(1)`, used as `drill NAME @SERVER TYPE`
 * [[Bind/Dig|dig(1)]]
Line 55: Line 60:
----


== Usage ==



=== Userland ===

The [[BIND]] project is bundled with general-purpose utilities, such as `dig(1)`.



=== System ===

As mentioned above, two services (`dhclient(8)` and `resolvconf(8)`) overwrite the resolver file.

At any time, the resolver file can be re-generated by running `resolvconf -u`.

DNS on BSD

Domain Name Resolution (DNS) was invented for BSD, so in many ways DNS for BSD is just textbook DNS.


Name resolution

Name Service Switch

The Name Service Switch (NSS) configuration file (/etc/nsswitch.conf) defines the order of operations for various services, among them being name resolution.

hosts: files dns

Hosts

The hosts file (/etc/hosts) is a list of addresses and names, especially for local hosts and machines.

127.0.0.1 localhost

Resolver

The resolver configuration file (/etc/resolv.conf) is a list of nameservers to query for name resolution. Changes are immediately effective.

It isn't recommended to manage this file directly. Instead, allow dhclient(8) and resolvconf(8) to overwrite the file and configure the behavior of those programs.

At any time, the resolver file can be re-generated by running resolvconf -u.

Utilities

  • drill(1), used as drill NAME @SERVER TYPE

  • dig(1)


Multicast name resolution

Multicast domain name resolution (mDNS) is an expansion of the DNS protocol. An mDNS broadcaster makes use of port 5353 and resolves names in the .local domain.

There is no mature implementation of mDNS for the BSDs. Avahi may work; OpenMDNS was designed for use in OpenBSD and may be more compatible.


CategoryRicottone

BSD/DNS (last edited 2023-06-22 20:46:52 by DominicRicottone)