我们有一堆ub20虚拟机
在那里resolv.conf看起来像
nameserver 127.0.0.53
options edns0 trust-ad
search domain.nl平到机床和tooling.domain.nl工场,ip地址解析
nameserver 127.0.0.53
options edns0 trust-ad
search .在这些机器上,ping到机器tooling.domain.nl工作,但是没有域名,它写着“名称解析的临时失败”。
手动将resolv.conf更改为搜索domain.nl无效,点将自动替换。
如何设置没有域名的名称解析?
发布于 2023-03-02 06:41:32
通过使用search更新"/etc/ netplan“中的netplan yaml修正: domain.nl
network:
version: 2
renderer: networkd
ethernets:
ens160:
routes:
- to: default
via: 10.203.32.254
dhcp4: no
dhcp6: no
addresses:
- 10.203.32.131/24
nameservers:
addresses:
- 10.203.32.2
- 10.203.32.3
search:
- domain.nl现在,在netplan应用之后,resolv.conf包含了"search domain.nl“行,并且它可以工作。
https://askubuntu.com/questions/1457201
复制相似问题