3. Domain Name System (DNS) Administrasi Dan Manajemen
Total Page:16
File Type:pdf, Size:1020Kb
Administrasi dan Manajemen Jaringan 3. Domain Name System (DNS) M. Udin Harun Al Rasyid, Ph.D http://lecturer.eepis-its.edu/~udinharun [email protected] Lab Jaringan Komputer (C-307) Table of Contents Introduction to DNS Name Space Domain Name Space Domain Name and Label Distribution of Name Space Hierarchy of name servers Resolution DNS Basics Dynamic DNS DNS Tools, Testing, and Troubleshooting A Simple DNS Server M. Udin Harun Al Rasyid 2 Introduction to DNS Domain Name System (DNS) is an Internet service that maps IP addresses and fully qualified domain names (FQDN) to one another. A standard technology for managing the names of Web sites and other Internet domains. A key element of the DNS is a worldwide collection of DNS servers A DNS server is any computer registered to join the Domain Name System. A DNS server runs special-purpose networking software, features a public IP address, and contains a database of network names and addresses for other Internet hosts. M. Udin Harun Al Rasyid 3 In this way, DNS alleviates the need to remember IP addresses. Computers that run DNS are called name servers. Every system on the Internet must have a unique IP address. DNS acts as a directory service for all of these systems, allowing you to specify each one by its hostname. M. Udin Harun Al Rasyid 4 There are other hostname-to-IP directory services in use, mainly for LANs. Windows LANs can use WINS. UNIX LANs can use NIS. But because DNS is the directory service for the Internet (and can also be used for LANs) it is the most widely used. UNIX LANs could always use DNS instead of NIS, and starting with Windows 2000 Server, Windows LANs could use DNS instead of, or in addition to, WINS. M. Udin Harun Al Rasyid 5 When you enter www.some-domain.com in a Web browser, it's DNS that takes the www host name and translates it to an IP address. Without DNS, you could be connected to the Internet just fine, but you ain't goin' no where. Not unless you keep a record of the IP addresses of all of the resources you access on the Internet and use those instead of host/domain names. M. Udin Harun Al Rasyid 6 When you visit a Web site, you are actually doing so using the site's IP address even though you specified a host and domain name in the URL. In the background your computer quickly queried a DNS server to get the IP address that corresponds to the Web site's server and domain names. Now you know why you have to specify one or two DNS server IP addresses in the TCP/IP configuration on your desktop PC (in the resolv.conf file on a Linux system and the TCP/IP properties in the Network Control Panel on Windows systems). M. Udin Harun Al Rasyid 7 When you visit Web sites, the DNS server your workstation queries for name resolution is typically run by your ISP, but you could have one of your own. When you have your own Web site the DNS servers which respond to visitors queries are typically run by your Web hosting provider, but you could likewise have your own one of these too. Actually, if you set up your own DNS server it could be used to respond to both "internal" (from your workstation) and "external" (from your Web site's visitors) queries. The most widely used DNS application is BIND (Berkeley Internet Name Domain) and it runs a daemon called named that, among other things, responds to resolution queries. M. Udin Harun Al Rasyid 8 Name Space The names assigned to machines must be carefully selected from a name space with complete control over the binding between the names and IP addresses. M. Udin Harun Al Rasyid 9 Domain Name Space To have a hierarchical name space, a domain name space was designed. In this design the names are defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0 (root) to level 127. M. Udin Harun Al Rasyid 10 Domain Name and Label M. Udin Harun Al Rasyid 11 Domain M. Udin Harun Al Rasyid 12 Distribution of Name Space The information contained in the domain name space must be stored. However, it is very inefficient and also unreliable to have just one computer store such a huge amount of information. M. Udin Harun Al Rasyid 13 Hierarchy of name servers M. Udin Harun Al Rasyid 14 Zones and domains M. Udin Harun Al Rasyid 15 Domain name space is divided into three different sections: generic domains country domains the inverse domain M. Udin Harun Al Rasyid 16 Generic domains M. Udin Harun Al Rasyid 17 Generic domain labels M. Udin Harun Al Rasyid 18 Country domains M. Udin Harun Al Rasyid 19 Inverse domain M. Udin Harun Al Rasyid 20 Resolution Mapping a name to an address or an address to a name is called name-address resolution. Recursive Iterative M. Udin Harun Al Rasyid 21 Recursive resolution M. Udin Harun Al Rasyid 22 Iterative resolution M. Udin Harun Al Rasyid 23 DNS Basics Finding a single server out of all of the servers on the Internet is like trying to find a single file on drive with thousands of files. The DNS "namespace" is hierarchical in the same type of upside- down tree structure seen with file systems. M. Udin Harun Al Rasyid 24 DNS can use either UDP or TCP. In both cases the well-known port used by the server is port 53. UDP is used when the size of the response message is less than 512 bytes because most UDP packages have a 512-byte packet size limit. If the size of the response message is more than 512 bytes, a TCP connection is used. M. Udin Harun Al Rasyid 25 When specifying the absolute path to a file in a file system you start at the root and go to the file: /etc/bind/named.conf When specifying the absolute path to a server in the DNS namespace you start at the server and go to the root: www.eepis-its.edu M. Udin Harun Al Rasyid 26 Internet resources are usually specified by a domain name and a server hostname. The www part of a URL is often the hostname of the Web server. DNS is basically just a database with records for these hostnames. If you want to find the IP address of the www server in the some- domain.com domain, you'd have to query the DNS server that stores the DNS records for that domain. M. Udin Harun Al Rasyid 27 The entries in the database map a host/domain name to an IP address. This is why a real Internet server needs a static (unchanging) IP address. The IP address of the server's NIC connected to the Internet has to match whatever address is in the DNS database. M. Udin Harun Al Rasyid 28 When you want to browse to www.their-domain.com, your DNS server (the one you specify in the TCP/IP configuration on your desktop computer) most likely won't have a DNS record for the their- domain.com domain. So it has to contact the DNS server that does. When your DNS server contacts the DNS server that has the DNS records (referred to as "resource records" or "zone records") for their-domain.com.Your DNS server gets the IP address of the www server and relays that address back to your desktop computer. M. Udin Harun Al Rasyid 29 Once you've got your Web site up and running on your Web hosting provider's servers and someone surf's to your site, the DNS server they specified in their local TCP/IP configuration will query your hosting provider's DNS servers to get the IP address for your Web site. The DNS servers that host the DNS records for your domain, i.e. the DNS servers you specify in your domain name registration application, are the authoritative DNS servers for your domain. The surfer's DNS server queries one of your site's authoritative DNS servers to get an address and gets an authoritative response. When the surfer's DNS server relays the address information back to the surfer's local PC it is a "non-authoritaive" response because the surfer's DNS server is not an authoritative DNS server for your domain. M. Udin Harun Al Rasyid 30 Example: If you surf to eepis's Web site the DNS server you have specified in your TCP/IP configuration queries one of eepis's authoritative DNS servers and gets an authoritative response with the IP address for the 'www' server. Your DNS server then sends a non-authoritative response back to your PC. You can easily see this for yourself. At a shell prompt, or a DOS window on a newer Windows system, type in: nslookup www.eepis-its.edu.edu First you'll see the name and IP address of your locally-specified DNS server. Then you'll see the non-authoritative response your DNS server sent back containing the name and IP address of the eepis Web server. M. Udin Harun Al Rasyid 31 You can also see which name server(s) your DNS server contacted to get the IP address. whois eepis-its.edu Because DNS is so important to the operation of the Internet, when you register a domain name you must specify a minimum of two name servers.