Author Topic: Unable to resolve host names by DNS server  (Read 10864 times)

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Unable to resolve host names by DNS server
« on: November 20, 2012, 10:12:03 am »
In Zentyal 3.0, client system hostnames are unable to resolve by the DNS server.My server name is msserver01 and domain name is msserver01.lan (nothing confusion these details are correct but looks strange  ???),DNS module in "enable" state only.When I give "msserver01" or "msserver01.msserver01.lan" in client browser I'm able to access default index.html of the server. Similarly I added new record in "hostnames" in DNS  module with 'system01" and IP as "192.168.6.2",but unable to access these host from other clients,using IP I'm able to access.

       Basically I went with DHCP fixed addressing mechanism( using MAC) I thought it might be reason for above issue,So tried with "Range" concept also but result is failed in this case also.

           What might the reason ?
Regards
Zent User

christian

  • Guest
Re: Unable to resolve host names by DNS server
« Reply #1 on: November 20, 2012, 10:33:34 am »
It looks like you are facing issue with any single area with Zentyal  :-[ :-[
You are perhaps more used to work with Windows environments  ???
I would suggest, like for HTTP proxy, that you first try to make things as simple as possible. e.g. why do you start with DHCP based on MAC address. This is already (slightly) advanced and will not give you any significant benefit, at least in the beginning.

There is a couple of tools you could/should use in order to sort out issues you are (perhaps) facing:
- dig
- nslookup

but first you have to ensure that your DHCP server is properly configured.
You can check it either looking server side (what did you set there) or looking client side at what you get:
- DHCP client FQDN
- search domain
- DNS server

Report this here and then we can look at this further  ;)

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Re: Unable to resolve host names by DNS server
« Reply #2 on: November 20, 2012, 10:47:10 am »
Sorry Sir,

       I don't know why all bad things are happening with me only. Okay, any how.
Quote
I would suggest, like for HTTP proxy, that you first try to make things as simple as possible. e.g. why do you start with DHCP based on MAC address. This is already (slightly) advanced and will not give you any significant benefit, at least in the beginning.

            I've already configured above mentioned points perfectly in 2.2,So,moved to advanced configuration with 3.0. DHCP based MAC addressing working fine for me and tried with "dig" command also, when I given from client system dig @localhost msserver01.lan it worked but failed with client hostname.

Quote
  - search domain

            Sorry to say,When above concept will work ? when I won't append any domain name(I hope its correct) but in my cases with patiently I'm giving "hostname.domain-name" then what is the use of "search domain" I won't understand.

           Just now I've created a new domain in DNS,its working fine but what is the problem with default domain ?
Regards
Zent User

christian

  • Guest
Re: Unable to resolve host names by DNS server
« Reply #3 on: November 20, 2012, 10:54:30 am »
           Just now I've created a new domain in DNS,its working fine but what is the problem with default domain ?

I don't know as I even don't understand the detail of what you set_up, what you search, how and what the result is.

- if your domain is msserver01.lan and if you add host entry (i.e. "A" DNS record) so that systems01 points to 192.168.1.2
- if client side msserver01.msserver01.lan (192.168.1.1) is your DNS server and if msserver01.lan is your search domain (this being pushed by Zentyal DHCP server), there is nothing preventing you to resolve system01 and system01.msserver01.lan

Does it work like this or is there anything I miss?

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Re: Unable to resolve host names by DNS server
« Reply #4 on: November 20, 2012, 11:07:52 am »
In DNS module,the default record is "msserver01.lan" in that "Hostnames" tab I've added a entry with "system01" who's IP as "192.168.6.2".Upto here fine, normally when from third system(apart from server & system01) when try in browser as "system01.msserver01.lan",it as to access but its not.

     So,I've created a new domain "foo.com" in DNS module,in this new domain I've did what I've explained above its working fine,but why default domain(msserver01.lan) not working.

    The difference in both cases is "Dyanamic domain" option is marked as "right" in msserver.lan record and its marked as "cross" is "foo.com".

What is meant by "A DNS record" ? I hope what I explained is nothing but "A Dns record".


        I know I'm irritating you a lot,but I can't do anything.Sorry for that.
Regards
Zent User

christian

  • Guest
Re: Unable to resolve host names by DNS server
« Reply #5 on: November 20, 2012, 11:19:06 am »
First you should spend some time reading Zentyal documentation. It explains what dynamic domain is (this is linked with capability to dynamically update DNS content, e.g. when DHCP client get lease).

Checking this using your browser is not a good idea as I know that in parallel we are spending (wasting) lot of time with proxy settings.
Why don't you check using ping or nslookup. This will use DNS stack without potential side effect because of browser or proxy misconfiguration.

BTW, is system01 getting an ip from DHCP or is it configured with static IP?
And also did you install last Zentyal 3.0 updates?

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Re: Unable to resolve host names by DNS server
« Reply #6 on: November 20, 2012, 11:27:54 am »
Quote
nslookup msserver01.msserver01.lan

Server:      127.0.0.1
Address:   127.0.0.1#53

Name:   msserver01.msserver01.lan
Address: 192.168.6.1

Quote
nslookup system01.msserver01.lan
Server:      127.0.0.1
Address:   127.0.0.1#53

** server can't find system01.msserver01.lan: NXDOMAIN

Quote
dig @system01
dig: couldn't get address for 'system01': not found

Quote
system01 getting an ip from DHCP or is it configured with static IP?

        Using DHCP by fixed addressing (MAC).

Quote
And also did you install last Zentyal 3.0 updates?

           I don't know is it correct process or not,yesterday I've given

apt-get update
apt-get upgrade

           to solve network interface issue.

Thanks
Regards
Zent User

christian

  • Guest
Re: Unable to resolve host names by DNS server
« Reply #7 on: November 20, 2012, 11:45:14 am »

Quote
system01 getting an ip from DHCP or is it configured with static IP?

        Using DHCP by fixed addressing (MAC).

so there is at least one misconception here: if you server is DHCP client, at the time lease is issued, server register in DNS if set as dynamic domain. No need to add such hostname manually.

Do you understand what
Code: [Select]
dig @system01 does?

Once you have removed this useless hostname entry (aka "A record") from DNS and renew lease (ensure your domain is set as dynamic first), then try
Code: [Select]
dig any msserver01.lan @msserver01.msserver01.lanor even
Code: [Select]
dig any msserver01.lan
and tell us what you get.

BTW, in order to know whenever updates are available or not, no need to run "apt-get" command. Zentyal interface shows it and allow update from Zentyal console. Given level of debate we have, I would strongly suggest not to use any command line until there is a very clear understanding of what it does  8)

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Re: Unable to resolve host names by DNS server
« Reply #8 on: November 20, 2012, 12:07:58 pm »
Quote
Code: [Select]
dig any msserver01.lan @msserver01.msserver01.lan

; <<>> DiG 9.8.1-P1 <<>> any msserver01.lan @msserver01.msserver01.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42317
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 2

;; QUESTION SECTION:
;msserver01.lan.         IN   ANY

;; ANSWER SECTION:
msserver01.lan.      900   IN   NS   msserver01.msserver01.lan.
msserver01.lan.      900   IN   A   192.168.6.1
msserver01.lan.      900   IN   AAAA   ::1
msserver01.lan.      3600   IN   SOA   msserver01.msserver01.lan. hostmaster.msserver01.lan. 3 900 600 86400 0

;; ADDITIONAL SECTION:
msserver01.msserver01.lan. 900   IN   A   192.168.6.1
msserver01.msserver01.lan. 900   IN   AAAA   ::1

;; Query time: 2 msec
;; SERVER: 192.168.6.1#53(192.168.6.1)
;; WHEN: Tue Nov 20 16:26:28 2012
;; MSG SIZE  rcvd: 193


                Now I've enabled "Dynamic DNS" option in menu Network->Dynamic DNS and in DHCP as well.
Regards
Zent User

christian

  • Guest
Re: Unable to resolve host names by DNS server
« Reply #9 on: November 20, 2012, 12:12:21 pm »
Good  :)

Still you should:
- ensure you are using last Zentyal upate
- renew DHCP leases

then check your DNS content using same dig command  ;)

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Re: Unable to resolve host names by DNS server
« Reply #10 on: November 20, 2012, 12:36:27 pm »
Thanks a lot,

      I've updated all available updates and restarted the DHCP and DNS modules.When I tried system01.msserver01.lan then now able to access the default index page.

 I've few doubts regarding this issue

    1. Where was the wrong ?
    2. I think FQDN is working for me ?
    3. what is meant by "renew DHCP leases" ? I've just restarted the DHCP,everything working fine.

Quote
so there is at least one misconception here: if you server is DHCP client, at the time lease is issued, server register in DNS if set as dynamic domain. No need to add such hostname manually.

             In above statement "No need to add such hostnames manually",what is it mean,can remove "hostname" which I've added manually in "A record" ? If So,its not pinging when given as "ping system01" or "ping system01.msserver01.lan
        and ensuring you that now onwards I won't give any command in the terminal. I think I can proceed now for "Explicit Proxy". Once again thanks a lot Christian.
 
« Last Edit: November 20, 2012, 12:47:42 pm by Zent User »
Regards
Zent User

Zent User

  • Zen Warrior
  • ***
  • Posts: 121
  • Karma: +1/-3
    • View Profile
Re: Unable to resolve host names by DNS server
« Reply #11 on: November 20, 2012, 12:53:28 pm »
Sorry,after deleting records in "hostnames" tab ( I think these are "A" records) I'm able to ping to system01,this is due to DHCP by MAC ?
Regards
Zent User

christian

  • Guest
Re: Unable to resolve host names by DNS server
« Reply #12 on: November 20, 2012, 01:18:10 pm »
I've updated all available updates and restarted the DHCP and DNS modules.When I tried system01.msserver01.lan then now able to access the default index page.

Good news.

Quote
    1. Where was the wrong ?

your understanding + solution you implemented to fix problem (which was not a problem BTW) + the way you where testing

Quote
    2. I think FQDN is working for me ?

"working FQDN" is kind of meaningless. FQDN stands for Fully Qualified Domain Name. This is not something that works or not  ;)


Quote
    3. what is meant by "renew DHCP leases" ? I've just restarted the DHCP,everything working fine.

Don't worry, if it works this is ok.
When client requests DHCP server, IP address is associated with lease but not forever. it has a duration and DHCP protocol allows to renew this lease. This is also done automatically when client is on line.

If DHCP & DNS are both configured to benefit from Dynamic DNS, you are not supposed to manually maintain hostname in DNS. Period  8)