LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-25-2013, 06:24 PM   #16
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by Ser Olmy View Post
Changing the domain name should have absolutely no effect on routing. If you can't ping IP addresses on the local network, something is wrong with your IP setup.

If I misunderstood you and the problem is related to name resolution rather than IP connectivity, the DNS server is the likely culprit. Did you change the domain name in both /etc/named.conf and in the zone file?

If you're using dynamic DNS, the clients will need to be notified of the new domain name before they will start registering their names in the new DNS zone. A DHCP release/renew will do that, provided you changed the domain name in the DHCP server configuration file as well.
No, I am not using dynamic DNS. To make sure you understand the problem, all my computers can ping each other by name. However, the DNS server can only ping the computers if I append the domain name (formerly .localnet).

Forget I mentioned about the DNS server not being able to ping now, I figured that out. local.net is an actual top level domain on the Internet, so OF COURSE it is going to foward to the WAN *slaps self*. The only remaining issue is the issue I opened the topic for, I have to append the domain name to the end of the host name to ping from the DNS server but the local computers don't have that restriction.
 
Old 07-25-2013, 07:01 PM   #17
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Ok, this is partially solved. With all the other changes I made, I tried emptying /etc/resolv.conf and putting only:
Code:
nameserver 172.16.254.1
search local.lan
You've mentioned that before and it didn't work the first time I did that, but with other changes I've made combined with that, it works normal. However, /etc/resolv.conf is wiped out when I reboot.

So recalling your suggestion to put the following in /etc/dhcp/dhclient.conf:
Code:
prepend domain-search localnet
supersede domain-name-servers 127.0.0.1
I tried that, and it has no effect whatsoever. The prepended and superseded information is not placed in /etc/resolv.conf even after that adjustment.

I'm very close now!
 
Old 07-25-2013, 07:01 PM   #18
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
Quote:
Originally Posted by jlacroix View Post
The only remaining issue is the issue I opened the topic for, I have to append the domain name to the end of the host name to ping from the DNS server but the local computers don't have that restriction.
Right. What exactly does hostname --fqdn return when you run it on the server?

Edit: Didn't see your latest post until just now. According to the Debian docs, it should be possible to put the "prepend" stuff in the interfaces file instead of /etc/dhcp/dhclient.conf. I'll look into it and get back to you.

Last edited by Ser Olmy; 07-25-2013 at 07:03 PM.
 
Old 07-25-2013, 07:02 PM   #19
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ser Olmy View Post
Right. What exactly does hostname --fqdn return when you run it on the server?
The output of hostname --fqdn has never changed despite any changes you've suggested. In fact, even the computers that work fine show the same output for that command.

See my above post, I'm almost there now.
 
Old 07-25-2013, 07:34 PM   #20
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
To be clear, you're saying that
Code:
hostname --fqdn
now returns hermes.your-local-domain-name? You still can't ping anotherclient, while pinging anotherclient.your-local-domain-name does work?

As for getting the right settings into /etc/resolv.conf, this document claims that adding "prepend" or "supersede" settings to /etc/dhcp/dhclient.conf should work. The exact syntax is described in the first answer in this thread.

Then there's this thread in a Debian forum, where one poster claims that the correct file could be either /etc/dhclient.conf, /etc/dhcp/dhclient.conf or even /etc/dhcp3/dhclient.conf.
 
Old 07-25-2013, 08:57 PM   #21
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ser Olmy View Post
To be clear, you're saying that
Code:
hostname --fqdn
now returns hermes.your-local-domain-name? You still can't ping anotherclient, while pinging anotherclient.your-local-domain-name does work?

As for getting the right settings into /etc/resolv.conf, this document claims that adding "prepend" or "supersede" settings to /etc/dhcp/dhclient.conf should work. The exact syntax is described in the first answer in this thread.

Then there's this thread in a Debian forum, where one poster claims that the correct file could be either /etc/dhclient.conf, /etc/dhcp/dhclient.conf or even /etc/dhcp3/dhclient.conf.
Yes, you're correct.

hostname --fqdn never shows anything other than the host name, such as "Hermes" or "Pluto". It never shows the .local.lan part on any of my computers, even the ones that are working and resolving properly. Perhaps this was deprecated in some way?

I've Googled like crazy regarding the "prepend" and "supersede" options. Debian is completely ignoring them. It does nothing. It may work on other distributions, but not Debian Wheezy, apparently.

If I manually change /etc/resolv.conf to ONLY contain the following, it works until I reboot:
Code:
nameserver 172.16.254.1
search local.lan
But from my understanding, editing /etc/resolv.conf shouldn't even be necessary, because in /etc/network/interfaces I have:
Code:
dns-search local.lan
dns-nameservers 172.16.254.1
Debian ignores that too. In all other distributions I've tried (that are Debian-based) adding the aforementioned two lines to /etc/network/interfaces has worked perfectly.

Sorry to be a pain, but something on my server seems to be ignoring my directives.

Last edited by jlacroix; 07-25-2013 at 08:58 PM.
 
Old 07-25-2013, 09:15 PM   #22
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
Quote:
Originally Posted by jlacroix View Post
Yes, you're correct.
No, apparently I'm not, as the next paragraph demonstrates.

Quote:
Originally Posted by jlacroix View Post
hostname --fqdn never shows anything other than the host name, such as "Hermes" or "Pluto". It never shows the .local.lan part on any of my computers, even the ones that are working and resolving properly. Perhaps this was deprecated in some way?
FQDN stands for "Fully Qualified Domain Name", and is by definition the host name with the domain name appended at the end.

If neither the server nor the clients have a domain name, something's not quite right with both your DHCP server configuration (which affects the clients) and the network configuration on the server.

If a host doesn't have a domain name, it stands to reason that it can't append that non-existent name to any DNS queries. But the clients are still able to resolve names. I think you'll find that the /etc/resolv.conf file on the clients contains a search parameter listing the domain name. If the local resolver can't resolve a name, it will append any search suffixes in turn and query the DNS server for the resulting FQDN(s).

Quote:
Originally Posted by jlacroix View Post
I've Googled like crazy regarding the "prepend" and "supersede" options. Debian is completely ignoring them. It does nothing. It may work on other distributions, but not Debian Wheezy, apparently.
The documentation I referred to is specific to Debian. According to that documentation, your /etc/dhcp/dhclient.conf file should contain this:
Code:
interface "eth0" {
    prepend domain-search local.lan;
    supersede domain-name-servers 127.0.0.1;
}
If either /etc/dhclient.conf or /etc/dhcp3/dhclient.conf exist, they would need to be deleted.

Quote:
Originally Posted by jlacroix View Post
But from my understanding, editing /etc/resolv.conf shouldn't even be necessary, because in /etc/network/interfaces I have:
Code:
dns-search local.lan
dns-nameservers 172.16.254.1
Debian ignores that too. In all other distributions (that are Debian-based) adding the aforementioned two lines to /etc/network/interfaces has worked perfectly.
Is that under eth0 or eth1? Because it's the eth0 setting that triggers dhclient, which in turn overwrites /etc/resolv.conf with information it gets via DHCP from Comcast.
 
Old 07-25-2013, 09:34 PM   #23
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ser Olmy View Post
If neither the server nor the clients have a domain name, something's not quite right with both your DHCP server configuration (which affects the clients) and the network configuration on the server.
But the clients are fine, even without it, that's why I was thinking it is either hidden despite the --fqdn option or deprecated. But I would think that this should just work too, because in /etc/dhcp/dhcpd.conf I have:
Code:
option domain-name "local.lan";
Quote:
Originally Posted by Ser Olmy View Post
I think you'll find that the /etc/resolv.conf file on the clients contains a search parameter listing the domain name.
That is correct.



Quote:
Originally Posted by Ser Olmy View Post
The documentation I referred to is specific to Debian. According to that documentation, your /etc/dhcp/dhclient.conf file should contain this:
Code:
interface "eth0" {
    prepend domain-search local.lan;
    supersede domain-name-servers 127.0.0.1;
}
If either /etc/dhclient.conf or /etc/dhcp3/dhclient.conf exist, they would need to be deleted.
Yes, I read that, but it still doesn't work.


Quote:
Originally Posted by Ser Olmy View Post
Is that under eth0 or eth1? Because it's the eth0 setting that triggers dhclient, which in turn overwrites /etc/resolv.conf with information it gets via DHCP from Comcast.
eth0 = Comcast, eth1 = LAN.
 
Old 07-25-2013, 11:28 PM   #24
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
the solution could be :

make the entries in /etc/hosts

like

[ip] [fqdn] [alias]

Code:
172.16.254.10 pluto.localnet pluto
another thisng in your DNS Zone file conf:
add CNAME to your clients, make sure you have added an A record for your client.

Code:
pluto        CNAME   pluto.localnet
 
Old 07-25-2013, 11:45 PM   #25
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
Quote:
Originally Posted by SAbhi View Post
another thisng in your DNS Zone file conf:
add CNAME to your clients, make sure you have added an A record for your client.
Why would he need a CNAME record?

Quote:
Originally Posted by SAbhi View Post
Code:
pluto        CNAME   pluto.localnet
Assuming the above is the zone file for the "localnet" zone, this would add a CNAME pointer from "pluto.localnet" to "pluto.localnet.localnet". That doesn't make sense.
 
Old 07-26-2013, 12:32 AM   #26
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
No need to assume its from zone file:
well I just gave a alternative. I forgot to mention OR another thing*.
That does make sense when you want to use an alias on the network permanently as I have seen OP was trying to so some stuff like that and end up with can't resolve error.., so after making that entry when a user tries accessing a resource on the network using "pluto"(say) it will look out for "pluto.localnet" and doesn't end up with "cant resolve pluto" or something like that.
 
Old 07-26-2013, 10:47 AM   #27
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Thanks for the responses, guys. The problem is still not solved but I think it makes sense now at least. eth0 is DHCP and connected directly to the cable modem. eth1 is connected to my LAN and uses a static address. Whenever eth0 gets an IP address from the cable modem, it wipes out /etc/resolv.conf. When /etc/resolv.conf gets wiped out, local DNS resolution on the server itself starts working incorrectly.

All prepend or supersede options are ignored, as are all directives I use to explicitly set eth1 to try to resolve using localhost. I'm not sure why Debian goes this far out of its way to block pretty much EVERY method of customizing how it resolves things.

Thanks for everything, and I hope there is a solution.
 
Old 07-28-2013, 08:01 AM   #28
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
There is a solution i reproduced that issue and found; you can do this :

Code:
vi /etc/resolv.conf                #make suitable AND REQUIRED ENTRIES HERE then save nad exit.
chattr +i /etc/resolv.conf         #by doing this even root cant modify the file and if you want to change the file you have to do a 
                                   #+ chattr -i [file] so that it can be modified.

service network restart
this will rectify the problem of changing of resolv.conf again and again.

Last edited by SAbhi; 07-28-2013 at 08:02 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
setting up bind, short domains without a dot mattsoftnet Linux - Server 3 03-10-2010 09:40 AM
How to get Windows Clients to be served DNS from a Linux BIND-DNS Server texmansru47 Linux - Networking 12 07-10-2008 07:06 PM
smb server/client and trailing dot(s) sbassett Linux - Server 0 02-24-2007 11:55 AM
localhost bind will not resolve from other clients cwc Linux - Networking 3 01-17-2007 10:06 PM
Trailing "/" required for URLs on Apache Server? dissectional Linux - Software 5 04-29-2005 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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