resolver.5: Add an EXAMPLES section

In case local-unbound(8) fails for some reason, it could be useful
to have a basic resolv.conf(5) example in the manual page.

Reviewed by:	karels, pauamma
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37183
This commit is contained in:
Gordon Bergling
2022-11-07 12:09:43 +01:00
parent e0dfa1c4c4
commit 4d00d772e9
+24 -1
View File
@@ -28,7 +28,7 @@
.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
.Dd September 15, 2022
.Dd November 7, 2022
.Dt RESOLVER 5
.Os
.Sh NAME
@@ -220,6 +220,29 @@ The file
resides in
.Pa /etc .
.El
.Sh EXAMPLES
A basic resolv.conf file could be in the following form.
.Bd -literal -offset indent
# The domain directive is only necessary, if your local
# router advertises something like localdomain and you have
# set up your hostnames via an external domain.
domain localdomain.tld
# In case you a running a local dns server or caching name server
# like local-unbound(8) for example.
nameserver 127.0.0.1
# IP address of the local or ISP name service
nameserver 192.168.2.1
# Fallback nameservers, in this case these from Google.
nameserver 8.8.8.8
nameserver 4.4.4.4
# Attach an OPT pseudo-RR for the EDNS0 extension,
# as specified in RFC 2671.
options edns0
.Ed
.Sh SEE ALSO
.Xr gethostbyname 3 ,
.Xr resolver 3 ,