1 Domain Name System Heng Sovannarith
2 Introduc:on to DNS Domain Name System is a distributed database system that can be serve as the founda:on for name resolu:on in a TCP/IP Network. DNS used in the most of Internet sodware such as web browser and electronic mail program etc to locate servers and to resolve or map the user friendly name of the computer to an IP address. Example: - >
3 Introduc:on to DNS (cont.) We have : DNS Server DNS Database DNS Client Benefit of DNS: Convenience Name are easier than to remember numeric IP Addresses Consistency IP Addresses can be changed but server name can remain constant. Simplicity user can only learn only one naming conven:on to find resources either one Internet or intranet.
4 The Host File Long :me ago, the en:re Internet was small enough that network administrators could keep track all of it in a text file call Hosts file (that listed name and IP address of every host on the network). Each computer has it s own copy of the Host file. As the Internet grow, so did the Host file. We cannot keep record of name and IP address of the millions of hosts on the Internet in a single text file. Therefore, the DNS was invent On Windows, the host file is simply located in c:\windows \system32\drivers\etc\hosts
5 Domain and Domain Name Domain Name Space Domain Name Space provides the structure of DNS distributed databases and it has hiera:cal structure. Example: Each domain has its each unique name. DNS name ARE NOT case sensi:ve.
6 Domain and Domain Name (cont.) The name of each DNS node can be up to 63 characters long (not including the dot) and can be include le_ers, numbers, and hyphens. (No other special character are allowed) DNS is a hierarchical naming system that s similar to the hierarchical folder system used by Windows The DNS tree can be up to 127 levels deep.
7 Domain and Domain Name (cont.) Fully Qualified Domain Name (FQDN) If a domain name ends with a trailing dot, that trailing dot represented the root domain and the domain name is said to be a Fully Qualified Domain Name. Example:
8 Domain and Domain Name (cont.)
9 Root Server There are 13 Root Servers in the world.
10 Top- Level Domain There are the original generic top- level domain. Domain com edu gov int mil net org DescripKon Commercial organiza:ons Educa:onal ins:tu:ons Government ins:tu:ons Interna:onal treaty organiza:ons Military ins:tu:ons Network provider Noncommercial organiza:ons
11 Top- Level Domain (cont.) Because the com domain ballooned to an almost unmanageable size. The Internet authori:es approved seven new top- level domain. Most of domain in list become available in 2002 Domain aero biz coop info museum name pro DescripKon Aerospace authority Business Coopera:ves Informa:on sites Museums Individual users Professional organiza:ons
12 Name Resolu:on Process In Name Resolu:on Process, the query was sent to DNS Server for a request for name resolu:on. Type of Queries Itera&ve : An itera&ve name query is one in which a DNS client allows the DNS server to return the best answer it can give based on its cache or zone data. If the queried DNS server does not have an exact match for the queried name, the best possible informa:on it can return is a referral (that is, a pointer to a DNS server authorita:ve for a lower level of the domain namespace). The DNS client can then query the DNS server for which it obtained a referral. It con:nues this process un:l it locates a DNS server that is authorita:ve for the queried name, or un:l an error or :me- out condi:on is met.
13 Name Resolu:on Process (cont.) Recursive: Recursive name queries are generally made by a DNS client to a DNS server, or by a DNS server that is configured to pass unresolved name queries to another DNS server, in the case of a DNS server configured to use a forwarder.
14 Name Resolu:on Process
15 Caching DNS Caching provides faster query response and reduce network traffic. DNS Servers and Client have a Cache. Caching- Only Server: Although all DNS servers cache queries that they have resolved, caching- only servers are DNS servers that only perform queries, cache the answers, and return the results. They are not authorita:ve for any domains and the informa:on that they contain is limited to what has been cached while resolving queries.
16 Authorita:ve and Nonauthorita:ve DNS Server can be either Authorita&ve or Nonauthorita&ve. An authoritakve name server is a name server that gives answers that have been configured by an original source, for example, the domain administrator or by dynamic DNS methods, in contrast to answers that were obtained via a regular DNS query to another name server. Non authoritakve name servers do not contain copies of any domains. Instead they have a cache file that is constructed from all the DNS lookups it has performed in the past for which it has go_en an authorita:ve response. Non authorita:ve name servers can be either cache or forwarders.
17 Zone Zone is basically a Text File or Database that define what machines it know about in the namespace. There are two type of zones: The primary zones is the master copy of a zone. The database for primary zone is stored in local database of the DNS Server that host the primary zone. When the zone is stored in a file, by default the primary zone file is named zone_name.dns and it is located in the %windir% \System32\Dns folder on the server. The secondary zones is a read- only copy of a zone. When server host a secondary zone, the server doesn t store a local copy of the zone data. Instead, it obtain its copy of the zone from the zones primary server by using a process called zone transfer.
18 Zone (cont.)
19 Zone Files and Resource Record Zone files organize the zone records for domain names and subdomains in a DNS server. Every domain name and subdomain has a zone file, and each zone file contains zone records. These files, editable in any plain text editor, hold the DNS informa:on linking domain names and subdomains to IP addresses. Zone files usually contain several different zone records.
20 Zone Files and Resource Record Type Name DescripKon SOA Start Of Authority Iden:fies a zone NS Name Server Iden:fies a name server that is authoriza:on for zone A Address Map a fully qualifies domain name to a IP Address CNAME Canonical Name Creates an alias for a fully qualified domain name MX Mail Exchange Iden:fies the mail server for a domain PTR Pointer Maps an IP Address to a fully qualified domain name for reverse lookups
21 Zone Files and Resource Record (cont.) SOA records: Required for every zone file, the SOA record contains caching informa:on, the zone administrator s address, and the master name server for the zone. The SOA also contains a number incremented with each update. As this number updates, it triggers the DNS to reload the zone data. NS records: Name Server (NS) records iden:fy the name server that are authorita:ve for the zone. Every zone must have at least on NS record. Using two or more NS record is be_er so that if the first name server is unavailable, the zone will s:ll be accessible.
22 Zone Files and Resource Record (cont.) A records: Address (A) record are the meat of the zone file. They provide the IP address for each of the hosts that you want to make accessible via DNS. CNAME records: A Canonical Name (CNAME) records create an alias for a fully qualified domain name. When user a_empt to access a domain name that is actually an alias, the DNS system subs:tutes the read domain name for the alias.
23 Zone Files and Resource Record (cont.) PRT Record: A Pointer (PTR) record is a the opposite of an address record: it provides the full qualified domain name for a given address. MX records: Mail Exchange (MX) records iden:fy the mail server for a domain. It provides the mail server informa:on for that zone to deliver to the correct loca:on.
24 Reverse Lookup Zone Normally DNS queries ask a name server to provide that corresponds to a full qualified domain name. It is called a forward look up. A reverse lookup is the opposite of a forward lookup: it return FQDN of a host based on its IP Address. Reverse lookup are possible because a special domain call in- addr.arpa. To enable a reverse look up for a par:cular IP Address, all you have to do is create a PTR record in a reverse lookup zone.
25 Installing DNS Go to Server Manager - > Add role - > Choose DNS Server - > Next - > Next - > Finish
26 Configuring DNS right- click the DNS server and choose ProperKes to show the dialog box shown in image below. This dialog box enables you to configure a comprehensive range of server- specific proper:es.
27 Configuring DNS (cont.) Forwarder The act of forwarding refers to the relaying of a DNS request from one server to another one when the first server is unable to process the request. It is a DNS Server to which other DNS Server forward queries. Type of Forwarders Standard Condi:onal
28 Configuring DNS (cont.)
29 Configuring DNS (cont.)
30 Configuring DNS (cont.) Select network interface which you want to provide DNS Service
31 Configuring DNS (cont.) Check the 13 Root DNS but do not do any change on them
32 Configuring DNS (cont.) If the DNS cannot find do resolve for a par:cular domain name and you want to forward it to other DNS Servers such ISP s DNS server or Google public DNS ( ), you list them in Forwarders
33 Configuring DNS (cont.)
34 Configuring DNS (cont.) To create a new Zone
35 Configuring DNS (cont.) Select the Primary Zone
36 Configuring DNS (cont.)
37 Configuring DNS (cont.) Put the domain name
38 Configuring DNS (cont.) Allow both nonsecure and secure dynamic update
39 Finish Configuring DNS (cont.)
40 Configuring DNS (cont.) You can check the SOA record
41 Configuring DNS (cont.) In SOA record Serial Number : The serial number of a zone. Secondary zones user this value to determine whether they need to ini:ate a zone transfer to update their copy of zone. Responsible Person: An e- mail address of the person responsible for this zone. Refresh Interval: a :me interval that specifies how oden a secondary server should check whether the zone need to be refreshed. A typical value is 1 hours Expire ATer: A :me interval that specifies how long a should a secondary server should keep the zone data bfor discarding it. A typical value is one day. Minimum (default) TTL: A :me interval that specifies the TTL value use for a zone resource records that omit the TTL field. Default value is one hour.
42 Configuring DNS (cont.) You can add the A record, CNAME record by right click on Zone and choose them.
43 Configuring DNS (cont.) To add Name Server, right click on Zone and choose Property and then select the Name Servers tab.
44 Configuring DNS (cont.) To add PTR record, click on Reverse Lookup Zone and choose new Zone
45 Configuring DNS (cont.)
46 Configuring DNS (cont.)
47 Configuring DNS (cont.)
48 Configuring DNS (cont.) Put the 3 octet of IP Address in your Zone
49 Configuring DNS (cont.)
50 Finish :P Configuring DNS (cont.)
51 Configuring DNS (cont.) In the Server To clear DNS Cache: C:\ipconfig /clearcache In the client machine: To resolve a Domain name: C:\nslookup rith.local To clear DNS Cache: C:\ipconfig /flushdns To display DNS Cache: C:\ipconfig /displaydns To Turn off DNS Cache: C:\net stop dnscache