BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 11th, 2005, 08:40 PM
ricstr ricstr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 7 ricstr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 53 sec
Reputation Power: 0
FreeBSD-5.4 Network Problems

Hey, I have a FreeBSD 5.4 install that I hope to use for a test-web server inside my LAN. I use the sysinstall during installation to config the NIC by DHCP from my router.

I have a WindowsXP workstation configured similar that works perfect. The servers network configuration is consistent with the workstations.

The problem is that the FreeBSD machine can be accessed by its internal IP address, but not by the hostname I gave it (server1), because its using DHCP the hostname is important for accessing it so I can't put an entry in the hosts file as the IP address will change.

When ever I try to ping the server from the router or workstation I get an error saying the host could not be found.

This problem also stops Apache Web Server from starting up.

Any Ideas?

Reply With Quote
  #2  
Old July 12th, 2005, 04:45 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
You have to setup a DNS server for this to work.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old July 12th, 2005, 12:51 PM
ricstr ricstr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 7 ricstr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 53 sec
Reputation Power: 0
Thanks for the reply.

I'm not 100% sure what you mean. A DNS on the router or the server?

I already have DNS running on the linux router, that's why I can access the WindowsXP workstation using its hostname.

I just enabled named on the FreeBSD server to see if it made any difference, and it didn't.

I'm sure I set a server in a similar configuration with an earlier version of FreeBSD that worked just fine.

Reply With Quote
  #4  
Old July 12th, 2005, 01:03 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by ricstr
I already have DNS running on the linux router, that's why I can access the WindowsXP workstation using its hostname.

Ok, you don't need a second one.
Just add the FreeBSD server's records to your existing name server and enable FreeBSD to use it if you did not yet.

Please post the contents of your /etc/resolv.conf file, the problem may be there.

Quote:
Originally Posted by ricstr
The problem is that the FreeBSD machine can be accessed by its internal IP address, but not by the hostname I gave it (server1), because its using DHCP the hostname is important for accessing it so I can't put an entry in the hosts file as the IP address will change.

I guess that your DHCP server is not telling the right nameserver and you configured it manually last time. But without analyzing your whole setup it's hard to tell.

Login to a shell and try this:
Code:
$ dig server1

; <<>> DiG 9.3.1 <<>> server1
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16294
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;server1.                       IN      A

;; AUTHORITY SECTION:
.                       10741   IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2005071101 1800 900 604800 86400

;; Query time: 10 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jul 12 19:58:58 2005
;; MSG SIZE  rcvd: 100

This reply would say that server1 was not found to exist and that the request was answered by the "a" root server, not your own name server*.

Post the output of the "dig" command too.

M.

*) This statement might be technically inaccurate, but enough for debugging here. SilentRage is the local DNS guru if you want to know more details.

Reply With Quote
  #5  
Old July 12th, 2005, 02:17 PM
ricstr ricstr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 7 ricstr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 53 sec
Reputation Power: 0
Thanks again for the quick reply, here's the output from those commands.

Code:
%ifconfig
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::240:f4ff:fe6b:36af%vr0 prefixlen 64 scopeid 0x1
        inet 192.168.0.253 netmask 0xffffff00 broadcast 192.168.0.255
        ether 00:40:f4:6b:36:af
        media: Ethernet autoselect (10baseT/UTP)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3

%cat /etc/resolv.conf
search bullionslaw
nameserver 192.168.0.1

%dig

; <<>> DiG 9.3.1 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39608
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;.                              IN      NS

;; Query time: 11 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Tue Jul 12 19:20:50 2005
;; MSG SIZE  rcvd: 17

%dig server1

; <<>> DiG 9.3.1 <<>> server1
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 54605
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;server1.                       IN      A

;; Query time: 7 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Tue Jul 12 19:21:29 2005
;; MSG SIZE  rcvd: 25

Reply With Quote
  #6  
Old July 12th, 2005, 02:29 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Seems like your name server does not know about "server1.bullionslaw". Is there a "A record" in your "bullionslaw" zone like this?
"server1 IN A 192.168.0.253" (for completeness, check also the reverse zone)

M.
Comments on this post
ricstr agrees!

Reply With Quote
  #7  
Old July 12th, 2005, 05:58 PM
ricstr ricstr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 7 ricstr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 31 m 53 sec
Reputation Power: 0
To be honest, I really dont think the problem is with the DNS server on the router. I'm certain it's with FreeBSD, I just dont know what it is.

Another thing I noticed is when I ping server1 on server1, it gives an error, something along thel ines of of could not find host. I though that little wierd.

But I spent too much time on this if I can't fix it by tommrow i'll probly just set it up with a static address and a manual hosts entry on the router.

Thanks for all your help, very much appreciated.

Reply With Quote
  #8  
Old July 14th, 2005, 04:57 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by M.Hirsch
Please post the contents of your /etc/resolv.conf file, the problem may be there.

...

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > FreeBSD-5.4 Network Problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway