LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS service error questions (https://www.linuxquestions.org/questions/linux-networking-3/dns-service-error-questions-233679/)

emailssent 09-29-2004 10:32 PM

So, ok fine i will try to solve the problem and get back here.

In the mean while any more suggestion are most welcome from LQ members..


Thankx

emailssent 10-04-2004 04:02 AM

Hi all of you,

I read some DNS material and decided to start confiugring DNS from scratch,

some achivements over past configurations are

->> now i can ping 192.168.1.1 from 192.168.1.2 by their ip and by their names( c5m9x2 and wren repectively)

->> and i can run(that gives me error free output) following command

# dig -x 127.0.0.1
# host -a c5m9x2
# host -l foobirds.org 192.168.1.2
# host -v c5m9x2
$ dig @192.168.1.2 c5m9x2.foobirds.org a
$ dig c5m9x2
$ nslookup c5m9x2
$ nslookup wren

and i can't run following command(commands that give me error )
====================================================
#host 192.168.1.1
# host 192.168.1.2
$ dig -x 192.168.1.1
$ dig -x 192.168.1.2
$ dig wren
$ dig localhost
$dig c5m9x2
$ nslookup 192.168.1.2
$ nslookup 192.168.1.1

So,

As i can use host command for name (host -x c5m9x2)resolution why i can't use host command to map ip(host 192.168.1.1) to name

and i can dig -x 127.0.0.1 so why i can't dig 192.168.1.2 and so why i can't run the above commands.



Plz. help needed to learn DNS server, learnt many things want to learn more


For further reference output of any of command and any of the bind configuration files can provided , if needed

bathory 10-04-2004 04:18 AM

Hi again,
If your named.conf is the one in your 1st post, then it's natural since you didn't define the zone files for the 192.168.x.x
Create those files (one for your domain IPS and the other for the reverse zone).
Example:
1st: yourdomain
192.168.1.1 IN A c5m9x2
192.168.0.2 IN A wren

2nd: yourdomain.reverse
1 IN PTR c5m9x2
2 IN PTR wren

emailssent 10-04-2004 04:28 AM

thanx, i had created zone......

for reference (all newly configured files)
==========

#/etc/named.conf ( a basic configuration file of master server)

options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
};

zone "." {
type hint;
file "named.ca";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};

zone "foobirds.org" {
type master;
file "foobirds.hosts";
};

zone "168.192.in-addr-arpa" {
type master;
file "192.168.reverse";
};

#/var/named/foobirds.org
$TTL 1d
@ IN SOA wren.foobirds.org. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

;Define the nameservers

NS wren.foobirds.org.

;Define localhost
localhost A 127.0.0.1

;Define the hosts in this zone

c5m9x2 A 192.168.1.1 ;window 98
wren A 192.168.1.2 ;linux mandrake
yoyo A 192.168.1.3 ;linux redhat

#/var/named/192.168.reverse
$TTL 1d
@ IN SOA wren.foobirds.org. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

NS wren.foobirds.org.

1.1 PTR c5m9x2.foobirds.org.
2.1 PTR wren.foobirds.org.
3.1 PTR yoyo.foobirds.org.



scowles 10-04-2004 05:57 AM

I can't tell if there was a question in your last post, but I spotted a few changes that need to be made to your current configuration.

1) Since you are not specifying an RR type in your zone calls in named.conf, then each zone definition record would need to specify the RR type. Example:

cut/paste from your named.conf
zone "foobirds.org" {
type master;
file "foobirds.hosts";
};

...needs to be
zone "foobirds.org" IN {
type master;
file "foobirds.hosts";
};

Now your zone files will load properly. Why? Because each record in your zone files do NOT specify an RR type. Example:

cut/paste from foobirds.org
c5m9x2 A 192.168.1.1 ;window 98
...needs to be
c5m9x2 IN A 192.168.1.1 ;window 98

In fact, I add RR types in both named.conf and all my zone files.

2) The name server record in your zone files needs (in addition to #1), the domain name specifed. example:
NS wren.foobirds.org.
...needs to be
@ IN NS wren.foobirds.org.

3) Your zone definition for 192.168.1 is referencing the wrong zone name. Example:
zone "168.192.in-addr-arpa" {
type master;
file "192.168.reverse";
};

Should be zone "168.192.in-addr.arpa"

BTW: unlike the host and nslookup commands, dig requires a fully qualifed domain name to be specifed.

emailssent 10-04-2004 06:24 AM

Quote:

3) Your zone definition for 192.168.1 is referencing the wrong zone name. Example:
zone "168.192.in-addr-arpa" {
type master;
file "192.168.reverse";
};

Should be zone "168.192.in-addr.arpa"

Plz. tell me what is wrong in my zone defination fo 192.168.1 , as in your above statement.....

scowles 10-04-2004 06:32 AM

It's nothing more than a typo...

-arpa versus .arpa

emailssent 10-04-2004 07:07 AM

Thanks, Thanks, Thanks, Thanks, Thanks.........
 
:study:



Thanks scowles, bathory, darthtux :p


Finally I can run all the previous command mentioned in previous posts. :p

Their was a typo mistake due to which reverse zone file was not able to load and problem of defining RR type (IN)... :p



Thanks && Congratulation all of you, I learnt all the basics now I will read some advanced topics (DNS security , Dynamic DNS(DDNS) etc.) and get here if I will not able to solve any query. :p


:scratch:


gt1 10-05-2004 10:45 AM

Hello!
I am having some of the same problems described earlier in this thread. It is disappointing- I used to run BIND on RedHat and Mandrake years ago, but now nothing works!
The most urgent problem is that I can't get the secondary server to sync with primary. Primary is running Simple DNS Plus on WinXP (I had to have something working, had no luck with Linux). The network is not connected to Internet.
On the secondary server I run BIND9 on Fedora 2.
BIND process is running: ps shows /usr/sbin/named -u named -t /var/named/chroot

When BIND starts, I see the following in /var/log/messages
listening on IPv4 interface lo, 127.0.0.1#53
listening on IPv4 interface eth0, 192.168.8.250#53
couldn't add command channel 127.0.0.1#953: not found
couldn't add command channel : :1#953: not found
running
dumping master file: slaves/tmp-XXXXJZfoNO: open: file not found
transfer of 'aa.com/IN' from 192.168.8.242#53: failed while receiving responces: file not found
transfer of 'aa.com/IN' from 192.168.8.242#53: end of transfer
named startup succeeded
dumping master file: slaves/tmp-XXXXJZfoNO: open: file not found
transfer of 'aa.com/IN' from 192.168.8.242#53: failed while receiving responces: file not found
transfer of 'aa.com/IN' from 192.168.8.242#53: end of transfer

At the same time, log on the primary server says:
Zone Transfer Request from 192.168.8.250 for aa.com (TCP)
Sending zone Transfer to 192.168.8.250 for aa.com

So the problem is definetely in the secondary server
I tried to put aa.com.zone file with 777 permissions into /var/named/chroot/var/named/slaves, but it didn't help.

named.conf is located in /var/named/chroot/etc and contains the following:
zone "aa.com" {
type slave;
file "slaves/aa.com.zone";
masters {
192.168.8.242 ;
};
};

Any help will be appreciated

bathory 10-06-2004 01:51 AM

named.conf starts with:
Code:

options {
directory "/path/to/zone/files";
...
}

So the secondary DNS creates it's files in the path shown by the directory line. You start named with: -t /var/named/chroot (which is not necessary as named runs under the user named) and you expect the zone files to be in: /var/named/chroot/var/named/slaves. Fix the paths and restart named.

gt1 10-06-2004 11:45 AM

Bathory, thanks a lot! I added directory "var/named" in /var/named/chroot/etc/named.conf, and BIND synced. The -t /var/named/chroot option is install default, I didn't change a thing. So I guess that the reason for my problem was that default configuration is broken and has to be manually tweaked.

By the way, I think I had to ask this first, but is there any documentation which covers configuring BIND under Fedora? I couldn't find anything. What I could find didn't answer my questions.

bathory 10-07-2004 02:03 AM

I don't know if there is documentation specific for FC, but apart from ther different locations of the config files etc, the general bind documentation applies to all distros. You can take a look here

emailssent 10-12-2004 06:08 AM

Is it ok that DNS is used for name to ip and ip to named resolution
but
For which application a DNS is used in a LAN,

I think it can used for NFS, SAMBA or ... or any other tell me ?

And specifically in which application it is required for ip to name resolution ?

Am i right or not....


All times are GMT -5. The time now is 01:33 PM.