Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-02-2004, 05:35 AM
|
#1
|
Member
Registered: Apr 2004
Location: India
Posts: 42
Rep:
|
DNS lookup
hi,
i have installed bind-9.2.0-8 on redhat7.3. there three other systems on the network having linux installed on them. i have configured all the required files for dns to work properly.
The problem is that when i dig:-
dig localhost (i.e any system)
connection timeout: no servers found
The same is the situation with host and nslookup.
The DNS is not working at all.
following are the code of different files:-
named.conf:-
## named.conf - configuration for bind
#
# Generated automatically by bindconf, alchemist et al.
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
include "/etc/rndc.key";
options {
directory "/var/named/";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "localhost" {
type master;
file "localhost.zone";
};
zone.net.schroder
dns zone for for schroder.net
;
$ORIGIN LinuxGroup.net
$TTL 1D
; any time you make a change to the domain, bump the
; "serial" setting below. the format is easy:
; YYYYMMDDI, with the I being an iterator in case you
; make more than one change during any one day
@ IN SOA redhat55.LinuxGroup.net. hostmaster.LinuxGroup.net. (
200405199 ; serial
8H ; refresh
4H ; retry
4W ; expire
1D ) ; minimum
; redhat55.LinuxGroup.net serves this domain as both the
; name server (NS) and mail exchange (MX)
;
NS redhat55.LinuxGroup.net.
; define domain functions with CNAMEs
vibhor CNAME redhat55
; just in case someone asks for localhost.LinuxGroup.net
localhost A 127.0.0.1
; our hostnames, in alphabetical order
redhat55 A 195.168.0.55
redhat57 A 195.168.0.57
redhat58 A 195.168.0.58
redhat66 A 195.168.0.66
revp.10.11.12
reverse pointers for 195.168.0.0 subnet
;
$ORIGIN 0.168.195.in-addr.arpa.
$TTL 1D
@ IN SOA redhat55.LinuxGroup.net. hostmaster.schroder.net. (
200405193 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
2419200 ; expire (4 weeks)
86400 ; minimum (1 day)
)
; define the authoritative name server
NS redhat55.LinuxGroup.net.
; our hosts, in numeric order
55 PTR redhat55.LinuxGroup.net.
57 PTR redhat57.LinuxGroup.net.
58 PTR redhat58.LinuxGroup.net.
66 PTR redhat66.LinuxGroup.net.
following is the outout of /var/log/messages file after startting the named:-
Oct 2 11:40:18 redhat55 named[5023]: starting BIND 9.2.0 -u named
Oct 2 11:40:18 redhat55 named[5023]: using 1 CPU
Oct 2 11:40:18 redhat55 named[5026]: loading configuration from '/etc/named.conf'
Oct 2 11:40:18 redhat55 named[5026]: no IPv6 interfaces found
Oct 2 11:40:18 redhat55 named[5026]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 2 11:40:18 redhat55 named[5026]: listening on IPv4 interface eth0, 195.168.0.55#53
Oct 2 11:40:18 redhat55 named[5026]: command channel listening on 127.0.0.1#953
Oct 2 11:40:18 redhat55 named[5026]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Oct 2 11:40:18 redhat55 named[5026]: zone 0.168.195.in-addr.arpa/IN: loaded serial 200405193
Oct 2 11:40:18 redhat55 named[5026]: zone localhost/IN: loaded serial 42
Oct 2 11:40:18 redhat55 named[5026]: dns_master_load: zone.net.schroder:18: LinuxGroup.net.LinuxGroup.net: not at top of zone
Oct 2 11:40:18 redhat55 named[5026]: zone LinuxGroup.net/IN: loading master file zone.net.schroder: not at top of zone
Oct 2 11:40:18 redhat55 named[5026]: running
Oct 2 11:40:18 redhat55 named: named startup succeeded
note:- the ip affress of the linux systems is in subnet 195.168.0.0 although the names of zone files are different.
Thanks in advance....
cheers
|
|
|
10-02-2004, 06:55 AM
|
#2
|
Member
Registered: Sep 2004
Location: Germany
Distribution: Gentoo
Posts: 164
Rep:
|
bind seems to work ... did you configure the clients via /etc/resolv.conf?
they should look like
Code:
nameserver 195.168.0.55
domain LinuxGroup.net
|
|
|
10-04-2004, 01:06 AM
|
#3
|
Member
Registered: Apr 2004
Location: India
Posts: 42
Original Poster
Rep:
|
thanks for this psisquare.... i will try this and let you know about it
|
|
|
10-11-2004, 07:56 AM
|
#4
|
Member
Registered: Apr 2004
Location: India
Posts: 42
Original Poster
Rep:
|
apologies for late reply...... this is due to the internet connection.
i am facing a new problem in DNS server. the DNS lookups on clients fails i.e whenever i try to DNS lookup from a client ...i get error.
The dig command is working fine for the "localhost" .
but it is not working fine with lookups for names othernames like "redhat55.LinuxGroup.net".....
The output the command: dig redhat55.LinuxGroup.net give SERVFAIL in STATUS attribute.
Host command is working fine for all the reverse lookups.
also the log file /var/log/messages shows a following line:
zone.net.schroder:18:LinuxGroup.net domain not at top of domain.
What could be the problem? how could i solve it.
|
|
|
10-11-2004, 11:20 AM
|
#5
|
Member
Registered: Sep 2004
Location: Germany
Distribution: Gentoo
Posts: 164
Rep:
|
Now, this looks like a problem with the DNS server. Check that you've got a file /var/named/named.ca on the server that looks something like this (maybe with some comments):
Code:
A.ROOT-SERVERS.NET. 598027 IN A 198.41.0.4
B.ROOT-SERVERS.NET. 157393 IN A 192.228.79.201
C.ROOT-SERVERS.NET. 40328 IN A 192.33.4.12
D.ROOT-SERVERS.NET. 40329 IN A 128.8.10.90
E.ROOT-SERVERS.NET. 602759 IN A 192.203.230.10
F.ROOT-SERVERS.NET. 328003 IN A 192.5.5.241
G.ROOT-SERVERS.NET. 602759 IN A 192.112.36.4
H.ROOT-SERVERS.NET. 602759 IN A 128.63.2.53
I.ROOT-SERVERS.NET. 40329 IN A 192.36.148.17
J.ROOT-SERVERS.NET. 139424 IN A 192.58.128.30
K.ROOT-SERVERS.NET. 40329 IN A 193.0.14.129
L.ROOT-SERVERS.NET. 40329 IN A 198.32.64.12
M.ROOT-SERVERS.NET. 40328 IN A 202.12.27.33
|
|
|
10-11-2004, 12:57 PM
|
#6
|
Member
Registered: Apr 2004
Location: India
Posts: 42
Original Poster
Rep:
|
yup... the file exists and looks like this,
;This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
;
; This file is made available by InterNIC
; under anonymous FTP as
; file /domain/named.root
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; last update: Jan 29, 2004
; related version of root zone: 2004012900
;
;
; formerly NS.INTERNIC.NET
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
;
; formerly C.PSI.NET
;
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
;
; formerly TERP.UMD.EDU
;
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
;
; formerly NS.NASA.GOV
;
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
;
; formerly NS.ISC.ORG
;
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
;
; formerly NIC.NORDU.NET
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
;
; operated by VeriSign, Inc.
;
. 3600000 NS J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
;
; operated by RIPE NCC
;
. 3600000 NS K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
;
; operated by ICANN
;
. 3600000 NS L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12
;
; operated by WIDE
;
. 3600000 NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
; End of File
|
|
|
10-11-2004, 01:50 PM
|
#7
|
Member
Registered: Sep 2004
Location: Germany
Distribution: Gentoo
Posts: 164
Rep:
|
Sorry for my last post; I just re-checked your first message.
redhat??.LinuxGroup.net is meant to point to your local pc's, and named.ca has nothing to with this.
However, I missed appropriete zone sections in your named.conf:
[code]
zone "LinuxGroup.net" {
type master;
file "zone.net.schroder";
}
zone "0.168.195.in-addr.arpa" {
type master;
file "revp.10.11.12";
}
[/edit]
(your file naming scheme is a bit confusing...)
|
|
|
10-19-2004, 08:12 AM
|
#8
|
Member
Registered: Apr 2004
Location: India
Posts: 42
Original Poster
Rep:
|
ok fine... i have changed all the ip address and all the files names accordingly. here is the code of different files :-
The named.conf file:
# named.conf - configuration for bind
#
# Generated automatically by bindconf, alchemist et al.
controls {
inet 127.0.0.1 allow { localhost; 172.16.17.0/24; } keys { rndckey; };
};
include "/etc/rndc.key";
options {
directory "/var/named/";
};
zone "." IN {
type hint;
file "named.root";
};
zone "LinuxGroup.net" IN {
type master;
file "zone.net.LinuxGroup";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "revp.127.0.0";
};
zone "localhost" {
type master;
file "zone.localhost";
};
zone "17.16.172.in-addr.arpa" IN {
type master;
file "revp.17.16.172";
};
File zone.net.Linuxgroup:
;dns zone for for LinuxGroup.net
;
$ORIGIN LinuxGroup.net
$TTL 86400
; any time you make a change to the domain, bump the
; "serial" setting below. the format is easy:
; YYYYMMDDI, with the I being an iterator in case you
; make more than one change during any one day
@ IN SOA redhat55.LinuxGroup.net. root.localhost. (
200405200 ; serial
8H ; refresh
4H ; retry
4W ; expire
1D ) ; minimum
; redhat55.LinuxGroup.net serves this domain as both the
; name server (NS) and mail exchange (MX)
;
IN NS redhat55
; define domain functions with CNAMEs
vibhor CNAME redhat55
; just in case someone asks for localhost.LinuxGroup.net
localhost A 127.0.0.1
; our hostnames, in alphabetical order
redhat55 A 172.16.17.55
redhat57 A 172.16.17.57
redhat58 A 172.16.17.58
redhat66 A 172.16.17.66
file revp.17.16.172 :
;reverse pointers for 172.16.17.0 subnet
;
$ORIGIN 17.16.172.in-addr.arpa.
$TTL 86400
@ IN SOA redhat55. root.localhost. (
200405195 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
2419200 ; expire (4 weeks)
86400 ; minimum (1 day)
)
; define the authoritative name server
IN NS redhat55.LinuxGroup.net
; our hosts, in numeric order
55 PTR redhat55.LinuxGroup.net.
57 PTR redhat57.LinuxGroup.net.
58 PTR redhat58.LinuxGroup.net.
66 PTR redhat66.LinuxGroup.net.
file named.root:
;This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
;
; This file is made available by InterNIC
; under anonymous FTP as
; file /domain/named.root
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; last update: Jan 29, 2004
; related version of root zone: 2004012900
;
;
; formerly NS.INTERNIC.NET
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
;
; formerly C.PSI.NET
;
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
;
; formerly TERP.UMD.EDU
;
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
;
; formerly NS.NASA.GOV
;
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
;
; formerly NS.ISC.ORG
;
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
;
; formerly NIC.NORDU.NET
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
;
; operated by VeriSign, Inc.
;
. 3600000 NS J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
;
; operated by RIPE NCC
;
. 3600000 NS K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
;
; operated by ICANN
;
. 3600000 NS L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12
;
; operated by WIDE
;
. 3600000 NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
; End of File
Output of /var/log/messages when named service is restarted:
Oct 12 11:49:32 redhat55 named[924]: shutting down
Oct 12 11:49:32 redhat55 named[924]: stopping command channel on 127.0.0.1#953
Oct 12 11:49:32 redhat55 named[924]: no longer listening on 127.0.0.1#53
Oct 12 11:49:32 redhat55 named[924]: no longer listening on 172.16.17.55#53
Oct 12 11:49:32 redhat55 named[921]: exiting
Oct 12 11:49:33 redhat55 named: named shutdown succeeded
Oct 12 11:49:37 redhat55 named[2382]: starting BIND 9.2.0 -u named
Oct 12 11:49:37 redhat55 named[2382]: using 1 CPU
Oct 12 11:49:37 redhat55 named[2385]: loading configuration from '/etc/named.conf'
Oct 12 11:49:37 redhat55 named: named startup succeeded
Oct 12 11:49:37 redhat55 named[2385]: no IPv6 interfaces found
Oct 12 11:49:37 redhat55 named[2385]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 12 11:49:37 redhat55 named[2385]: listening on IPv4 interface eth0, 172.16.17.55#53
Oct 12 11:49:37 redhat55 named[2385]: command channel listening on 127.0.0.1#953
Oct 12 11:49:37 redhat55 named[2385]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Oct 12 11:49:37 redhat55 named[2385]: zone 17.16.172.in-addr.arpa/IN: loaded serial 200405195
Oct 12 11:49:37 redhat55 named[2385]: zone localhost/IN: loaded serial 42
Oct 12 11:49:37 redhat55 named[2385]: dns_master_load: zone.net.LinuxGroup:18: LinuxGroup.net.LinuxGroup.net: not at top of zone
Oct 12 11:49:37 redhat55 named[2385]: zone LinuxGroup.net/IN: loading master file zone.net.LinuxGroup: not at top of zone
Oct 12 11:49:37 redhat55 named[2385]: running
Oct 12 11:49:37 redhat55 named[2385]: zone 17.16.172.in-addr.arpa/IN: sending notifies (serial 200405195)
output of dig command:
: dig localhost
; <<>> DiG 9.2.0 <<>> localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30337
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 86400 IN A 127.0.0.1
;; AUTHORITY SECTION:
localhost. 86400 IN NS localhost.
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Oct 12 11:59:15 2004
;; MSG SIZE rcvd: 57
: dig redhat58.LinuxGroup.net
; <<>> DiG 9.2.0 <<>> redhat58.LinuxGroup.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 17452
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;redhat58.LinuxGroup.net. IN A
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Oct 12 12:02:04 2004
;; MSG SIZE rcvd: 41
|
|
|
10-19-2004, 11:24 AM
|
#9
|
Member
Registered: Sep 2004
Location: Germany
Distribution: Gentoo
Posts: 164
Rep:
|
As named says:
Code:
zone.net.LinuxGroup:18: LinuxGroup.net.LinuxGroup.net: not at top of zone
Where's it getting that bogus LinuxGroup.net.LinuxGroup.net from?
I'm using a very similar configuration (but with bind8, maybe it doesn't work with bind9). The differences that _could_ cause the problem are
- I don't have these $ORIGIN/$TTL statements in the zone file. I don't think bind should use them, though.
- I'm using a local TLD (no .net subdomain) for local PCs
Apart from that I'm pretty much clueless. Have you scanned through bind's docs and the DNS HOWTO?
|
|
|
All times are GMT -5. The time now is 10:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|