Setting up DNS prior to installing RHEV-M 3.0 Beta

Latest response
OK,

Here are some quick notes on BIND for those who may not know the setup. I did this before completing rhevm-setup, as I did not want to rely on static HOSTS entries:

1) Install BIND Dns Server
# yum install bind

2) Change some options in /etc/named.conf so we can listen and serve:

options {
listen-on port 53 { 192.168.1.59; };
listen-on-v6 port 53 { ::1; };
// allow-query     { localhost; };

// -<Comment this or set it to your subnet>-
recursion no;

// -<Disable Recursive Querying - optional>-


3) Before saving the file, append these lines (salt to taste)

zone "ctusa.local" IN {
type master;
file "/var/named/data/forward.zone";
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "/var/named/data/reverse.zone";
};



4) Create the zone files as seen here:
# /var/named/data/forward.zone ::
$ORIGIN ctusa.local.
$TTL 1h
ctusa.local.  IN  SOA  proxy.ctusa.local. root.ctusa.local. (
              2011081503 ; serial number of this zone file
              1d         ; slave refresh (1 day)
              2h         ; slave retry time in case of a problem (2 hours)
              4w         ; slave expiration time (4 weeks)
              1h         ; maximum caching time in case of failed lookups (1 hour)
              )
ctusa.local.   NS proxy.ctusa.local.
proxy      A    192.168.1.59
rhevm      A    192.168.1.60
hypervisor      A    192.168.1.61
storage  A 192.168.1.62


# /var/named/data/reverse.zone
1.168.192.in-addr.arpa.  IN  SOA  proxy.ctusa.local. root.ctusa.local. (
              2011081504 ; serial number of this zone file
              1d         ; slave refresh (1 day)
              2h         ; slave retry time in case of a problem (2 hours)
              4w         ; slave expiration time (4 weeks)
              1h         ; maximum caching time in case of failed lookups (1 hour)
              )
  NS proxy.ctusa.local.

59 IN PTR proxy.ctusa.local.
60 IN PTR rhevm.ctusa.local.
61 IN PTR hypervisor.ctusa.local.
62 IN PTR storage.ctusa.local.


5) Set your DNS entries on your systems to point to the IP of the DNS server.


6) Fire it up: 
# service named start

7) Run rhevm-setup

Responses

I have setup caching and forwarding, here are selected example from my named.conf:

# 23.2.2.0/24 is my rhevm subnet

# local domain is: demo.redhat.com

 

acl demo.redhat.com { 23.2.2.0/24; 127.0/8; };
options {
    listen-on port 53 { 127.0.0.1; 23.2.2.1;};
    listen-on-v6 port 53 { ::1; };
    directory     "/var/named";
    dump-file     "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { demo.redhat.com; };
    recursion yes;
       

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";

       forwarders { 10.35.255.6; }; #IP of upstream ISP nameserver(s)
       forward only; #rely completely on our upstream nameservers

};
 

# Forward Zone for demo.redhat.com domain
zone "demo.redhat.com" IN {
        type master;
        file "demo.redhat.com.zone";
};

# Reverse Zone
zone "2.2.23.in-addr.arpa" IN {
        type master;
        file "23.2.2.zone";           
};

 

My domain resolution in: /var/named/demo.redhat.com.zone:

$TTL 1D

demo.redhat.com.             IN      SOA     tcontrol.demo.redhat.com. foo.bar.tld. (
                                200612060                 ; serial
                                2H                        ; refresh slaves
                                5M                        ; retry
                                1W                        ; expire
                                1M                        ; Negative TTL
                                )

@                       IN      NS      tcontrol.demo.redhat.com.

tcontrol.demo.redhat.com.       IN      A       23.2.2.1     ; RHEL server
rhevm        IN      A       23.2.2.10      ; RHEV Manager
atlantic     IN      A       23.2.2.20      ; Host
pacific      IN      A       23.2.2.30      ; Host

 

And reverse lookup in /var/named/23.2.2.zone:

$TTL 1D

@       IN      SOA     tcontrol.demo.redhat.com. foo.bar.tld. (
200612060       ; serial
2H              ; refresh slaves
5M              ; retry
1W              ; expire
1M              ; Negative TTL
)

        IN      NS      tcontrol.demo.redhat.com.
10      IN      PTR     rhevm.demo.redhat.com.
20      IN      PTR     atlantic.demo.redhat.com.
30      IN      PTR     pacific.demo.redhat.com.

 

 

After step 6

 

prompt> chkconfig named on

I think it might be a lot easer to just configure/enable dnsmasq to listen on whatever interfaces you have and then just add entries in /etc/hosts.