Lightsailで提供されているamiで使いそうなものをざっと確認
ubuntu 20.04(kernel5.4)
systemd-resoveがデフォルトで動いていてsystemd-resolveとresolvectlが両方いる
$ systemctl --version systemd 245 (245.4-4ubuntu3.1) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid
$ systemd-resolve --statistics
DNSSEC supported by current servers: no
Transactions
Current Transactions: 0
Total Transactions: 28
Cache
Current Cache Size: 2
Cache Hits: 3
Cache Misses: 29
DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0
$ resolvectl statistics
DNSSEC supported by current servers: no
Transactions
Current Transactions: 0
Total Transactions: 36
Cache
Current Cache Size: 1
Cache Hits: 3
Cache Misses: 37
DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0
Amazon Linux 2 (kernel4.14)
systemd-resolvedはそもそもいない、手動でインストールできるがコマンドもなくdbus経由でもプロパティ取得できないっぽいのであまり気にしなくてよさそう
2022が正式にリリースされたら再確認
$ systemctl --version systemd 219 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
$ dbus-send --print-reply --system --dest=org.freedesktop.resolve1 /org/freedesktop/resolve1 --type=method_call org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.resolve1.Managerl Error org.freedesktop.DBus.Error.UnknownInterface: Unknown interface 'org.freedesktop.resolve1.Managerl'. [ec2-user@ip-172-26-10-221 ~]$ dbus-send --print-reply --system --dest=org.freedesktop.resolve1 /org/freedesktop/resolve1 --type=method_call org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.resolve1.Manager method return time=1645836357.009983 sender=:1.64 -> destination=:1.75 serial=8 reply_serial=2 array [ ]
CentOS 8.2.2004(kernel4.18)
systemd-resoveがデフォルトで動いている、コマンドもどっちもいて統計情報もとれる
$ systemctl --version systemd 239 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=legacy
$ systemd-resolve --statistics
DNSSEC supported by current servers: yes
Transactions
Current Transactions: 0
Total Transactions: 2
Cache
Current Cache Size: 0
Cache Hits: 0
Cache Misses: 0
DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0
$ resolvectl statistics
DNSSEC supported by current servers: yes
Transactions
Current Transactions: 0
Total Transactions: 2
Cache
Current Cache Size: 0
Cache Hits: 0
Cache Misses: 0
DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0