小编run*_*niq的帖子

Systemd-networkd:如何将静态名称服务器条目添加到 DHCP 发现的名称服务器?

我在 Arch Linux 上使用 systemd 213,并且 systemd-networkd/resolved with DHCP 连接到互联网。我还在 127.0.0.1 上运行缓存 DNS 服务器。我想让这个服务器成为列表中的第一个 DNS 服务器,但我也想使用 systemd-resolved 发现的名称服务器。使用静态 resolv.conf 是不可能的,因为我连接到具有不同 DNS 设置的网络。

我知道我可以设置备用DNS服务器/etc/systemd/resolved.conf,但有与systemd-networkd的方式预先考虑我的本地DNS服务器,那些DHCP发现的?


编辑:到目前为止我尝试过的

  • DNS.network文件中添加一个手动条目会导致该条目被附加而不是前置:

    # This file is managed by systemd-resolved(8). Do not edit.
    #
    # Third party programs must not access this file directly, but
    # only through the symlink at /etc/resolv.conf. To manage
    # resolv.conf(5) in a different way, replace the symlink by a
    # static file or a different …
    Run Code Online (Sandbox Code Playgroud)

networking linux dns dhcp systemd

9
推荐指数
1
解决办法
6202
查看次数

标签 统计

dhcp ×1

dns ×1

linux ×1

networking ×1

systemd ×1