|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
You have to setup a DNS server for this to work.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
Quote:
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:
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. |
|
#5
|
|||
|
|||
|
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
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
|||
|
|||
|
Quote:
... |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > FreeBSD-5.4 Network Problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|