 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

1st July 2012, 05:05 AM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 992

|
|
|
How to check dns is working or not
Hi Friends,
I am using Fedora 16 32+ bit distro. How do I check if my dns service is working or not? I tried the following command based on my very little knowledge of network things. Below is the output to a few commands. Thanks.
I use a router to connect my pc via LAN and a laptop via wireless.
Code:
[root@localhost john]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.606 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.579 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.568 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.582 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.577 ms
^C
--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.568/0.582/0.606/0.025 ms
[root@localhost john]# ping yahoo.com
PING yahoo.com (72.30.38.140) 56(84) bytes of data.
^C
--- yahoo.com ping statistics ---
24 packets transmitted, 0 received, 100% packet loss, time 23002ms
[root@localhost john]# ping 72.30.38.140
PING 72.30.38.140 (72.30.38.140) 56(84) bytes of data.
^C
--- 72.30.38.140 ping statistics ---
11 packets transmitted, 0 received, 100% packet loss, time 9999ms
|

1st July 2012, 05:20 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Location: Denver, Colorado
Posts: 547

|
|
|
Re: How to check dns is working or not
dig is the utility to check dsn.
Code:
dig yahoo.com
; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc16 <<>> yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58524
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;yahoo.com. IN A
;; ANSWER SECTION:
yahoo.com. 3154 IN A 209.191.122.70
yahoo.com. 3154 IN A 72.30.38.140
yahoo.com. 3154 IN A 98.139.183.24
;; Query time: 14 msec
;; SERVER: 75.75.75.75#53(75.75.75.75)
;; WHEN: Sat Jun 30 22:19:22 2012
;; MSG SIZE rcvd: 75
Code:
dig -x 72.30.38.140
; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc16 <<>> -x 72.30.38.140
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25710
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;140.38.30.72.in-addr.arpa. IN PTR
;; ANSWER SECTION:
140.38.30.72.in-addr.arpa. 1199 IN PTR ir1.fp.vip.sp2.yahoo.com.
;; Query time: 12 msec
;; SERVER: 75.75.75.75#53(75.75.75.75)
;; WHEN: Sat Jun 30 22:20:30 2012
;; MSG SIZE rcvd: 81
|

1st July 2012, 06:29 AM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,303

|
|
|
Re: How to check dns is working or not
dig and nslookup and host.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
|

1st July 2012, 12:50 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: How to check dns is working or not
Good news. Your dns server seems to be working ;-)
When in doubt just compare the result with google's dns server
Code:
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
yahoo.com has address 98.139.183.24
yahoo.com has address 209.191.122.70
yahoo.com has address 72.30.38.140
|

1st July 2012, 05:10 PM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,303

|
|
|
Re: How to check dns is working or not
Quote:
Originally Posted by george_toolan
Good news. Your dns server seems to be working ;-)
|
SEEMS is the operative word.
Quote:
[root@localhost john]# ping yahoo.com
PING yahoo.com (72.30.38.140) 56(84) bytes of data.
|
The OPs ping resolved yahoo.com into an address, but there is ZERO evidence as to how it was resolved. For all we know he's using avahi, or an /etc/hosts file or something else.
Quote:
When in doubt just compare the result with google's dns server
Code:
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
yahoo.com has address 98.139.183.24
yahoo.com has address 209.191.122.70
yahoo.com has address 72.30.38.140
|
If by "compare" you mean "don't compare" then I'd agree. It's entirely possible and even likely that you'll get different IP addresses for google or yahoo when you ask two different DNS servers. Further your example w/o the accompanying command is useless to the OP.
Quote:
[stevea@crucibulum Desktop]$ host google.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
google.com has address 74.125.225.137
google.com has address 74.125.225.133
google.com has address 74.125.225.142
google.com has address 74.125.225.131
...
|
Quote:
[stevea@crucibulum Desktop]$ host google.com 4.2.2.2
Using domain server:
Name: 4.2.2.2
Address: 4.2.2.2#53
Aliases:
google.com has address 74.125.225.35
google.com has address 74.125.225.36
google.com has address 74.125.225.37
google.com has address 74.125.225.38
...
|
NONE of the IPs for google.com match in this example, so comparing the output is nonsense.
No - use nslookup or dig or host WITHOUT specifying the server and if you get a resolution, you are done.
You might want to do another lookup of the IP address to verify the reverse lookup appears sane, but that involves interpreting the results.
For smallish websittes the reverse lookup is often obvious
Quote:
[stevea@crucibulum Desktop]$ nslookup fsf.org
Server: 192.168.42.1
Address: 192.168.42.1#53
Non-authoritative answer:
Name: fsf.org
Address: 208.118.235.131
[stevea@crucibulum Desktop]$ nslookup 208.118.235.131
Server: 192.168.42.1
Address: 192.168.42.1#53
Non-authoritative answer:
131.235.118.208.in-addr.arpa name = www.fsf.org.
Authoritative answers can be found from:
|
But things get interesting for other bigger institutions, like whitehouse.gov
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
|

3rd July 2012, 05:04 PM
|
|
Registered User
|
|
Join Date: Oct 2009
Posts: 824

|
|
|
Re: How to check dns is working or not
Quote:
Originally Posted by tech291083
Hi Friends,
I am using Fedora 16 32+ bit distro. How do I check if my dns service is working or not? I tried the following command based on my very little knowledge of network things. Below is the output to a few commands. Thanks.
I use a router to connect my pc via LAN and a laptop via wireless.
Code:
[root@localhost john]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.606 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.579 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.568 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.582 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.577 ms
^C
--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.568/0.582/0.606/0.025 ms
[root@localhost john]# ping yahoo.com
PING yahoo.com (72.30.38.140) 56(84) bytes of data.
^C
--- yahoo.com ping statistics ---
24 packets transmitted, 0 received, 100% packet loss, time 23002ms
|
You will notice that it has been able to resolve the name 'yahoo.com' to an IP address '72.30.....' --> What this means is that the DNS server is working, HOWEVER, you aren't getting a ping response from that IP address. Seems to me that there is likely some routing issue. If you have a DNS that is hosted by your ISP, then it seems to me that they are experiencing some routing problems.
|

4th July 2012, 04:36 AM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 992

|
|
|
Re: How to check dns is working or not
Quote:
Originally Posted by droidhacker
You will notice that it has been able to resolve the name 'yahoo.com' to an IP address '72.30.....' --> What this means is that the DNS server is working,
|
Thanks a lot. Good that it is working.
Quote:
|
HOWEVER, you aren't getting a ping response from that IP address. Seems to me that there is likely some routing issue. If you have a DNS that is hosted by your ISP, then it seems to me that they are experiencing some routing problems.
|
Yes, I am using a router. Netgear WGR614v6, which is constantly resetting itself for no apparent reason whatsoever. I used to connect 2 pcs to it via LAN and one laptop via wireless without any problem just a week ago. But now it seems to me that whenever I connect a wirless laptop and a pc (via LAN) to it to surf the net, the LAN connection just gets cut off and the router starts resetting itself for a long long time. suggest me something. Everything else seems to be ok. Tell me how to check whether my router has gone bad. Are there any steps to check that? Thanks a lot.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
hp-check not working ?
|
phm |
Using Fedora |
2 |
12th July 2007 02:39 PM |
Current GMT-time: 23:11 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|