The DNS I know

The DNS I know


DNS stands for Domain Name System or Domain Name Server. 


The basic usage of it is to get IP via domain name. But there are advanced usages. 


DNS client queries a DNS server, and get the answer. 


RR stands for Record Resource. There are many RR types defined for providing different kind of DNS services. When DNS client initiates a query toward a DNS server, RR type is one of the parameters. Advanced usages of DNS are achieved via RR types. 


RR type A is used for getting IPv4 address via domain name. 


RR type AAAA is used for getting IPv6 address via domain name. 


RR type NAPTR, acronym for Naming Authority Pointer, allows regular expression based rewriting of domain names which can then be used as URIs, further domain names to lookups, etc.


RR type SRV, acronym for Service Resource Record, is able to be used to get services. The answer of SRV query may include domain name of the service, port of the service, protocols of the services (TCP, TLS, etc.). 


NAPTR and SRV RR types are able to be used for finding services dynamically. 


I do not list all RR types. More RR types can be found at [http://en.wikipedia.org/wiki/List_of_DNS_record_types].


[RFC6733] includes an example usage of NAPTR and SRV RR types. Followed the example. 


As an example, consider a client that wishes to resolve aaa:
   ex1.example.com.  The client performs a NAPTR query for that domain,
   and the following NAPTR records are returned:


    ;;        order pref flags service   regexp replacement
    IN NAPTR  50    50   "s"   "aaa:diameter.tls.tcp" ""
                 _diameter._tls.ex1.example.com
    IN NAPTR  100   50   "s"   "aaa:diameter.tcp"     ""
                 _aaa._tcp.ex1.example.com
    IN NAPTR  150   50   "s"   "aaa:diameter.sctp"    ""
                 _diameter._sctp.ex1.example.com


   This indicates that the server supports TLS, TCP, and SCTP in that
   order.  If the client supports TLS, TLS will be used, targeted to a




   host determined by an SRV lookup of _diameter._tls.ex1.example.com.
   That lookup would return:


    ;;       Priority  Weight  Port    Target
    IN SRV   0         1       5060    server1.ex1.example.com
    IN SRV   0         2       5060    server2.ex1.example.com



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值