
dns-options
다음을 사용하여 연결 이름을 myname
값으로 변경할 수 있습니다.value
nmcli con modify myname ipv4.dns-options value
대화형 모드를 사용하면 수행되는 작업에 대한 간단한 설명을 얻을 수 있습니다 dns-options
.
nmcli> describe ipv4.dns-options
=== [dns-options] ===
[NM property description]
Array of DNS options. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties.
질문: 필드의 가치는 무엇이며 dns-options
, 그 목적은 무엇입니까 dns-option
?
답변1
NetworkManager 소스 트리를 살펴보고( libnm-core/nm-setting-ip-config.c
찾아보기 NDOTS
) 이에 대한 지식을 바탕으로resolv.conf(5)
, 옵션은 에서 설정할 수 있는 것과 동일한 옵션으로 나타납니다 /etc/resolv.conf
.
-bash-4.2$ grep options /etc/resolv.conf
options rotate
options timeout:1
options attempts:3
답변2
@thrig 답변을 찬성하고 싶지만 아직 평판이 충분하지 않습니다. 최근에 DNS 순환 및 시간 초과를 구성해야 했습니다. 나는 따옴표를 사용하여 단일 명령으로 이를 나열해야 한다는 것을 알았습니다.
nmcli con modify <interface_name> ipv4.dns-options "timeout:1 rotate"
이는 다음과 같이 나타납니다 /etc/resolv.conf
.
# Generated by NetworkManager
nameserver 1.1.1.1
nameserver 8.8.8.8
options timeout:1 rotate