LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Default domain in FreeBSD (https://www.linuxquestions.org/questions/%2Absd-17/default-domain-in-freebsd-239793/)

d0wn_under 10-07-2004 08:14 AM

Default domain in FreeBSD
 
I have setup a network with an internal domain of krynn.int but I can't get the FreeBSD server to automatically add it hostnames when it tries to resolve them.

My rc.conf file sets the hostname of the to be tb.krynn.int

My resolve.conf looks like this:

$ less /etc/resolv.conf
domain krynn.int
nameserver 192.168.0.8
search krynn.int
search dev

hostname returns:

$ hostname
thorbardin.krynn.int

but I still get this:

$ ping rast
ping: cannot resolve rast: Unknown host
$ ping rast.krynn.int
PING rastlin.krynn.int (192.168.0.2): 56 data bytes
64 bytes from 192.168.0.2: icmp_seq=0 ttl=64 time=0.272 ms

How can I get the machine to add the .krynn.int automatically?

My gentoo linux box is working fine it is just the FreeBSD server.

Any ideas?

finegan 10-07-2004 09:04 AM

First check /etc/nsswitch.conf

To make certain that there's:

hosts: files dns

Also I think the line:

search krynn.int

Has to be above the nameserver line...

Cheers,

Finegan

d0wn_under 10-07-2004 09:12 AM

I've actually moved the search to the top since posting the question but that didn't help. I'll try the nsswitch.conf file, does it require a reboot?

finegan 10-07-2004 09:19 AM

Nope, should take effect immediately, but the more I'm thinking about that the less likely it is... you do have that local machine broadcasting a DNS file for that fake domain, correct?

Cheers,

Finegan

d0wn_under 10-07-2004 09:25 AM

The change didn't work

The box itself is the dns server and the db for it is:

$TTL 86400
@ IN SOA krynn.int. robin.krynn.int. (
2004052601 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604880 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day

; Name servers
@ IN NS thorbardin.krynn.int.

;HostAddresses
localhost IN A 127.0.0.1
rast IN A 192.168.0.2

My gentoo box is using the same dns server and this is working fine.

Any more ideas?

d0wn_under 10-07-2004 11:05 AM

Fixed!
 
I've fixed it (well actually protologic on bsdforums) but the problem is the multiple search lines in my resolve.conf. Putting all entries on the same line fixes everything.

:D

finegan 10-08-2004 09:53 PM

Ooooh, weird, that's good to know, thanks for dropping in the reply about it, I was quite curious.

Cheers,

Finegan

chort 10-09-2004 12:34 AM

The search directive is not cumulative, like the nameserver directive is. It looks like you discovered this ;) When you have multiple search domains you can include them on the same line, separated by whitespace.


All times are GMT -5. The time now is 02:22 PM.