DNS (bind) 設定 - SRV 紀錄 - Office 365 - Lync Server

  • 12551
  • 0

摘要:DNS (bind) 設定 - SRV 紀錄 - Office 365 - Lync Server

如果要描述 DNS Bind 的設定無疑是自曝其短,網路上已有許多官方與熱心網友提供的說明。今日是為了搭配 Microsoft 的服務(Office 365 與 LYNC Server),需要更動到一些設定,所以上來記錄一番。

★★一般要設定某個網域名稱對應到 IP,設定方式為★★

DomainA     IN      A       140.114.88.8

DomainA.nthu.edu.tw.     IN      A       140.114.88.8

註:上一行的最後一個點代表 DNS Root Server,也是 FQDN的完整表示 

 

★★ 若要取別名、暱名、Alias ★★

Domain_Alias     IN      CNAME       DomainX.nctu.edu.tw.

Domain_Alias.nctu.edu.tw.     IN      CNAME       DomainX.nctu.edu.tw.

 

★★ 若要向下給一個網域與指向下一層DNS ★★

dns.csie.ntu.edu.tw.    IN    A    140.112.8.88
csie    IN    NS    dns.csie.ntu.edu.tw.     //指定第一台DNS(管理子網域)
         IN    NS    dns2.csie.ntu.edu.tw.    //指定第二台DNS(管理子網域)

 

★★ 指定某網域IP對應,並給予 MX (Mail eXchange)紀錄,這樣當送信到 someone @ book.nthu.edu.tw 時,才會知道該將信件送到那一台主機去做收信的動作。★★

book    IN    A    140.114.8.88
          IN    MX    10    book.nthu.edu.tw.

 

------★★ 進入主題----------------------------------

本篇主要講的是在一般DNS設定較少用到的 SRV Record。

Q:什麼是 SRV呢?
A:SRV = Service Record. Defined in RFC 2782. The SRV RR identifies the host(s) that will support a particular service. The MX RR is a specialised example of service discovery while the SRV RR is a general purpose RR to discover any service. The SRV RR allows control over prioritisation of delivery and usage. It is not widely supported except notably by OpenLDAP and increasingly by SIP (VoIP) systems in conjunction with the NAPTR RR.

哈~為何給英文的解釋呢?因為我還沒找到一言以蔽之的解釋來描述他。

 

★★ KMS 的 SRV 紀錄 ★★

_vlmcs._tcp             IN      SRV     0 1 1688        kms.nctu.edu.tw.

下圖是在 Window DNS 的設定方式

 

★★ Office 365 所需的 MX Record (把你某的網域的信件,轉移到 MS Office 365 的 Mail Server) ★★

mailx    IN    TXT    "MS=ms22443388"
mailx    IN    MX     10    ms22443388.msv1.invalid.outlook.com.

 

★★ Office 365 Lync Server 所需的 SRV Record ★★

底下這圖是 Office 365 設定步驟中的某一畫面,他會去檢查你 DNS 的設定項目是否OK,當然也是告訴你該設定哪些東西

 

那麼在 Bind 的環境下該怎麼設定

; 對應的欄位如下
;srvce.prot.owner-name ttl class rr pri weight port target
;服務名稱.通訊協定.local主機名稱  存活時間 IN SRV 優先順序 寬度 連接埠 目的主機
_sip._tls.mailx.nctu.edu.tw. 86400 IN SRV 100 1 443 sipdir.online.lync.com.
_sipfederationtls._tcp.mailx.nctu.edu.tw. 86400 IN SRV 100 1 5060 sipfed.online.lync.com.
sip.mailx.nctu.edu.tw. IN CNAME sipdir.online.lync.com.
lyncdiscover.mailx.nctu.edu.tw. IN CNAME webdir.online.lync.com.

 

**--**--**--**--**--**--**

都設定OK後,你就可以使用 nslookup 這個指令來查詢一下, DNS Bind 的設定是否正確了

*** nslookup CNAME 的部分 ***

 

> lyncdiscover.mailx.nthu.edu.tw
伺服器: dns.nthu.edu.tw
Address: 140.113.2.2

名稱: webdir.online.lync.com
Addresses: 2a01:111:f404:a801::38
132.245.162.24
Aliases: lyncdiscover.mailx.nthu.edu.tw

> sip.mailx.nthu.edu.tw
伺服器: dns.nthu.edu.tw
Address: 140.113.2.2

名稱: sipdir.online.lync.com
Addresses: 2a01:111:f404:a801::35
132.245.162.21
Aliases: sip.mailx.nthu.edu.tw

> msoid.mailx.nthu.edu.tw
伺服器: dns.nthu.edu.tw
Address: 140.113.2.2

名稱: clientconfig.microsoftonline-p.net.nsatc.net
Address: 157.56.58.43
Aliases: msoid.mailx.nthu.edu.tw
clientconfig.microsoftonline-p.net

 

*** nslookup SRV 記錄的部分 ***

 

nslookup
> set type=srv

> _sip._tls.mailx.nthu.edu.tw
伺服器: dns.nthu.edu.tw
Address: 140.113.2.2

_sip._tls.mailx.nthu.edu.tw SRV service location:
priority = 100
weight = 1
port = 443
svr hostname = sipdir.online.lync.com
nthu.edu.tw nameserver = dns.nthu.edu.tw
sipdir.online.lync.com internet address = 132.245.162.21
sipdir.online.lync.com AAAA IPv6 address = 2a01:111:f404:a801::35
dns.nthu.edu.tw internet address = 140.113.2.2

> _sipfederationtls._tcp.mailx.nthu.edu.tw
伺服器: dns.nthu.edu.tw
Address: 140.113.2.2

_sipfederationtls._tcp.mailx.nthu.edu.tw SRV service location:
priority = 100
weight = 1
port = 5060
svr hostname = sipfed.online.lync.com
nthu.edu.tw nameserver = dns.nthu.edu.tw
dns.nthu.edu.tw internet address = 140.113.2.2

 

 

 

這樣子 DNS 的 SRV 就設定OK了,你也可以用 Lync client 連到屬於你網域的 Server (但事實上是使用微軟的主機)

 

PS:如果要參考 window DNS 的 SRV 設定方式,可以參考 http://technet.microsoft.com/en-us/library/gg398680.aspx

~ End