9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

avahiとmDNS

Last updated at Posted at 2014-07-21

Linuxで[hogehoge.local]の名前解決を可能にする

##Avahaiのインストール
※CentOSなどではディフォルトでインストールされている

コマンド
yum install avahi avahi-tools

##ファイアウォール(iptables)を開放する

/etc/sysconfig/iptables
-A INPUT -p udp --dport 5353 -j ACCEPT #追記

LinuxからmDNSで名前解決(正引き)をするには「nss-mdns」が必要

コマンド
yum install nss-mdns

##名前解決の優先順位を変更する

/etc/nsswitch.conf
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

動作確認

コマンド
ping hogehoge.local
PING hogehoge.local (192.168.100.53) 56(84) bytes of data.
64 bytes from hogehoge.local (192.168.100.53): icmp_seq=1 ttl=64 time=0.229 ms
64 bytes from hogehoge.local (192.168.100.53): icmp_seq=2 ttl=64 time=0.272 ms
9
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?