Re: [systemd-devel] Systemd-networkd: Prepend static nameserver to DHCP-discovered nameservers

2014-06-20 Thread Lennart Poettering
On Tue, 17.06.14 13:14, Runiq (ru...@archlinux.us) wrote:

 Hello all,
 
 I'm using systemd 213 on Arch Linux, and systemd-networkd/resolved
 with DHCP to connect to the internet. I'm also running a caching DNS
 server on 127.0.0.1.
 
 I'd like to make this caching server the first DNS server in the
 list, but I'd also like to use the nameservers discovered by
 systemd-resolved. Using a static resolv.conf isn't really possible,
 because I connect to networks with different DNS settings.
 
 I know I can set *fallback* DNS servers in
 /etc/systemd/resolved.conf, but is there a way with systemd-networkd
 to prepend my local DNS server to those discovered by DHCP?

No, this is currently not supported. 

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd-networkd: Prepend static nameserver to DHCP-discovered nameservers

2014-06-18 Thread Runiq

On 17.06.2014 14:43:25, Mantas Mikulėnas wrote:

On Jun 17, 2014 2:14 PM, Runiq ru...@archlinux.us wrote:


Hello all,

I'm using systemd 213 on Arch Linux, and systemd-networkd/resolved with
DHCP to connect to the internet. I'm also running a caching DNS server on
127.0.0.1.

I'd like to make this caching server the first DNS server in the list, but
I'd also like to use the nameservers discovered by systemd-resolved. Using
a static resolv.conf isn't really possible, because I connect to networks
with different DNS settings.


Actually, one thing I just remembered.

resolved never actually writes to /etc/resolv.conf, if I remember 
correctly. It only writes to a .conf in /run, and /etc/resolv.conf is 
just a symlink to the latter.


I know, I set that symlink up manually because I wasn't sure whether the 
file in /run would be created at all if the symlink wasn't in place. The 
manpage for systemd-resolved also states that the resolv.conf file in 
/run shouldn't be used directly but only by symlinking it to 
/etc/resolv.conf -- so I thought I'd ask on the mailing list before 
doing what you describe:


So you could just have a static /etc/resolv.conf with 127.0.0.1 in it, 
and tell your cache to look in /run/systemd/resolv.conf for the 
upstream servers' addresses. I'm sure at least dnsmasq has that 
ability.


Yep, that's basically what I'm doing now after looking over the dnsmasq 
config file (I symlinked /run/systemd/network/resolv.conf to 
/etc/resolv-networkd.conf and use that). Thanks for pointing me into 
this direction, everything works as intended now!


Cheers,
Patrice


pgpcMemnYwJ9T.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd-networkd: Prepend static nameserver to DHCP-discovered nameservers

2014-06-17 Thread Runiq

Hello all,

I'm using systemd 213 on Arch Linux, and systemd-networkd/resolved with 
DHCP to connect to the internet. I'm also running a caching DNS server 
on 127.0.0.1.


I'd like to make this caching server the first DNS server in the list, 
but I'd also like to use the nameservers discovered by systemd-resolved. 
Using a static resolv.conf isn't really possible, because I connect to 
networks with different DNS settings.


I know I can set *fallback* DNS servers in /etc/systemd/resolved.conf, 
but is there a way with systemd-networkd to prepend my local DNS server 
to those discovered by DHCP?


I've asked this question on superuser.com [1] but didn't get a 
satisfactory reply.


Thanks,
Patrice

[1] http://superuser.com/q/767827/260249


pgppYs2St3j_F.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd-networkd: Prepend static nameserver to DHCP-discovered nameservers

2014-06-17 Thread Mantas Mikulėnas
I am not sure about the part where you talk about different networks' DNS
settings.

I mean, as long as the first-listed server responds – and localhost always
responds – then the fallback servers won't be used at all.

So what's the point of having both 127.0.0.1 and external servers listed
(whether static or not)? Having them static won't make any difference.

-- 
Mantas Mikulėnas graw...@gmail.com
// sent from phone
On Jun 17, 2014 2:14 PM, Runiq ru...@archlinux.us wrote:

 Hello all,

 I'm using systemd 213 on Arch Linux, and systemd-networkd/resolved with
 DHCP to connect to the internet. I'm also running a caching DNS server on
 127.0.0.1.

 I'd like to make this caching server the first DNS server in the list, but
 I'd also like to use the nameservers discovered by systemd-resolved. Using
 a static resolv.conf isn't really possible, because I connect to networks
 with different DNS settings.

 I know I can set *fallback* DNS servers in /etc/systemd/resolved.conf, but
 is there a way with systemd-networkd to prepend my local DNS server to
 those discovered by DHCP?

 I've asked this question on superuser.com [1] but didn't get a
 satisfactory reply.

 Thanks,
 Patrice

 [1] http://superuser.com/q/767827/260249

 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd-networkd: Prepend static nameserver to DHCP-discovered nameservers

2014-06-17 Thread Mantas Mikulėnas
Actually, one thing I just remembered.

resolved never actually writes to /etc/resolv.conf, if I remember
correctly. It only writes to a .conf in /run, and /etc/resolv.conf is just
a symlink to the latter.

So you could just have a static /etc/resolv.conf with 127.0.0.1 in it, and
tell your cache to look in /run/systemd/resolv.conf for the upstream
servers' addresses. I'm sure at least dnsmasq has that ability.

-- 
Mantas Mikulėnas graw...@gmail.com
// sent from phone
On Jun 17, 2014 2:14 PM, Runiq ru...@archlinux.us wrote:

 Hello all,

 I'm using systemd 213 on Arch Linux, and systemd-networkd/resolved with
 DHCP to connect to the internet. I'm also running a caching DNS server on
 127.0.0.1.

 I'd like to make this caching server the first DNS server in the list, but
 I'd also like to use the nameservers discovered by systemd-resolved. Using
 a static resolv.conf isn't really possible, because I connect to networks
 with different DNS settings.

 I know I can set *fallback* DNS servers in /etc/systemd/resolved.conf, but
 is there a way with systemd-networkd to prepend my local DNS server to
 those discovered by DHCP?

 I've asked this question on superuser.com [1] but didn't get a
 satisfactory reply.

 Thanks,
 Patrice

 [1] http://superuser.com/q/767827/260249

 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd-networkd: Prepend static nameserver to DHCP-discovered nameservers

2014-06-17 Thread David Timothy Strauss
On Tue, Jun 17, 2014 at 4:33 AM, Mantas Mikulėnas graw...@gmail.com wrote:
 I mean, as long as the first-listed server responds – and localhost always
 responds – then the fallback servers won't be used at all.

Localhost can be subject to two types of failure:
 * The local daemon being down.
 * The resources the local daemon uses being inaccessible. It is
possible for root servers, for example, to be inaccessible while the
DHCP-issued nameservers can still be. Not all local daemons will
prefer to use the DHCP-issued nameservers as their upstream,
particularly if DNSSec is preferred/required.

Therefore, it can be useful to have a local daemon followed by
fallback to using the DHCP-issued nameservers.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel