Ubuntu 18
私は多くの研究をしており、この絵を整理しようとするのによく理解されていません。
mdnsに対してsystemd-resolvedを設定する方法は?
私の具体的な目標は次のとおりです。
- 10.0.0.0/16 ネットワークでサーバーを起動します。
- 新しいサーバーに、foo1などのランダムな名前を自分で付与するようにします。
- foo1という名前を使用して、同じネットワーク上の別のコンピューターからこのサーバーに接続できます。
誰もが systemd-resolved を使って具体的にこれを達成する方法を教えてもらえますか?
ありがとう
これまでsolved.confを次のように設定しました。
ubuntu@ip-10-0-0-229:/etc$ --> CHROME -> cat /etc/systemd/resolved.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
#DNS=
#FallbackDNS=
#Domains=
LLMNR=yes
MulticastDNS=yes
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
ubuntu@ip-10-0-0-229:/etc$ --> CHROME ->
ベストアンサー1
遅い答えですが、このトピックに関する情報がほとんどないため、誰かに役立つと思います。私もこの問題で時間を無駄にした。
/etc/systemd/resolved.conf を変更するのは作業の一部です。変更後も次のパズルを解く必要があります。
マルチキャストDNSは、次の場合にのみリンクで有効になります。リンクごとそしてグローバル設定がオンになっています。
コツを知れば…簡単です。
sudo systemd-resolve --set-mdns=yes --interface=wlan0
wlan0はmDNSを要求するためのインターフェースです。これにより、mDNSが有効になっていることを確認できます。
$ sudo systemd-resolve --status wlan0
Link 3 (wlan0)
Current Scopes: none
DefaultRoute setting: no
LLMNR setting: yes
MulticastDNS setting: yes #<--- BINGO!
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
systemctlを介してsystemd-resolvedを再起動します。
sudo systemctl restart systemd-resolved
mDNSが動作しています!
(今後)
~ ❯ ping homebridge.local
ping: cannot resolve homebridge.local: Unknown host
(後ろに)
~ ❯ ping homebridge.local
PING homebridge.local (192.168.1.9): 56 data bytes
64 bytes from 192.168.1.9: icmp_seq=0 ttl=64 time=21.721 ms
64 bytes from 192.168.1.9: icmp_seq=1 ttl=64 time=22.429 ms