Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

DNS and BIND: Configuring Multiple Domains

Creating multiple domains allows users to configure separate groups of IP addresses. One use case for this scenario is grouping IPs for different environments such as prod, dev, qa, etc into different domains and zones with different zone rules. In this lab, students will learn to configure multiple domains for the same name server in the `/etc/named.conf`. We will then create the associated zone flies and test the configuration using the `nslookup` command.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 06, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Install the bind and bind-utils Packages with YUM
    $ yum install bind bind-utils -y
    
  2. Challenge

    Configure Zones for localdomain.com and domain2.com in the /etc/named.conf File
    vim /etc/named.conf
    
    zone "localdomain.com" {
            type master;
            file "fwd.localdomain.com.db";
            allow-update { none; };
    };
    
    zone "1.0.10.in-addr.arpa" {
            type master;
            file "1.0.10.db";
            allow-update { none; };
    };
    
    zone "domain2.com" {
            type master;
            file "fwd.domain2.com.db";
            allow-update { none; };
    };
    
  3. Challenge

    Check the named.conf File for Syntax Errors
    named-checkconf
    
  4. Challenge

    Create the Forward and Reverse Zone Files in /var/named
    $ cd /var/named
    $ touch fwd.localdomain.com.db 1.0.10.db fwd.domain2.com.db
    $ ls -al
    $ chown named:named *.db
    
  5. Challenge

    Populate the Forward Zone File for localdomain.com with TTL, SOA, NS, and A, and CNAME Records
    $ vim /var/named/fwd.localdomain.com.db
    
    
    $TTL 86400
    @       IN      SOA	ns.localdomain.com.     root.localdomain.com.      (
                                   10030   ;Serial
                                   3600    ;Refresh
                                   1800    ;Retry
                                   604800  ;Expiry
                                   86400   ;Minimum TTL
    )
    ; Name Server
    @       IN      NS	ns.localdomain.com.
    ;A Record Definitions
    ns	IN	A	10.0.1.201
    ; Canonical Name/Alias
    dns     IN      CNAME   ns.localdomain.com.
    
  6. Challenge

    Run the named-checkzone Command to Check the Forward Zone File for localdomain.com for Syntax Errors
    $ named-checkzone localdomain.com fwd.localdomain.com.db
    
  7. Challenge

    Populate the Forward Zone File for domain2.com with the TTL, SOA, NS, A, and CNAME Records
    $ vim fwd.domain2.com.db
    
     $TTL 86400
    @       IN      SOA     ns.localdomain.com.     root.localdomain.com.      (
                                    10030   ;Serial
                                    3600    ;Refresh
                                    1800    ;Retry
                                    604800  ;Expiry
                                    86400   ;Minimum TTL
    )
    ; Name Server
    @       IN      NS      ns.localdomain.com.
    ;A Record Definitions
    server1 IN      A       10.0.1.220
    server2 IN      A       10.0.1.221
    ; Canonical Name/Alias
    prod     IN      CNAME   server1.domain2.com.
    
  8. Challenge

    Check the Forward Zone for domain2.com for Syntax Errors
    $ named-checkzone domain2.com fwd.domain2.com.db
    
  9. Challenge

    Populate the Reverse File for Both Zones with the TTL, SOA, NS, and PTR Records
    $ vim 1.0.10.db
    
    $TTL 86400
    @       IN      SOA     ns.localdomain.com.     root.localdomain.com.      (
                                   10030   ;Serial
                                   3600    ;Refresh
                                   1800    ;Retry
                                   604800  ;Expiry
                                   86400   ;Minimum TTL
    )
    ; Name Server
    @       IN      NS      ns.localdomain.com.
    ;PTR Records
    201     IN      PTR     ns.localdomain.com.
    220     IN      PTR     server1.domain2.com.
    221     IN      PTR     server2.domain2.com.
    
  10. Challenge

    Start the named Service
    systemctl start named
    
  11. Challenge

    Use the nslookup Command to Verify the Records That Were Configured Resolve
    $ nslookup ns.localdomain.com localhost
    $ nslookup server1.domain2.com localhost
    $ nslookup server2.domain2.com localhost
    $ nslookup 10.0.1.220 localhost
    
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight