LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Need Help Building Small Office DNS / DHCP Server (https://www.linuxquestions.org/questions/linux-networking-3/need-help-building-small-office-dns-dhcp-server-666194/)

Popsicle-Pete 08-28-2008 11:37 PM

Need Help Building Small Office DNS / DHCP Server
 
Hello Linux Community!

I am working on building my first real Linux server for a small office. The server is probably overkill for the environment but I thought it would be a great learning experience. At this point I am running the following software:

OS: Fedora Core 9
Kernel: 2.6.25.14-108.fc9.i686
DHCP: isc-dhcpd-4.0.0
BIND: 9.5.0-P1

I have DHCP up and running nicely but DNS is giving me some issues. I'll post my named/zones below but first the issue that concerns me.
After building the zone files I run 'named-checkzone' to verify they are setup correctly. Note, I have replaced the offices domain with example.com for the sake of their privacy.

First zone looks good:
Code:

[root@alpha named]# named-checkzone example.com example.com.zone
zone example.com/IN: loaded serial 2008082808
OK

Second zone not so great:
Code:

[root@alpha named]# named-checkzone example.com 2.168.192.in-addr.arpa.zone
zone example.com/IN: NS 'alpha.example.com' has no address records (A or AAAA)
zone example.com/IN: loaded serial 2008082808
OK

There are address records in this zone file so I'm not sure why it is spitting back the "has no address records" message. Is this normal? Here are my configs:

named.conf
Code:

options{
        directory      "/var/named/";
};

zone "example.com" IN {
        type    master;
        file    "example.com.zone";
};

zone "2.168.192.in-addr.arpa" {
        type master;
        file "2.168.192.in-addr.arpa.zone";
};

example.com.zone
Code:

;##############################
;# Resolve Name - IP Address  #
;# example.com.zone          #
;##############################

$TTL 43200
@                    IN SOA alpha.example.com. root (
                2008082808      ; Serial
                300            ; Refresh - 5 Minutes
                60              ; Retry - 1 minute
                      1209600        ; Expire - 2 Weeks
                      43200 )          ; Minimum - 12 Hours

;################
;# NAME SERVERS #
;################

                  IN            NS      alpha.example.com.
                IN      MX  10  alpha.example.com.

;#################
;# DEVICES START #
;#################

linksys                IN            A              192.168.2.1
alpha                  IN      A      192.168.2.2

;################
;# DHCP STARTS  #
;################

dhcp50                IN        A        192.168.2.50
dhcp51                IN        A        192.168.2.51
dhcp52                IN        A        192.168.2.52
dhcp53                IN        A        192.168.2.53
dhcp54                IN        A        192.168.2.54
dhcp55                IN        A        192.168.2.55
dhcp56                IN        A        192.168.2.56
dhcp57                IN        A        192.168.2.57
dhcp58                IN        A        192.168.2.58
dhcp59                IN        A        192.168.2.59
dhcp60                IN        A        192.168.2.60
dhcp61                IN        A        192.168.2.61
dhcp62                IN        A        192.168.2.62
dhcp63                IN        A        192.168.2.63
dhcp64                IN        A        192.168.2.64
dhcp65                IN        A        192.168.2.65
dhcp66                IN        A        192.168.2.66
dhcp67                IN        A        192.168.2.67
dhcp68                IN        A        192.168.2.68
dhcp69                IN        A        192.168.2.69
dhcp70                IN        A        192.168.2.70
dhcp71                IN        A        192.168.2.71
dhcp72                IN        A        192.168.2.72
dhcp73                IN        A        192.168.2.73
dhcp74                IN        A        192.168.2.74
dhcp75                IN        A        192.168.2.75
dhcp76                IN        A        192.168.2.76
dhcp77                IN        A        192.168.2.77
dhcp78                IN        A        192.168.2.78
dhcp79                IN        A        192.168.2.79
dhcp80                IN        A        192.168.2.80
dhcp81                IN        A        192.168.2.81
dhcp82                IN        A        192.168.2.82
dhcp83                IN        A        192.168.2.83
dhcp84                IN        A        192.168.2.84
dhcp85                IN        A        192.168.2.85
dhcp86                IN        A        192.168.2.86
dhcp87                IN        A        192.168.2.87
dhcp88                IN        A        192.168.2.88
dhcp89                IN        A        192.168.2.89
dhcp90                IN        A        192.168.2.90
dhcp91                IN        A        192.168.2.91
dhcp92                IN        A        192.168.2.92
dhcp93                IN        A        192.168.2.93
dhcp94                IN        A        192.168.2.94
dhcp95                IN        A        192.168.2.95
dhcp96                IN        A        192.168.2.96
dhcp97                IN        A        192.168.2.97
dhcp98                IN        A        192.168.2.98
dhcp99                IN        A        192.168.2.99

2.168.192.in-addr.arpa.zone
Code:

;###############################
;# Resolve IP Address - Name  #
;# 2.168.192.in-addr.arpa.zone #
;###############################

$TTL 43200
@                IN SOA alpha.example.com. root (
                  2008082808      ; Serial
                  300            ; Refresh - 5 Minutes
                60              ; Retry - 1 minute
                1209600        ; Expire - 2 Weeks
                43200)                ; Minimum - 12 Hours

;################
;# NAME SERVERS #
;################

                IN        NS        alpha.example.com.

;#################
;# DEVICES START #
;#################

1                IN        PTR        linksys.example.com.
2                IN        PTR        alpha.example.com.

;################
;# DHCP STARTS  #
;################

50                IN        PTR        dhcp50.example.com.
51                IN        PTR        dhcp51.example.com.
52                IN        PTR        dhcp52.example.com.
53                IN        PTR        dhcp53.example.com.
54                IN        PTR        dhcp54.example.com.
55                IN        PTR        dhcp55.example.com.
56                IN        PTR        dhcp56.example.com.
57                IN        PTR        dhcp57.example.com.
58                IN        PTR        dhcp58.example.com.
59                IN        PTR        dhcp59.example.com.
60                IN        PTR        dhcp60.example.com.
61                IN        PTR        dhcp61.example.com.
62                IN        PTR        dhcp62.example.com.
63                IN        PTR        dhcp63.example.com.
64                IN        PTR        dhcp64.example.com.
65                IN        PTR        dhcp65.example.com.
66                IN        PTR        dhcp66.example.com.
67                IN        PTR        dhcp67.example.com.
68                IN        PTR        dhcp68.example.com.
69                IN        PTR        dhcp69.example.com.
70                IN        PTR        dhcp70.example.com.
71                IN        PTR        dhcp71.example.com.
72                IN        PTR        dhcp72.example.com.
73                IN        PTR        dhcp73.example.com.
74                IN        PTR        dhcp74.example.com.
75                IN        PTR        dhcp75.example.com.
76                IN        PTR        dhcp76.example.com.
77                IN        PTR        dhcp77.example.com.
78                IN        PTR        dhcp78.example.com.
79                IN        PTR        dhcp79.example.com.
80                IN        PTR        dhcp80.example.com.
81                IN        PTR        dhcp81.example.com.
82                IN        PTR        dhcp82.example.com.
83                IN        PTR        dhcp83.example.com.
84                IN        PTR        dhcp84.example.com.
85                IN        PTR        dhcp85.example.com.
86                IN        PTR        dhcp86.example.com.
87                IN        PTR        dhcp87.example.com.
88                IN        PTR        dhcp88.example.com.
89                IN        PTR        dhcp89.example.com.
90                IN        PTR        dhcp90.example.com.
91                IN        PTR        dhcp91.example.com.
92                IN        PTR        dhcp92.example.com.
93                IN        PTR        dhcp93.example.com.
94                IN        PTR        dhcp94.example.com.
95                IN        PTR        dhcp95.example.com.
96                IN        PTR        dhcp96.example.com.
97                IN        PTR        dhcp97.example.com.
98                IN        PTR        dhcp98.example.com.
99                IN        PTR        dhcp99.example.com.

Any information is greatly appreciated! If you need additional logs/info please let me know. Thanks in advance!

zaichik 08-30-2008 10:39 AM

Hi,

Your second zone check is not correct. The syntax is
Code:

named-checkzone dns.zone.to.check /path/to/zonefile
On that second check, you want to make sure that the zone file is syntactically correct for the zone 2.168.192.in-addr.arpa, rather than for the zone example.com. Thus, the syntax should be
Code:

named-checkzone 2.168.192.in-addr.arpa 2.168.192.in-addr.arpa.zone
Hope that helps.

Popsicle-Pete 09-02-2008 04:23 PM

Awww - Such a simple error. Thank you for pointing out the not-so-obvious =)

Everything ran smoothly when I started named, I just wanted to be sure.


All times are GMT -5. The time now is 03:48 AM.