1RESOLVCONF(8)             BSD System Manager's Manual            RESOLVCONF(8)
2

NAME

4     resolvconf — a framework for managing multiple DNS configurations
5

SYNOPSIS

7     resolvconf -I
8     resolvconf [-m metric] [-p] [-x] -a interface[.protocol] <file
9     resolvconf -C pattern
10     resolvconf -c pattern
11     resolvconf [-f] -d interface[.protocol]
12     resolvconf [-x] -il pattern
13     resolvconf -u
14     resolvconf --version
15

DESCRIPTION

17     resolvconf manages resolv.conf(5) files from multiple sources, such as
18     DHCP and VPN clients.  Traditionally, the host runs just one client and
19     that updates /etc/resolv.conf.  More modern systems frequently have wired
20     and wireless interfaces and there is no guarantee both are on the same
21     network.  With the advent of VPN and other types of networking daemons,
22     many things now contend for the contents of /etc/resolv.conf.
23
24     resolvconf solves this by letting the daemon send their resolv.conf(5)
25     file to resolvconf via stdin(4) with the argument -a interface[.protocol]
26     instead of the filesystem.  resolvconf then updates /etc/resolv.conf as
27     it thinks best.  When a local resolver other than libc is installed, such
28     as dnsmasq(8) or named(8), then resolvconf will supply files that the
29     resolver should be configured to include.
30
31     resolvconf assumes it has a job to do.  In some situations resolvconf
32     needs to act as a deterrent to writing to /etc/resolv.conf.  Where this
33     file cannot be made immutable or you just need to toggle this behaviour,
34     resolvconf can be disabled by adding resolvconf=NO to resolvconf.conf(5).
35
36     resolvconf can mark an interfaces resolv.conf as private.  This means
37     that the name servers listed in that resolv.conf are only used for
38     queries against the domain/search listed in the same file.  This only
39     works when a local resolver other than libc is installed.  See
40     resolvconf.conf(5) for how to configure resolvconf to use a local name
41     server and how to remove the private marking.
42
43     resolvconf can mark an interfaces resolv.conf as exclusive.  Only the
44     latest exclusive interface is used for processing, otherwise all are.
45
46     When an interface goes down, it should then call resolvconf with -d
47     interface.* arguments to delete the resolv.conf file(s) for all the
48     protocols on the interface.  For systems that support the concept of per‐
49     sisting configuration when the carrier goes down, then it should instead
50     call resolvconf with -C interface.* arguments to deprecate the matching
51     interfaces and -c interface.* to activate the matching interfaces when
52     the carrier comes up.  This only affects the order in which interfaces
53     are processed.
54
55     Here are some options for the above commands:-
56
57     -f           Ignore non existent interfaces.  Only really useful for
58                  deleting interfaces.
59
60     -m metric    Set the metric of the interface when adding it, default of
61                  0.  Lower metrics take precedence.  This affects the default
62                  order of interfaces when listed.
63
64     -p           Marks the interface resolv.conf as private.
65
66     -x           Mark the interface resolv.conf as exclusive when adding,
67                  otherwise only use the latest exclusive interface.
68
69     resolvconf has some more commands for general usage:-
70
71     -i pattern   List the interfaces and protocols, optionally matching
72                  pattern, we have resolv.conf files for.
73
74     -l pattern   List the resolv.conf files we have.  If pattern is specified
75                  then we list the files for the interfaces and protocols that
76                  match it.
77
78     -u           Force resolvconf to update all its subscribers.  resolvconf
79                  does not update the subscribers when adding a resolv.conf
80                  that matches what it already has for that interface.
81
82     --version    Echo the resolvconf version to stdout.
83
84     resolvconf also has some commands designed to be used by it's subscribers
85     and system startup:-
86
87     -I           Initialise the state directory /run/resolvconf.  This only
88                  needs to be called if the initial system boot sequence does
89                  not automatically clean it out; for example the state direc‐
90                  tory is moved somewhere other than /var/run.  If used, it
91                  should only be called once as early in the system boot
92                  sequence as possible and before resolvconf is used to add
93                  interfaces.
94
95     -R           Echo the command used to restart a service.
96
97     -r service   If the service is running then restart it.  If the service
98                  does not exist or is not running then zero is returned, oth‐
99                  erwise the result of restarting the service.
100
101     -v           Echo variables DOMAINS, SEARCH and NAMESERVERS so that the
102                  subscriber can configure the resolver easily.
103
104     -V           Same as -v except that only the information configured in
105                  resolvconf.conf(5) is set.
106

INTERFACE ORDERING

108     For resolvconf to work effectively, it has to process the resolv.confs
109     for the interfaces in the correct order.  resolvconf first processes
110     interfaces from the interface_order list, then interfaces without a metic
111     and that match the dynamic_order list, then interfaces with a metric in
112     order and finally the rest in the operating systems lexical order.  See
113     resolvconf.conf(5) for details on these lists.
114

PROTOCOLS

116     Here are some suggested protocol tags to use for each resolv.conf file
117     registered on an interface:-
118
119     dhcp         Dynamic Host Configuration Protocol.  Initial versions of
120                  resolvconf did not recommend a protocol tag be appended to
121                  the interface name.  When the protocol is absent, it is
122                  assumed to be the DHCP protocol.
123
124     ppp          Point-to-Point Protocol.
125
126     ra           IPv6 Router Advertisement.
127
128     dhcp6        Dynamic Host Configuration Protocol, version 6.
129

IMPLEMENTATION NOTES

131     If a subscriber has the executable bit then it is executed otherwise it
132     is assumed to be a shell script and sourced into the current environment
133     in a subshell.  This is done so that subscribers can remain fast, but are
134     also not limited to the shell language.
135
136     Portable subscribers should not use anything outside of /bin and /sbin
137     because /usr and others may not be available when booting.  Also, it
138     would be unwise to assume any shell specific features.
139

ENVIRONMENT

141     IF_METRIC
142     If the -m option is not present then we use IF_METRIC for the metric.
143
144     IF_PRIVATE
145     Marks the interface resolv.conf as private.
146
147     IF_EXCLUSIVE
148     Marks the interface resolv.conf as exclusive.
149

FILES

151     /etc/resolv.conf.bak
152     Backup file of the original resolv.conf.
153
154     /etc/resolvconf.conf
155     Configuration file for resolvconf.
156
157     /usr/lib/resolvconf
158     Directory of subscribers which are run every time resolvconf adds,
159     deletes or updates.
160
161     /usr/lib/resolvconf/libc.d
162     Directory of subscribers which are run after the libc subscriber is run.
163
164     /run/resolvconf
165     State directory for resolvconf.
166

SEE ALSO

168     resolver(3), stdin(4), resolv.conf(5), resolvconf.conf(5)
169

HISTORY

171     This implementation of resolvconf is called openresolv and is fully com‐
172     mand line compatible with Debian's resolvconf, as written by Thomas Hood.
173

AUTHORS

175     Roy Marples <roy@marples.name>
176

BUGS

178     Please report them to
179           http://roy.marples.name/projects/openresolv
180
181     resolvconf does not validate any of the files given to it.
182
183     When running a local resolver other than libc, you will need to configure
184     it to include files that resolvconf will generate.  You should consult
185     resolvconf.conf(5) for instructions on how to configure your resolver.
186
187BSD                            December 23, 2016                           BSD
Impressum