Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #211976
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Which resolv.conf file? |
| Date | 2019-07-31 16:00 +0200 |
| Message-ID | <ypXj3-1YP-3@gated-at.bofh.it> (permalink) |
| References | <ypPYe-5Ud-5@gated-at.bofh.it> <ypPYe-5Ud-3@gated-at.bofh.it> <ypQ7U-5XW-3@gated-at.bofh.it> <ypQhA-61x-3@gated-at.bofh.it> <ypWmZ-1oI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 31 Jul 2019 at 08:50:34 (-0400), Greg Wooledge wrote:
> On Wed, Jul 31, 2019 at 09:21:32AM +0300, Reco wrote:
> > On Wed, Jul 31, 2019 at 09:16:03AM +0300, Andrei POPESCU wrote:
> > > On Mi, 31 iul 19, 09:06:36, Reco wrote:
> > > > Assuming it is, and you're using ifupdown, you need to change
> > > > "dns-nameserver" stanza in the interface definition.
> > >
> > > Careful, in /etc/network/interfaces it's 'dns-nameservers' (mind the
> > > trailing 's'), because you can list more servers ;)
> >
> > /usr/share/doc/resolvconf/README.gz disagrees with you:
> >
> > * For each inet static logical interface through which a nameserver
> > is accessible, add lines like the following to /etc/network/interfaces .
> >
> > dns-nameserver 11.22.33.44
> > dns-nameserver 55.66.77.88
> > dns-search foo.org bar.com
>
> Reco is correct.
>
> isc-dhcp-client uses "domain-name-servers" in its configuration file,
> whereas resolvconf uses "dns-nameserver". Most likely, Andrei momentarily
> confused the two.
It might be the documentation that's confused. Here's an extract from
man resolvconf
✄✄✄✄✄✄✄✄
ifup
The ifup program can be used to configure network interfaces
according to settings in /etc/network/interfaces. To make
ifup push nameserver information to resolvconf when it
configures an interface the administrator must add dns- option
lines to the relevant iface stanza in interfaces(5). The
following option names are accepted: dns-nameserver,
dns-search, and dns-sortlist. To add a nameserver IP address,
add an option line consisting of dns-nameserver and the
address. To add multiple nameserver addresses, include
multiple such dns-nameserver lines.
dns-nameserver 192.168.1.254
dns-nameserver 8.8.8.8
To add search domain names, add a line beginning with dns-search.
dns-search foo.org bar.com
The dns-nameservers option is also accepted and, unlike dns-nameserver, can be given mul‐
tiple arguments, separated by spaces.
The dns-domain option is deprecated in favor of dns-search.
The resulting stanza might look like the following example.
iface eth0 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 192.168.1.254
dns-nameserver 8.8.8.8
dns-search foo.org bar.com
✄✄✄✄✄✄✄✄
IOW you should be able to write
dns-nameserver 192.168.1.254
dns-nameserver 8.8.8.8
or
dns-nameservers 192.168.1.254 8.8.8.8
But I have no idea whether
dns-nameservers 8.8.8.8
and
dns-nameservers 192.168.1.254
dns-nameservers 8.8.8.8
are supported. Messy.
Cheers,
David.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Which resolv.conf file? Reco <recoverym4n@enotuniq.net> - 2019-07-31 08:10 +0200
Re: Which resolv.conf file? Andrei POPESCU <andreimpopescu@gmail.com> - 2019-07-31 08:20 +0200
Re: Which resolv.conf file? Reco <recoverym4n@enotuniq.net> - 2019-07-31 08:30 +0200
Re: Which resolv.conf file? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-07-31 15:00 +0200
Re: Which resolv.conf file? David Wright <deblis@lionunicorn.co.uk> - 2019-07-31 16:00 +0200
Re: Which resolv.conf file? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-07-31 16:30 +0200
Re: Which resolv.conf file? Reco <recoverym4n@enotuniq.net> - 2019-07-31 16:40 +0200
Re: Which resolv.conf file? <tomas@tuxteam.de> - 2019-07-31 18:00 +0200
Re: Which resolv.conf file? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-07-31 18:10 +0200
Re: Which resolv.conf file? <tomas@tuxteam.de> - 2019-07-31 18:40 +0200
Re: Which resolv.conf file? Andrei POPESCU <andreimpopescu@gmail.com> - 2019-07-31 22:30 +0200
Re: Which resolv.conf file? Celejar <celejar@gmail.com> - 2019-08-02 05:20 +0200
csiph-web