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



你可能感兴趣的:(The DNS I know)