Systemd-resolved
systemd-resolved is a systemd service that provides network name resolution to local applications via a D-Bus interface, the resolve NSS service (nss-resolve(8)), and a local DNS stub listener on 127.0.0.53
. See systemd-resolved(8) for the usage.
Start/Enable
DNS 쿼리 구조
DNS_query_order.png
관련 파일
-
/etc/host.conf
-
/etc/hosts.allow
-
/etc/hosts.deny
-
/etc/hosts
-
/lib/systemd/system/systemd-resolved.service
/etc/resolv.conf
이 파일은 어떤 특정 도메인에 대해 IP주소값을 찾을 때, 주소 값을 어디에서 찾을 것인가를 결정하는 파일이다. 파일을 보면 다음과 같다.
-
order hosts,bind
- IP 주소 해석을 담당할 서비스의 순서를 가리킨다.
-
multi on
-
/etc/hosts
파일에 여러 개의 IP 주소를 가질 수 있도록 하는 설정 옵션이다 (복수 개의 ethN 인터페이스). 1개 이상의 IP 주소를 가지고 있는 호스트를 Multihomed라고 한다. 왜냐하면 일반적으로 여러 개의 IP 주소가 있다는 것은 호스트가 그 만큼의 네트워크 인터페이스가 있다는 것을 의미하기 때문이다.
/etc/systemd/resolved.conf
- resolved.conf
- Changing DNS with systemd-resolved | Enovision Notes
- linux - How to configure systemd-resolved and systemd-networkd to use local DNS server for resolving local domains and remote DNS server for remote domains? - Unix & Linux Stack Exchange
These configuration files control local DNS and LLMNR name resolution.
127.0.0.53
systemd-resolved는 127.0.0.53 주소에 내부 DNS 서버를 열어두고 이를 통해 도메인 주소 해석과 캐싱을 수행한다.
systemd-resolved vs dnsmasq
- Thoughts on systemd-resolved vs. dnsmasq? : r/archlinux
- [추천] The Sisyphean Task Of DNS Client Config on Linux
- Anatomy of a Linux DNS Lookup – Part I – zwischenzugs
Dnsmasq 와의 충돌 해결 방법
Dnsmasq#systemd-resolved 와의 충돌 해결 방법 항목 참조.