1 / 31

Web Server Administration

Web Server Administration. Chapter 4 Name Resolution. Overview. Understand the domain name service (DNS) Identify the components of DNS Configure zone files Install and configure DNS in Linux Understand name resolution in Windows Install and configure DNS in Windows 2003 Troubleshoot DNS.

Pat_Xavi
Télécharger la présentation

Web Server Administration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Server Administration Chapter 4 Name Resolution

  2. Overview • Understand the domain name service (DNS) • Identify the components of DNS • Configure zone files • Install and configure DNS in Linux • Understand name resolution in Windows • Install and configure DNS in Windows 2003 • Troubleshoot DNS

  3. Understanding the DNS • DNS is used to map host names to IP addresses on the Internet • Also called name resolution or address resolution • Whenever a host is added, a configuration file has to be manually changed • A host represents a service on a server such as FTP or a Web server • There can be many hosts on a single computer • A Microsoft Windows 2003 network uses DNS to resolve computer names on a LAN • DNS in Windows is designed to be dynamic - as computers are added to the network, DNS automatically changes

  4. Clients • On your PC, the TCP/IP configuration contains the address(es) of your DNS server(s) • Whenever you use a URL, whether in a browser, or a utility such as ping, DNS servers are used

  5. Domain Namespaces • The root level domain is "." • Significant in creating DNS files • Top-level domains include com, org, fr • More have been added in 2000 • Second-level domains are often owned by companies and individuals • microsoft.com, ccsu.edu • A subdomain is a further division of a second-level domain • For ccsu.edu, there is phx.ccsu.edu • Not common

  6. Domain Namespaces • Second-level domains, such as ccsu.edu have control over naming within their domain • Create hosts such as www, ftp • A name such as www.ccsu.edu is a fully qualified domain name (FQDN) • We could create subdomains such as phx • www.phx.ccsu.edu

  7. New Top-Level Domains • .biz - businesses • .info - anyone can register • .name - must register first and last name • .pro - for professionals only • must provide proof • .aero, .museum, .coop are controlled by organizations

  8. Host Names • The first portion of a URL is typically a host name • Typically different from the name of the computer • Many hosts can be associated with the same Web server

  9. How DNS Works

  10. DNS Components • Name server – also known as DNS server • supports name-to-address and address-to-name resolution • Name resolver – also called DNS client • Can contact DNS server to lookup name • Used by browsers, e-mail clients, and client utilities such as ping

  11. DNS Servers that Define the Internet • Primary and secondary servers store the host names used on the Internet • Caching and forwarding servers search the Internet for host names

  12. Primary and Secondary Servers • Primary Server • Defines the hosts for the domain • Maintains the database for the domain • It has authority for the domain • Secondary Server • Gets data from primary server • Provides fault tolerance and load distribution • Required for Internet domains • In a simple environment, the ISP will have the primary and secondary DNS servers • ISP maintains DNS • You have to send changes to ISP • You have the secondary server which gets updates from the primary server

  13. Resolve Host Names • Caching Server • Resolves host names • Caches (saves) the results • Automatically installed when DNS is installed • No configuration necessary • Forwarding Server • Caching server that has access to the Internet and forwards traffic from other caching servers

  14. Caching and Forwarding Servers

  15. Zones • A zone is a part of the domain namespace • For a domain as small as technowidgets.com, the domain name represents a single zone • For large organizations (such as IBM), subdomains can be divided into separately maintained zones • Each zone typically has a separate DNS

  16. Zones • Zones must be contiguous • admin.ccsu.edu can be combined with ccsu.edu • admin.ccsu.edu cannot be combined with student.ccsu.edu • There must be one primary DNS server in each zone (plus a secondary server) • Each zone can have multiple secondary DNS servers

  17. Zone File Configuration • Forward Lookup • These zones contain entries that map names to IP addresses • Reverse Lookup • These zones contain entries that map IP addresses to names

  18. Lab Projects • DNS Configuration in Linux • Projects 4-1 through 4-3 • Projects 4-4 deals with multiple domains Objective: Upon completion you must show using the dig command you get the correct IP and corresponding domain name!

  19. Review of Zoning • A zone is a part of the domain namespace • For a domain as small as technowidgets.com, the domain name represents a single zone • For large organizations (such as IBM), subdomains can be divided into separately maintained zones • Each zone typically has a separate DNS • Zone file configuration • Forward Lookup • These zones contain entries that map names to IP addresses • Reverse Lookup • These zones contain entries that map IP addresses to names

  20. File name: File name: /etc/named.conf /etc/resolve.conf DNS Configuration in LinuxFile Structure Client DNS Configuration Server DNS Configuration • Adding nameserver and domain • Nameserver: Corresponding IP address • Domain: Corresponding domain name • Name resolution

  21. /var/named/ named.technowidgets.com /var/named/ named.0.168.192 Forward Lookup file Reverse Lookup File Server DNS Configuration in Linux- File Structure 1- Configure this file so it reads the proper lookup files below File name: /etc/named.conf Defines other subdomains such as: research.technowidgets.com. mail.technowidgets.com. Defines other subdomains such as: web1 192.168.0. 20 research 192.168.0.150 mail 192.168.0.200 2- Create these two files for both forward and reverse lookup files

  22. DNS Configuration in Linux • /etc/named.conf describes the files that configure the zones • There are two primary files that it describes • Forward lookup is described by named.technowidgets.com • Reverse lookup is described by named.0.168.192

  23. /etc/named.confCreating a DNS for the technowidgets.com domain • Default setup is for localhost 127.0.0.1 • This is shown in figure 4-7 • In named.conf add the following line zone "technowidgets.com" { type master; file “named.technowidgets.com”; }; • This allows technowidgets.com to be resolved by /var/named/named.technowidgets.com • There can be multiple domains in a single named.conf file

  24. /etc/named.conf Make sure 192.168.0.20 matches your hard drive number! • Also, we can add the following line zone “0.168.192.in-addr.arpa”IN { type master; file “named.0.168.192”; }; • The domain begins at IN-ADDR.ARPA and has a substructure which follows the Internet addressing structure • Example: data for Internet address 10.2.0.52 is located at domain name 52.0.2.10.IN-ADDR.ARPA • This allows for reverse lookup for the domain • It uses all or part of the 192.168.0.20 network

  25. /var/named.technowidgets.com File ContentMust be typed! $TTL 86400 @ IN SOA web1.technowidgets.com. admn.technowidgets.com. ( 2002072100 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS web1 IN A 192.168.0.20 IN MX 10 mail.technowidgets.com. web1 IN A 192.168.0. 20 www IN CNAME web1 research IN A 192.168.0.150 IN MX 10 mail mail IN A 192.168.0.200

  26. named.0.168.192 File ContentMust be typed! $TTL 86400 @ IN SOA web1.technowidgets.com. admn.technowidgets.com. ( 2002072100 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS web1 20 IN PTR web1.technowidgets.com. 150 IN PTR research.technowidgets.com. 200 IN PTR mail.technowidgets.com.

  27. Starting DNS in LinuxUseful commands • To start DNS • /etc/rc.d/init.d/named start • To restart DNS • /etc/rc.d/init.d/named restart • To stop DNS • /etc/rc.d/init.d/named stop • To make DNS start when you boot Linux • Add the above commands to start DNS to /etc/rc.d/rc.local

  28. Configuring Client DNS in Linux • Objective: How IP addresses are corresponding to domain names • Modify /etc/resolv.config • The following line directs the client to use the DNS server at 192.168.0.20  Your HD! • nameserver 192.168.0.20 • The following line associates this computer with the technowidgets.com domain • domain technowidgets.com

  29. Troubleshooting DNSdig – available on Linux Use dig command to check the results! Upon Completion; you must be able to get this! -- Must match your HD!

  30. Linux dig hostname.com dig –silent 192-168-0-xx ping Windows nslookup hostname.com nslookup –x 192-168.0.xx Ipconfig ping Troubleshooting DNS

  31. References: • For Linux: • http://www.siliconvalleyccie.com/linux-hn/dns-static.htm • For windows • http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/5fe46cef-db12-4b78-94d2-2a0b62a28271.mspx • Read about IN-ADDR.ARPA domain • http://www.freesoft.org/CIE/RFC/1035/36.htm

More Related