RHCE2B.COM
Next Previous Contents

19. BIND

19.1 Overview

  1. BIND 9

  2. Resolves hostnames to IP addresses(forward lookup).

  3. Resolves IP addresses to hostnames(reverse lookup).

  4. Provides e-mail routing information.

  5. Packages

  6. Ports

  7. redhat-config-bindconf

    GUI configuration utility provided by bindconf package.

19.2 Configuration Files

  1. /etc/named.conf

  2. /etc/nsswitch.conf

  3. /etc/hosts

  4. /etc/resolv.conf

19.3 Caching Only Name Servers

  1. Not authoritative for any zone.

  2. Uses DNS root servers or another name server known as a forwarder to resolve DNS queries.

  3. To create a Forwarding Name Server, put the following line in the "options" section of the /etc/named.conf file:
    forwarders { 192.168.1.20; };
    
  4. If you want BIND to only use it's forwarders to resolve hosts and not the root name servers, put the following line in the "options" section of the /etc/named.conf file:
    forward only;
    
    The "forwarders" option specifies which DNS or DNS servers queries should be forwarded to for resolution.

19.4 Zones

  1. Overview

  2. Master Zones

  3. Slave Zones

  4. Reverse Lookup Zones

  5. Root Zone

  6. Zone Delegation

19.5 Resource Records

  1. Format
    [domain/@]    [ttl]    [class]     <type>    <rdata>    [comment]
    

  2. Character Restrictions

    Hostnames can only consist of A-Z (case insensitive), 0-9, and -.

  3. Start of Authority (SOA)

  4. Name Server (NS)

  5. Address (A)

  6. Canonical Name (CNAME)

  7. Pointer (PTR)

  8. Mail Exchange (MX)

  9. Host Information (HINFO)

19.6 Zone Files

  1. Generally located in /var/named.

  2. Must begin with a Start Of Authority (SOA) resource record.

  3. Contain other resource records.

  4. $TTL directive must be specified.

  5. Always specify the last "." for a FQDN.

  6. Example Forward Zone File:
    $TTL    86400
    $ORIGIN xyz.com.    ; If not specified, it's taken from named.conf
    
    ;  ns1 is a nameserver for the domain.  root is the
    ;  e-mail address of the owner of the domain.  The domain
    ;  is appended to each of these values since they don't
    ;  end with a period. (e.g. they become ns1.xyz.com
    ;  and root.xyz.com);
    @           1D IN SOA ns1 root (
                                2002011901      ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                1D )            ; minimum
    
    
    ; These two lines specify the same domain.
    ; @ means take it from the $ORIGIN or the zone
    ; specified in named.conf
    @                        IN NS     ns1.xyz.com.
    xyz.com.                 IN NS     ns2.xyz.com.
    
    ns1                      IN A      192.168.1.20
    ns2                      IN A      192.168.1.21
    
    www                      IN A      192.168.1.22
    kashyyyk                 IN CNAME  www
    coruscant                IN CNAME  kashyyyk      # BAD IDEA!!
    
    www1.xyz.com.            IN A      192.168.1.23
    endor                    IN CNAME  www1
    
    mail                     IN A      192.168.1.24
    backup-mail              IN A      192.168.1.25
    
    @                        IN MX 5   mail          # Both lines reference
    xyz.com.                 IN MX 20  backup-mail   # the same domain
    
    support.xyz.com.         IN NS     ns.support.xyz.com.     # Zone delegation
    ns.support               IN A      192.168.2.20
    
    development.xyz.com.     IN NS     ns.development.xyz.com. # Zone delegation
    ns.development.xyz.com.  IN A      192.168.3.20
    

  7. Example Reverse Zone File:
    $TTL    86400
    $ORIGIN 1.168.192.in-addr.arpa.
    
    @           1D IN SOA ns1.xyz.com. root.xyz.com. (
                                2002011901      ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                1D )            ; minimum
    
    ; These two lines specify the same domain.
    ; @ means take it from the $ORIGIN or the zone specified in named.conf
    @                          IN NS        ns1.xyz.com.
    1.168.192.in-addr.arpa.    IN NS        ns2.xyz.com.
    
    20                         IN PTR       ns1.xyz.com.  # Domain appended to 20
    21.1.168.192.in-addr.arpa. IN PTR       ns2.xyz.com.  # Domain not appended (ends with a "." )
    
    22                         IN PTR       www.xyz.com.
    23.1.168.192.in-addr.arpa. IN PTR       www1.xyz.com.
    
    24                         IN PTR       mail.xyz.com.
    25                         IN PTR       mail-backup.xyz.com.
    


Next Previous Contents
ERROR!!


Linux Waves Banner Exchange
RHCE2B.COM Home Page
RHCE2B.COM Practice Test for the RHCE exam
Legal stuff