2011年5月25日 星期三

DNRD intro. from README

簡單來說
DNRD負責將hosts 傳送來的dns request, pass到不同的DNS Server.
並且將DNS Server處理好的dns reply, pass回到hosts.
因此hosts就可以知道domain name要對應什麼ip address.

-s 可以允許你設定要forward 到哪些 DNS Server.

-s ipaddr(:domain)
--server=ipaddr(:domain)
Add a forward DNS server. If multiple -s options are given, dnrd treats the first as a primary DNS server and the rest as backup servers. If the primary DNS server times out, it is deactivated and the next specified server (that is active) is used until the previous gets reactivated.

你也可以把dnrd自己當作一個簡單的DNS Server.
這個時候你要利用
-m來做設定

預設會讀取/usr/local/etc/dnrd/master
如果此檔案不存在
就會讀取/etc/hosts
當然你也可以設定其他lcoal位置
-m (off|hosts)
--master=(off|hosts)
dnrd can act as the primary name server for a number of hosts. By default, it will read in /usr/local/etc/dnrd/master to determine how this is done. If that file doesn't exist, it will act as the primary server for the hosts found in /etc/hosts. This option allows you to override the default behavior. Setting it to off turns off all primary server functionality. Setting it to hosts causes dnrd to act as the primary server for hosts in /etc/hosts regardless of whether it could find /usr/local/etc/dnrd/master.

透過Facebook分享

沒有留言: