[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dig knows while ping doesn't



Hi,

I can't explain the following myself:

  $ dig maroon

  ; <<>> DiG 9.7.1-P2 <<>> maroon
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34832
  ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

  ;; QUESTION SECTION:
  ;maroon.                                IN      A

  ;; ANSWER SECTION:
  maroon.                 0       IN      A       192.168.2.100

  ;; Query time: 0 msec
  ;; SERVER: 192.168.2.100#53(192.168.2.100)
  ;; WHEN: Wed Feb 16 22:16:20 2011
  ;; MSG SIZE  rcvd: 40

-- dig knows the host maroon.

  $ ping maroon
  ping: unknown host maroon

-- yet ping doesn't know the host maroon.

What could be the reason? 

Thanks

FYI: 

  $ cat /etc/resolv.conf
  # for interface eth0
  search local
  nameserver 192.168.2.100
  nameserver 192.168.2.1
  nameserver 192.168.2.100

  $ ifconfig 
  eth0      Link encap:Ethernet  HWaddr 00:e0:4d:b8:98:ef  
	    inet addr:192.168.2.106  Bcast:192.168.2.255  
Mask:255.255.255.0
	    inet6 addr: fe80::2e0:4dff:feb8:98ef/64 Scope:Link
	    UP BROADCAST RUNNING MULTICAST  MTU:1492  Metric:1
	    RX packets:3085169 errors:2 dropped:0 overruns:0 frame:2
	    TX packets:3707445 errors:0 dropped:0 overruns:0 carrier:0
	    collisions:0 txqueuelen:1000 
	    RX bytes:1244271976 (1.2 GB)  TX bytes:2176532830 (2.1 GB)
	    Interrupt:43 Base address:0xc000 

  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:232195 errors:0 dropped:0 overruns:0 frame:0
	    TX packets:232195 errors:0 dropped:0 overruns:0 carrier:0
	    collisions:0 txqueuelen:0 
	    RX bytes:21797691 (21.7 MB)  TX bytes:21797691 (21.7 MB)



-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/


Reply to: