LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 10-07-2004, 08:14 AM   #1
d0wn_under
LQ Newbie
 
Registered: Oct 2004
Location: Sheffield, UK
Posts: 9

Rep: Reputation: 0
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?
 
Old 10-07-2004, 09:04 AM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 65
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
 
Old 10-07-2004, 09:12 AM   #3
d0wn_under
LQ Newbie
 
Registered: Oct 2004
Location: Sheffield, UK
Posts: 9

Original Poster
Rep: Reputation: 0
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?
 
Old 10-07-2004, 09:19 AM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 65
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
 
Old 10-07-2004, 09:25 AM   #5
d0wn_under
LQ Newbie
 
Registered: Oct 2004
Location: Sheffield, UK
Posts: 9

Original Poster
Rep: Reputation: 0
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?
 
Old 10-07-2004, 11:05 AM   #6
d0wn_under
LQ Newbie
 
Registered: Oct 2004
Location: Sheffield, UK
Posts: 9

Original Poster
Rep: Reputation: 0
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.

 
Old 10-08-2004, 09:53 PM   #7
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

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

Cheers,

Finegan
 
Old 10-09-2004, 12:34 AM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 75
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
IP and Domain resolving to default virtual host DropHit Linux - Newbie 4 11-19-2005 02:42 PM
[bind9] how set default search domain? nio Linux - Software 2 08-13-2005 03:52 PM
Strange ( fishy ? ) default domain name Biased turkey Mandriva 0 01-13-2005 03:22 PM
Domain creation on FreeBSd server gives error !!! apache Linux - Software 0 07-14-2004 06:18 AM
how can I find my default domain? HadesThunder Linux - General 2 04-22-2004 07:42 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

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