LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-16-2017, 04:23 AM   #1
rdozijn_2
Member
 
Registered: Feb 2009
Distribution: debian
Posts: 39

Rep: Reputation: 0
dns does not return ip of my computer


My computer connects to my company's network with dhcp. It successfully gets an IP, which is used for a longer period of time.
The problem is that this dhcp transaction is not registered in the DNS I use.
Who can support me in configuring this properly?

Maybe a problem is that the hostname of my computer is not the same as the user name I have on the network. But none of the possible names are to be found in the dns.

Code:
$ hostname
dechen
$ nslookup dechen
;; Got SERVFAIL reply from 10.12.7.776, trying next server
Server:		10.12.7.777
Address:	10.12.7.777#53
** server can't find dechen: SERVFAIL
[1]    371 exit 1     nslookup dechen
$ host 10.12.25.777 [ip of localhost]
Host 777.25.12.10.in-addr.arpa. not found: 3(NXDOMAIN)
[1]    501 exit 1     host 10.12.25.777
$ host dechen.mycompany.nl
Host dechen.mycompany.nl not found: 3(NXDOMAIN)
I realize that I have to provide more information to pinpoint the problem, but I have no clue yet what would be helpful.

In /etc/hosts I have this
Code:
127.0.0.1	localhost
127.0.1.1	dechen.mycompany.nl	dechen

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
thanks in advance, Ruud

Last edited by rdozijn_2; 11-16-2017 at 05:47 AM.
 
Old 11-16-2017, 04:56 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
#1 try checking resolution of your FQDN instead of the short hostname.

#2 your hosts file is not very useful, but your resolv.conf file might be of interest.

#3 are your primary DNS and your DHCP server the same? I would expect them to be the same if DHCP is feeding bind or DNS.

#4 Does reverse resolution work? Perhaps you are registered using a node name that is NOT your hostname.

After consideration of these ideas, please let us know what you find.
 
Old 11-16-2017, 06:07 AM   #3
rdozijn_2
Member
 
Registered: Feb 2009
Distribution: debian
Posts: 39

Original Poster
Rep: Reputation: 0
Thank you for helping me.

#1 try checking resolution of your FQDN instead of the short hostname.

Isn't my IP the fqdn? I have put that output in the question

#2 your hosts file is not very useful, but your resolv.conf file might be of interest.


Code:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.12.7.6
nameserver 10.12.7.7
search mycompany.lf.local
search mycompany.nl

#3 are your primary DNS and your DHCP server the same? I would expect them to be the same if DHCP is feeding bind or DNS.

They are NOT. I found this in /var/lib/dhcp/dhclient.eth0.leases
Code:
lease {
  interface "eth0";
  fixed-address 10.12.25.777;
  option subnet-mask 255.255.252.0;
  option dhcp-message-type 5;
  option domain-name-servers 10.12.7.6,10.12.7.7;
  option dhcp-server-identifier 10.12.7.5;
  option domain-name "mycompany.lf.local";
  renew 5 2017/11/17 05:55:03;
  rebind 1 2017/11/20 07:42:37;
  expire 2 2017/11/21 07:42:37;
}
#4 Does reverse resolution work? Perhaps you are registered using a node name that is NOT your hostname.

I think you mean here the output of 'host <my_ip>'. It returns NXDOMAIN.

Would it help to add the dhcp-server-identifier to resolv.conf, or is that not the way to solve this problem?


Ruud
 
Old 11-16-2017, 02:13 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Is there some dns record of this computer sub domain on the web.

To find a name and convert it to an ip there are a few ways. If for example you typed localhost in browser it normally would try to run the web server if any on the local computer. If your search for name is set to the normal hosts file then you also did an entry like 192.168.1.2 my.computer.uk should result in typing my.computer.uk in browser would try to start web server on 192.168.1.2. There are few ways a computer can try to resolve a name to an ip or resource. Command line dig nslookup helps usually.

The order in the search also can be altered.
 
Old 11-17-2017, 05:38 AM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by rdozijn_2 View Post
Thank you for helping me.

#1 try checking resolution of your FQDN instead of the short hostname.

Isn't my IP the fqdn? I have put that output in the question
No, the FQDN would be something like dechen.mycompany.nl
Quote:

#2 your hosts file is not very useful, but your resolv.conf file might be of interest.


Code:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.12.7.6
nameserver 10.12.7.7
search mycompany.lf.local
search mycompany.nl
Thank you, that does help. Your nameservers are 10.12.7.6,7 which is good to know.
Quote:
#3 are your primary DNS and your DHCP server the same? I would expect them to be the same if DHCP is feeding bind or DNS.

They are NOT. I found this in /var/lib/dhcp/dhclient.eth0.leases
Code:
lease {
  interface "eth0";
  fixed-address 10.12.25.777;
  option subnet-mask 255.255.252.0;
  option dhcp-message-type 5;
  option domain-name-servers 10.12.7.6,10.12.7.7;
  option dhcp-server-identifier 10.12.7.5;
  option domain-name "mycompany.lf.local";
  renew 5 2017/11/17 05:55:03;
  rebind 1 2017/11/20 07:42:37;
  expire 2 2017/11/21 07:42:37;
}
OK, now this is interesting. If DHCP feeds lease info to DNS it is normal to run them on the same host, or even (dnsmasq style) in a single application. I wonder how your network admins have this set up, that they are different.
Quote:
#4 Does reverse resolution work? Perhaps you are registered using a node name that is NOT your hostname.

I think you mean here the output of 'host <my_ip>'. It returns NXDOMAIN.
My hope was that it would return your host name (FQDN) on the domain. That is what reverse lookup does on my home network. If it returns nothing useful it only means that reverse resolution is not set up (or is set incorrectly). Either way that is not your problem.
Quote:
Would it help to add the dhcp-server-identifier to resolv.conf, or is that not the way to solve this problem?


Ruud
The resolv.conf file is not the place to hold that information. It MIGHT help to add it as a nameserver, but ONLY if it is answering bind calls as well as DNS calls. A simple test could verify that one way or another. See what the result is if you do
Code:
 host dechen 10.12.7.5
Does this work for any other nodes on your network? In other words, if you have another node that uses DHCP to obtain a network address, can it then be resolved in DNS on your network?
 
Old 11-20-2017, 02:36 AM   #6
rdozijn_2
Member
 
Registered: Feb 2009
Distribution: debian
Posts: 39

Original Poster
Rep: Reputation: 0
That is interesting. This is the output
Code:
$ host dechen 10.12.7.5                                            
;; connection timed out; no servers could be reached
[1]    24709 exit 1     host dechen 10.12.7.5

$ ping 10.12.7.5                                                   
PING 10.12.7.5 (10.12.7.5) 56(84) bytes of data.
64 bytes from 10.12.7.5: icmp_seq=1 ttl=127 time=0.767 ms
64 bytes from 10.12.7.5: icmp_seq=2 ttl=127 time=0.678 ms
64 bytes from 10.12.7.5: icmp_seq=3 ttl=127 time=0.690 ms
^C
I don't know what that means, but is is interesting. The problem is that the mechanism is working for the whole company, except for me. I am the only one with a linux machine and get little to no help because 'only windows is supported'. So I am on my own. And since this network stuff is a blank area in my knowledge I can do with any support. I really appreciate the help I experience on this forum.

Ruud

Last edited by rdozijn_2; 11-20-2017 at 03:20 AM.
 
Old 11-20-2017, 04:17 AM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by rdozijn_2 View Post
That is interesting. This is the output
Code:
$ host dechen 10.12.7.5                                            
;; connection timed out; no servers could be reached
[1]    24709 exit 1     host dechen 10.12.7.5

$ ping 10.12.7.5                                                   
PING 10.12.7.5 (10.12.7.5) 56(84) bytes of data.
64 bytes from 10.12.7.5: icmp_seq=1 ttl=127 time=0.767 ms
64 bytes from 10.12.7.5: icmp_seq=2 ttl=127 time=0.678 ms
64 bytes from 10.12.7.5: icmp_seq=3 ttl=127 time=0.690 ms
^C
I don't know what that means, but is is interesting. The problem is that the mechanism is working for the whole company, except for me. I am the only one with a linux machine and get little to no help because 'only windows is supported'. So I am on my own. And since this network stuff is a blank area in my knowledge I can do with any support. I really appreciate the help I experience on this forum.

Ruud
What that means is that they have DNS running on two machines, but DHCP running on a third. The DHCP server is NOT providing DNS services.

It appears that the mechanism that is loading the DHCP lease information over into DNS is only working for the Windows clients. It is possible that if your linux client were running SAMBA the right way and looked like a domain member then it would populate, but I cannot verify that without testing. Why do you need that to work? Would it be worth trying?
 
Old 11-20-2017, 04:35 AM   #8
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Not sure what distro or dhcp client you are running, but have a look in the conf file (/etc/dhcp/dhclient.conf for me).
Code:
#send host-name "andare.fugue.com";
send host-name = gethostname();
This is my option to send my hostname during dhcp negotiation.
Don't recall if it was commented out by default and I enabled it, or not.
Use the static one if you don't want to send the automatic 'gethostname()' one.

Last edited by descendant_command; 11-20-2017 at 04:38 AM.
 
Old 11-20-2017, 05:26 AM   #9
rdozijn_2
Member
 
Registered: Feb 2009
Distribution: debian
Posts: 39

Original Poster
Rep: Reputation: 0
Quote:
It appears that the mechanism that is loading the DHCP lease information over into DNS is only working for the Windows clients. It is possible that if your linux client were running SAMBA the right way and looked like a domain member then it would populate, but I cannot verify that without testing. Why do you need that to work? Would it be worth trying?
I think it is worth it. I need it to work because the firewall blocks the connection with the outlook pop url. Of course I am the only one using pop, the rest uses outlook. It is fixed now by an exception in the firewall, based on my IP. But that only works as long as the dhcp lease lasts. In order to have a future proof solution, I need the dns to know my computer.

I have already tried to get samba working in order to register to the AD, but I have not been successful up til now.
I have not been able to join the domain due to various errors. I have a kerberos ticket though. I am a bit confused because the solutions on internet use different approaches.

What approach would you suggest?

edit: I have installed realmd and sssd. realm join is not possible yet; it appears it is not possible for normal users like me to join a domain. I'll try first to find someone with the proper rights and then come back to this.


Ruud

Last edited by rdozijn_2; 11-20-2017 at 09:52 AM.
 
  


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
How to return Apache 404 for wildcard DNS qtip Linux - Server 2 11-10-2015 01:01 PM
What should DNS servers return for "localhost.localdomain" gtalbott Linux - Networking 4 01-07-2015 06:52 PM
how to make nslookup return failure if DNS server fails bennetthaselton Linux - Networking 2 03-23-2011 08:32 PM
DNS issue - DNS works perfect on server but not on any other computer jtneal Linux - Networking 3 03-15-2008 03:30 PM
My computer sometimes won't return me to the prompt. wilsonsamm Linux - General 1 08-22-2006 05:32 AM

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

All times are GMT -5. The time now is 04:56 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