LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   In need of major DNS help... (https://www.linuxquestions.org/questions/linux-networking-3/in-need-of-major-dns-help-586377/)

Benso37 09-21-2007 12:08 PM

In need of major DNS help...
 
I've exhusted all my resources in resolving this issue so please help...

I have a DNS server setup on a REDHAT box, everything seems to be working okay execpt the CNAME feature. The DNS server is up and running, it resolve names for both Linux and Windows without any issues.

However, the environment I work in requires Aliases and i'm not able to get it to for this DNS.

Everytime I use the Gui to add a CNAME and try to save, I get:
Code:

Save of Zone File /var/named/chroot/var/named/domainname.db failed:
dns_master_load:/var/named/chroot/var/named/domainname.db:52:host1.domainname: CNAME and other data zone domainname/IN: loading master file /var/named/chroot/var/named/domainname.db:CNAME and other data.


This is the first few lines of my zone file...anything jumping out?



Code:

$TTL 1H                               
@        SOA        hostname.        root.hostname. (        18
                                                3H
                                                1H
                                                1W
                                                1H )
                                        NS        hostname.       
                                IN        1H        MX        0        mailserver       
host1                A        xxx.xx.xx.169       
host2                A      xxx.xx.xx.168       
host3                A        xxx.xx.xx.160       
host4                A        xxx.xx.xx.163       
host5                A        xxx.xx.xx.162       
host6                A        xxx.xx.xx.165


acid_kewpie 09-21-2007 12:42 PM

can i suggest just not using the gui, whatever gui that is...? editing a zone file is very simple, and you're clearly already very much aware of it's existance and role:

Code:

host5        A              xxx.xx.xx.162       
stillhost5    CNAME    host5


Benso37 09-21-2007 01:03 PM

I'm using the system-config-bind GUI. Main reason why I resulted to the GUI is because I have a lot of hosts to enter and the gui cuts down hours of single entries.

acid_kewpie 09-21-2007 01:05 PM

no way! gui's make it more complex... vi and scripting cuts it down...

Benso37 09-21-2007 01:18 PM

Quote:

Originally Posted by acid_kewpie (Post 2899401)
no way! gui's make it more complex... vi and scripting cuts it down...

GUI allows me to import my host file (which has 100's of hosts) and creates the zone files/reverse lookup zones on the fly. vi, gedit will work fine but it will take me a very long time to accomplish that with manual insertion. Trust me, I know gui can something break things but I'm hoping this thing will work for me.

I went ahead and manually edited the zone file but I was unable to ping the alias I entered in my zone file. Yes I restarted named.
I have to type the full qualifying name for it to ping...ie. host5.domainname. ping to stillhost5 doesn't work.

Any ideas?

Update: I can ping stillhost5 from my windows box but not from my Linux box which is weired because the DNS server is on the Linux side.

acid_kewpie 09-21-2007 01:55 PM

ok, well what actually is the problem? you say it's working from some sources? the "error" above suggests that the file wasn't saved in the first place... do you have CNAME's listed in your zone file now?

if you're seeing some sort of discrepancy between clients, then my personally first point of call would be to use wireshark / tcpdump etc... to check what is actually being requested, and check for mismatched data.

Benso37 09-21-2007 02:21 PM

Quote:

Originally Posted by acid_kewpie (Post 2899456)
ok, well what actually is the problem? you say it's working from some sources? the "error" above suggests that the file wasn't saved in the first place... do you have CNAME's listed in your zone file now?

if you're seeing some sort of discrepancy between clients, then my personally first point of call would be to use wireshark / tcpdump etc... to check what is actually being requested, and check for mismatched data.


I passed that CNAME error by manually entering the some name...Let just say i'm not looking forward to doing the rest.

pinging the CNAME was working fine on my windows host but not on my linux host. I solved that problem by editing the resolv.conf file and added:
search domainname
nameserver xxx.xx.xxx.61

nameserver is the same as the domainname so I was under the impression having just the nameserver in the resolv.conf file will take care of all resolution but apparently I also had to add the "search domainname".

Is this the normal behavior?

acid_kewpie 09-21-2007 03:17 PM

the nameserver directive is totally different to the domainname one. the first defines what dns servers you are going to use, and the domainname defines the name fo the local domain the machine is in, so it adds it to all requests if necessary. the search then also adds other non-local domain suffixes for ease.


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