LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-25-2001, 01:48 AM   #1
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Rep: Reputation: 30
dns wont work


hey,
I just configured dns & bind and i think they work fine. I have a problem though when i go to http://ns.mydomain.com it gives me the homepage, but when i go to http://mydomain.com, it gives me a dns error. Do you guys have any idea why it would do this? And it wont give me the homepage when i go to www.ns.mydomain.com whats the difference between http://ns.mydomain.com and http://www.ns.mydomain.com? Pinging, nslookup, and dig works fine with ns.mydomain.com but it does not work with mydomain.com
 
Old 11-25-2001, 02:30 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
In order to get www.ns.mydomain.com working you will need to add an entry in your zone file for mydomain.com - try 'www.ns.mydomain.com IN A xxx.xxx.xxx.xxx (the ip address of ns1.mydomain.com)

For brevity you may want to re-examine your name server setup so that you can have ns.mydomain.com, www.mydomain.com (instead of www.ns.mydomain.com) all pointing to the same IP. For an intranet you can also add a CNAME entry like 'www' or 'home' so that users can just type in http://home in their browsers to see the main page for your network.
 
Old 11-25-2001, 02:32 AM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you should have it set to look on local net first


resolv.conf

order hosts, bind
nameserver www.xxx.yyy.zzz
nameserver aaa.bbb.ccc.ddd

this will search the hosts file first


then put it in the hosts file like this

ipaddress name name.domain nickname

10.0.0.1 Alpha Alpha.home Alpha
 
Old 11-26-2001, 06:59 PM   #4
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Original Poster
Rep: Reputation: 30
Thanks for replies guys i tried both but it still does the same thing.
I just checked everything over again and everything seems ok but i am including the contents of resolv.conf. if i take anything everything after search, i cannot connect to internet so in that case nothing works. After i put it in and try to nslookup it gives me this message:
Server: 24.93.1.119
Address: 24.93.1.119#53

Non-Authoratative answer:
Server: ns.mydomain.com
Address: IP address of my domain


resolv.conf
order hosts, bind
nameserver myipaddress
nameserver ns.mydomain.com
search rochester.rr.com rr.com
nameserver 24.93.1.119

and when i check nslookup ns.mydomain.com myip it does not connect to my computer. Thanks alot for any replies.
 
Old 11-26-2001, 07:15 PM   #5
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
What do your zone files look like for that domain?
 
Old 11-27-2001, 11:44 AM   #6
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Original Poster
Rep: Reputation: 30
I am not home right now but i'll post it here tonight. Thanks alot but in the meantime do i have to change the permissions of the zone files?

Last edited by dilberim82; 11-27-2001 at 11:50 AM.
 
Old 11-27-2001, 12:15 PM   #7
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Nope - you shouldn't have to mess with the zone files' permissions - if you had a problem there it would show up in the syslog messages. (You are checking the logs for proper bind startup, right???)
 
Old 11-28-2001, 06:18 PM   #8
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Original Poster
Rep: Reputation: 30
sorry for the delay i just did not have much time on my comp

Ok myhostname is the hostname of my computer and domain.cxm is the domain name i am trying have as the nameserver. Example.com is another domain name which has nothing to do with my nameserver. I just put it there to check if my nameserver works but it obviously does not. The name of the file is on the top and what is in it is below the # sign. Thanks alot everyone especially mcleod. I did not include named.ca but i can if you need to see the contents of it . And the ip numbers and everything else is made up.

IN 0.0.127.in-addr.arpa.zone
########################################################
$TTL 86400
@ IN SOA localhost. root.localhost(
1 ;serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttk
)

@ IN NS localhost.

1 IN PTR localhost.

IN 158.35.25.in-addr.arpa.zone
############################################################
$TTL 86400
@ IN SOA myhostname.domain.cxm. root.domain.cxm(
8 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttk
)

IN NS myhostname.domain.cxm. <~~?

198 IN PTR myhostname.domain.cxm. <~~~?

IN domain.cxm
########################################################
$TTL 86400
@ IN SOA @ root.domain.cxm (
4 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

@ IN NS myhostname.domain.cxm.

@ IN MX 0 myhostname

www.myhostname.domain.cxm IN A 25.35.158.198
www.domain.cxm IN A 25.35.158.198
localhost IN A 127.0.0.1
www IN A 25.35.158.198
mail IN A 25.35.158.198
myhostname IN A 25.35.158.198
domain.cxm IN A 25.35.158.198
@ IN A 25.35.158.198

in myhostname.zone
#############################################################
$TTL 86400
@ IN SOA @ root.myhostname(
3 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

@ IN NS myhostname.

www.myhostname.domain.cxm IN A 25.35.158.198

@ IN A 25.35.158.198


in example.com.zone
###########################################################
$TTL 86400
@ IN SOA @ fish.example.com (
6 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

@ IN NS myhostname.domain.cxm.

www IN A 25.35.158.198
ftp IN A 25.35.158.198
@ IN A 25.35.158.198


in localhost.zone
############################################################
$TTL 86400
@ IN SOA @ root.localhost (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)


@ IN NS localhost.



@ IN A 127.0.0.1


in named.conf
####################################################################
// generated by named-bootconf.pl

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 "158.35.25.in-addr.arpa"{
type master;
file "158.35.25.in-addr.arpa.zone";
};

zone "localhost" {
type master;
file "localhost.zone";
};

zone "domain.cxm"{
type master;
file "domain.cxm.zone";
};

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


in resolv.conf
##############################################
order hosts, bind
nameserver 25.35.158.198
nameserver myhostname.domain.cxm
#if i take out anything below this line i cannot connect to internet. I think thats the nameserver for my isp or #something.
search rochester.rr.com rr.com
nameserver 65.46.244.215

Last edited by dilberim82; 12-03-2001 at 09:27 AM.
 
Old 11-30-2001, 07:03 PM   #9
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Original Poster
Rep: Reputation: 30
Anybody have any idea?
 
Old 11-30-2001, 09:27 PM   #10
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
It looks like you're abusing the shortcuts...

Your zone file(s) can start with the '@' to abbreviate the name that called it, but you can't use that same zone name in the 'A' records where the hostname should be. Your logs probably are complaining about www.domainname.cxm.domainname.com as you have not terminated the hostname part of the 'A' record with a dot "." The first field of an A record is the hostname + the domainname. For brevity BIND lets you use the hostname only (without the trailing dot) and it will add the domainname to it. If you want to use the fully-qualified domainname you need to terminate that part of the statement with the dot
Code:
hostname.mydomain.com.   IN  A xxx.xxx.xxx.xxx
is the same as
Code:
hostname   IN  A xxx.xxx.xxx.xxx
Please post some log data as it's easier for me to work backwards (and it gives me a chance to go out for a pint or two).


Your IN-ADDR recors are also wrong. The IP to name mapping may also be shortened by including only the last three digits without the trailing dot or by using the whole ip address. When you used "1" it assumes that the IP addr should resolve to 25.35.158.1 rather than 25.35.158.198

Here's the format I use and it's served me well;
Code:
@ IN SOA ns1.saltheart.net. root.ns1.saltheart.net. (
                                2001082104              ; serial
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

; Name servers
                        IN NS           ns1.saltheart.net.
                        IN NS           ns2.saltheart.net.
;
; CName addresses
;
flip                                    IN A    10.10.101.2
localhost                               IN A    127.0.0.1
ummon                                   IN A    10.10.101.4
file2                                   IN A    10.10.101.241
file1                                   IN A    10.10.101.3
;
; Aliases
;
gw2             IN CNAME flip
fax             IN CNAME ummon
home            IN CNAME ummon
pop3            IN CNAME ummon
smtp            IN CNAME flip
samba           IN CNAME file1
devel           IN CNAME file2

Last edited by mcleodnine; 11-30-2001 at 09:29 PM.
 
Old 12-19-2001, 11:30 AM   #11
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Original Poster
Rep: Reputation: 30
sorry

Hey,
Thanks for the reply mcleodnine and sorry i have not been here. I've been out of town for a while and i was not able to go online. I'll post you the stuff as soon as i can. Thanks and sorry.
 
Old 12-27-2001, 10:29 AM   #12
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Original Poster
Rep: Reputation: 30
hey

Dec 22 08:00:20 myhostname named: named shutdown failed

Dec 22 08:00:20 myhostname named: named startup succeeded

Dec 22 08:00:20 myhostname named[5383]: starting BIND 9.1.0 -u named

Dec 22 08:00:20 myhostname named[5383]: using 1 CPU

Dec 22 08:00:20 myhostname named[5387]: loading configuration from '/etc/named.conf'

Dec 22 08:00:20 myhostname named[5387]: /etc/named.conf:14: parse error near zone

Dec 22 08:00:20 myhostname named[5387]: loading configuration: failure

Dec 22 08:00:20 myhostname named[5387]: exiting (due to fatal error)

this is the message i am getting from /var/log/messages.1
it does not say anything else in anywhere else. So named does not even start. Thanks alot guys.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ok got fglrx 2d to work, now why wont 3d work? bvav22 Linux - Software 1 05-01-2005 06:25 PM
The DNS wont resolve... hpnadig Linux - Networking 3 01-04-2004 02:05 PM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 10:39 PM
Why wont it work?? Nrub Linux - Distributions 1 11-18-2002 07:07 AM
HELP! Caching DNS server wont resolve .EDU domains? spadesmaster Linux - Networking 0 04-30-2002 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration