Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #244265 > unrolled thread

DHCP and search list for DNS domains

Started bySteve Keller <keller.steve@gmx.de>
First post2022-01-21 14:20 +0100
Last post2022-01-21 17:30 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  DHCP and search list for DNS domains Steve Keller <keller.steve@gmx.de> - 2022-01-21 14:20 +0100
    Re: DHCP and search list for DNS domains Markus Schönhaber <debian-user@list-post.mks-mail.de> - 2022-01-21 15:20 +0100
      Re: DHCP and search list for DNS domains Steve Keller <keller.steve@gmx.de> - 2022-01-21 16:20 +0100
    Re: DHCP and search list for DNS domains Charles Curley <charlescurley@charlescurley.com> - 2022-01-21 15:30 +0100
    Re: DHCP and search list for DNS domains David Wright <deblis@lionunicorn.co.uk> - 2022-01-21 17:30 +0100

#244265 — DHCP and search list for DNS domains

FromSteve Keller <keller.steve@gmx.de>
Date2022-01-21 14:20 +0100
SubjectDHCP and search list for DNS domains
Message-ID<DI1ZD-6Q7-1@gated-at.bofh.it>
With DHCP I can tell a host the DNS server and the domain name of the
network, which is then stored to /etc/resolv.conf.  But how can I add
a list a domain names that should be searched when resolving a host
name?

AFAICS, there is no option in DHCP to provide the search list.  So the
questions is, is there a way to configure locally in the client host a
search list that is added to /etc/resolv.conf?

Say, for example, my domain domain is foo.bar.org and the DHCP server
configuration has

    option domain-name "foo.bar.org";
    option domain-name-servers ns.foo.bar.org;

but I want bar.org also in the DNS domain search list, so I can

    ping host

to get host.bar.org.  That is, in /etc/resolv.conf there should be

    domain foo.bar.org
    search foo.bar.org bar.org
    nameserver <ip-address of ns.foo.bar.org>

AFAIK, some of my client hosts have only resolvconf, others use some
systemd stuff, since the man page for resolvconf is actually the
man page for resolvectl which also refers to systemd-resolved.

Steve

[toc] | [next] | [standalone]


#244268

FromMarkus Schönhaber <debian-user@list-post.mks-mail.de>
Date2022-01-21 15:20 +0100
Message-ID<DI2VH-7op-1@gated-at.bofh.it>
In reply to#244265
21.01.22, 13:57 +0100, Steve Keller:

> With DHCP I can tell a host the DNS server and the domain name of the
> network, which is then stored to /etc/resolv.conf.  But how can I add
> a list a domain names that should be searched when resolving a host
> name?
> 
> AFAICS, there is no option in DHCP to provide the search list.

 From dhcp-options(5):

>        option domain-search domain-list;
> 
>          The domain-search option specifies a  ´search  list´  of  Domain
>          Names to be used by the client to locate not-fully-qualified do‐
>          main names.  The difference between this option and historic use
>          of  the domain-name option for the same ends is that this option
>          is encoded in RFC1035 compressed labels on the wire.  For  exam‐
>          ple:
> 
>            option domain-search "example.com", "sales.example.com",
>                                 "eng.example.com";

-- 
Regards
   mks

[toc] | [prev] | [next] | [standalone]


#244271

FromSteve Keller <keller.steve@gmx.de>
Date2022-01-21 16:20 +0100
Message-ID<DI3RM-80E-7@gated-at.bofh.it>
In reply to#244268
"Markus Schönhaber" <debian-user@list-post.mks-mail.de> wrote:

> > AFAICS, there is no option in DHCP to provide the search list.
> 
>  From dhcp-options(5):
> 
> >        option domain-search domain-list;
> > 
> >          The domain-search option specifies a  ´search  list´  of  Domain
> >          Names to be used by the client to locate not-fully-qualified do‐
> >          main names.  The difference between this option and historic use
> >          of  the domain-name option for the same ends is that this option
> >          is encoded in RFC1035 compressed labels on the wire.  For  exam‐
> >          ple:
> > 
> >            option domain-search "example.com", "sales.example.com",
> >                                 "eng.example.com";

Oops, I must have overseen it.  I've read the man pages but probably I only
read dhcpd(8) and dhcpd.conf(5), but missed dhcp-options(5).

Thanks,
Steve

[toc] | [prev] | [next] | [standalone]


#244269

FromCharles Curley <charlescurley@charlescurley.com>
Date2022-01-21 15:30 +0100
Message-ID<DI35o-7rv-7@gated-at.bofh.it>
In reply to#244265
On Fri, 21 Jan 2022 13:57:47 +0100
Steve Keller <keller.steve@gmx.de> wrote:

> With DHCP I can tell a host the DNS server and the domain name of the
> network, which is then stored to /etc/resolv.conf.  But how can I add
> a list a domain names that should be searched when resolving a host
> name?

root@chaffee:~# grep -i search /etc/dhcp/dhcpd.conf
    option domain-search "domain0", "domain1", "domain2";
root@chaffee:~# 

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

[toc] | [prev] | [next] | [standalone]


#244280

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-01-21 17:30 +0100
Message-ID<DI4Xv-b8-7@gated-at.bofh.it>
In reply to#244265
On Fri 21 Jan 2022 at 13:57:47 (+0100), Steve Keller wrote:

> AFAIK, some of my client hosts have only resolvconf, others use some
> systemd stuff, since the man page for resolvconf is actually the
> man page for resolvectl which also refers to systemd-resolved.

The man page for /package/ resolvconf is   man 8 resolvconf,
not man resolvconf.

$ dpkg -L resolvconf

or whatever the package is, can be useful here.

Cheers,
David.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web