LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2008, 10:15 AM   #1
Byenary
Member
 
Registered: Oct 2003
Distribution: edgy dapper feisty
Posts: 36

Rep: Reputation: 15
Bind9 ,host does reslove a dns name but ping says unknown host


Hello,

I have a local network, with a ubuntu7.10 server that acts as dnsserver with bind9.
When i try to ping my router like this
ping router.test.local -> ping:unknown host
while when i do host router.test.local it does say router.test.local has address 192.168.123.1

Why does ping not work here?
Ideas?
Thx
 
Old 02-08-2008, 05:36 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I'd like to see more info. For starters, please post the contents of /etc/resolv.conf, which should show the DNS servers the machine is using. Also, please use dig instead of host, as it provides way more info. The output of /sbin/ifconfig would help as well. The dig command I'd like to see is:

Code:
dig router.test.local +trace
Peace,
JimBass
 
Old 02-09-2008, 03:50 AM   #3
Byenary
Member
 
Registered: Oct 2003
Distribution: edgy dapper feisty
Posts: 36

Original Poster
Rep: Reputation: 15
more info

Hi thx for the tip,
Il give some output below, it now is bit more complecated since the problem is located at work and i am at home now and connect trough pptp, but it should be the same as if I were there.


elias@IBM-lap:~$ cat /etc/resolv.conf
# generated by NetworkManager, do not edit!


nameserver 192.168.123.10
nameserver 192.168.123.1


elias@IBM-lap:~$ ifconfig /all
/all: error fetching interface information: Device not found
elias@IBM-lap:~$ cat /etc/resolv.conf
# generated by NetworkManager, do not edit!


nameserver 192.168.123.10
nameserver 192.168.123.1


elias@IBM-lap:~$ ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:18E:64:68:BA
inet addr:192.168.125.14 Bcast:192.168.125.255 Mask:255.255.255.0
inet6 addr: fe80::218:deff:fe64:68ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1705 errors:12 dropped:66 overruns:0 frame:0
TX packets:1368 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1016397 (992.5 KB) TX bytes:242970 (237.2 KB)
Interrupt:21 Memory:edf00000-edf00fff

irda0 Link encap:IrLAP HWaddr 00:00:00:00
NOARP MTU:2048 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:8
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.123.180 P-t-P:192.168.123.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1412 Metric:1
RX packets:448 errors:0 dropped:0 overruns:0 frame:0
TX packets:489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:304471 (297.3 KB) TX bytes:50608 (49.4 KB)

elias@IBM-lap:~$ /etc/init.d/networking restart
open: Permission denied
* Reconfiguring network interfaces... ifdown: failed to open statefile /var/run/network/ifstate: Permission denied
ifup: failed to open statefile /var/run/network/ifstate: Permission denied
open: Permission denied
[fail]
elias@IBM-lap:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... eth0: ERROR while getting interface flags: No such device
Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth0 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device eth0 ; No such device.
There is already a pid file /var/run/dhclient.eth0.pid with pid 134519120
Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up eth0.
[ OK ]
elias@IBM-lap:~$ ping router.test.local
ping: unknown host router.test.local
elias@IBM-lap:~$ host router.test.local
router.test.local has address 192.168.123.1
elias@IBM-lap:~$ dig router.test.local +trace

; <<>> DiG 9.4.1-P1 <<>> router.test.local +trace
;; global options: printcmd
. 452965 IN NS H.ROOT-SERVERS.NET.
. 452965 IN NS G.ROOT-SERVERS.NET.
. 452965 IN NS I.ROOT-SERVERS.NET.
. 452965 IN NS B.ROOT-SERVERS.NET.
. 452965 IN NS A.ROOT-SERVERS.NET.
. 452965 IN NS D.ROOT-SERVERS.NET.
. 452965 IN NS M.ROOT-SERVERS.NET.
. 452965 IN NS F.ROOT-SERVERS.NET.
. 452965 IN NS K.ROOT-SERVERS.NET.
. 452965 IN NS C.ROOT-SERVERS.NET.
. 452965 IN NS E.ROOT-SERVERS.NET.
. 452965 IN NS L.ROOT-SERVERS.NET.
. 452965 IN NS J.ROOT-SERVERS.NET.
;; Received 500 bytes from 192.168.123.10#53(192.168.123.10) in 19 ms

. 86400 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2008020801 1800 900 604800 86400
;; Received 113 bytes from 192.228.79.201#53(B.ROOT-SERVERS.NET) in 191 ms

elias@IBM-lap:~$
 
Old 02-09-2008, 01:34 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Sorry, the +trace screwed up the dig, as you have a "false" domain, and the root servers won't know what to do with it. Please post the output of just:

Code:
dig router.test.local
Peace,
JimBass
 
Old 02-10-2008, 01:39 PM   #5
Byenary
Member
 
Registered: Oct 2003
Distribution: edgy dapper feisty
Posts: 36

Original Poster
Rep: Reputation: 15
just dig

Here we are,

Has this something to do with ipv6 perhaps ?
elias@IBM-lap:~$ dig router.test.local

; <<>> DiG 9.4.1-P1 <<>> router.test.local
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15688
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;router.test.local. IN A

;; ANSWER SECTION:
router.test.local. 38400 IN A 192.168.123.1

;; AUTHORITY SECTION:
test.local. 38400 IN NS pauillac.test.local.

;; ADDITIONAL SECTION:
pauillac.test.local. 38400 IN A 192.168.123.10

;; Query time: 92 msec
;; SERVER: 192.168.123.1#53(192.168.123.1)
;; WHEN: Sun Feb 10 20:37:08 2008
;; MSG SIZE rcvd: 93

elias@IBM-lap:~$
 
Old 02-10-2008, 03:18 PM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Strange. The DNS layer is absolutely fine. The host you used earlier pointed in that direction, but we have proof now from the dig output, but the hostname is resolved, and the authority as well is fine.

Looking back at the networking output you listed earlier, it seems that your connection to the 192.168.123 subnet is through a ppp connection, and one of the endpoints of that connection is the address you're looking to ping. I don't know that is the problem, but I'd check it out. Can you ping any other addresses on the 192.168.123 subnet by name? Like ping any other address on the test.local domain. If they do ping, but router doesn't, it may mean that you can't ping the other side of a ppp connection without trickery. It would help if we could hear from somebody here with more knowledge of the behavior of ppp technology.

Peace,
JimBass
 
Old 10-06-2008, 03:44 PM   #7
baraber
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 1
Hi, I had the same problem while configuring my dns.
I intstalled bind on a machine and configured a zone names like this : zonename.local

I could resolve names using dig, host or nslookup, and was able to ping my machines only from the machine which has bind running. Trying to ping a machine from anywhere else resulted in : ping : unknown host machine1.zonename.local

I solved my problem by renaming my zone like this : zonename.home

I can't explain it, but it seems local is reserved on some systems (I was running on ubuntu). Hope this will help, and any more detailed explanation will be greatly appreciated.

Last edited by baraber; 10-06-2008 at 03:47 PM.
 
Old 10-07-2008, 02:01 AM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
You have two nameservers configured in /etc/resolv.conf, which is fine:

nameserver 192.168.123.10
nameserver 192.168.123.1

But we see answers coming back from the second one:

;; Query time: 92 msec
;; SERVER: 192.168.123.1#53(192.168.123.1)

Set the 192.168.123.1 nameserver line as the first entry if this is the DNS server that will be responding.
 
Old 08-06-2009, 12:18 PM   #9
UnknownKadath
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Thumbs up Thanks, worked like a charm!

I had the same issue and going from .local to .office made everything work like a dream. I wonder if there's an RFC document anywhere that recommends staying way from .local. (Fires up The Google)

Quote:
Originally Posted by baraber View Post
Hi, I had the same problem while configuring my dns.
I intstalled bind on a machine and configured a zone names like this : zonename.local

I could resolve names using dig, host or nslookup, and was able to ping my machines only from the machine which has bind running. Trying to ping a machine from anywhere else resulted in : ping : unknown host machine1.zonename.local

I solved my problem by renaming my zone like this : zonename.home

I can't explain it, but it seems local is reserved on some systems (I was running on ubuntu). Hope this will help, and any more detailed explanation will be greatly appreciated.
 
Old 01-12-2011, 01:27 AM   #10
Cirroz
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
Check /etc/nsswitch.conf
In ubuntu it can contain that stupid string:
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
just move dns right after files and everything works fine
 
Old 01-12-2011, 01:33 AM   #11
Cirroz
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
One more thing - Windows does the same thing.
And it has no nsswitch.conf
Need to fix it too.
 
  


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
Unable to ping : ping: unknown host PKumar Linux - Networking 4 10-31-2007 12:43 AM
Slackware 10.2 - ping: unknown host TBomb Linux - Networking 4 04-17-2006 06:50 PM
ping: unknown host www.google.com juanjavier_xxx Debian 8 01-02-2006 01:47 PM
ping: unknown host in local intranet linuxjustin Linux - Networking 3 04-04-2004 02:03 PM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:18 AM.

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