-
DNS without DHCP
On Suse 9.2, I used yast to change from DHCP to a static IP, and as a result I lost my ability to resolve domain names on the internet. I managed to fix the problem by changing one of the name servers from some optonline ip to my router's gateway ip (192.168.0.1). I want to know why that worked.
I'm assuming that DHCP used to take care of this aspect of networking for me, by supplying DNS servers in addition to my IP. But why couldn't I use my ISP's servers (167.206.3.141 and 167.206.3.140) directly? Wouldn't the router would just pass on DNS requests to those two anyway? My dad insists that the router blocked the outside server's attempts to communicate with my machine, but I was under the impression that since the connection was initiated by my computer, it wouldn't be an issue.
I'm sort of a networking newbie, so I might be making a critical incorrect assumption somewhere.
-
Your dad could be right. It is possible that your router is so stupid that even though you sent the UDP packet query, it blocked the UDP packet reply sent by your ISP's dns server. Or, it is slightly more likely that a stupid firewall local to the computer blocked the reply.
We can test this easily enough. What do you see when you run these command:
dig @167.206.3.141 www.google.com
ping 64.233.161.104
-
Have you defined your gateway as your router's IP address? That should be all you need to do. What does the route command tell you?
-
With the router listed as a DNS server (working):
Code:
dig 167.206.3.141 www.google.com
; <<>> DiG 9.2.4 <<>> 167.206.3.141 www.google.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 33230
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;167.206.3.141. IN A
;; AUTHORITY SECTION:
. 5400 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2005052900 1800 900 604800 86400
;; Query time: 27 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sun May 29 22:06:36 2005
;; MSG SIZE rcvd: 106
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29061
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 145 IN CNAME www.l.google.com.
www.l.google.com. 149 IN A 64.233.161.99
www.l.google.com. 149 IN A 64.233.161.104
www.l.google.com. 149 IN A 64.233.161.147
;; AUTHORITY SECTION:
l.google.com. 6449 IN NS c.l.google.com.
l.google.com. 6449 IN NS e.l.google.com.
l.google.com. 6449 IN NS a.l.google.com.
l.google.com. 6449 IN NS b.l.google.com.
;; ADDITIONAL SECTION:
a.l.google.com. 13490 IN A 216.239.53.9
b.l.google.com. 13490 IN A 64.233.179.9
c.l.google.com. 13490 IN A 64.233.161.9
e.l.google.com. 13490 IN A 66.102.11.9
;; Query time: 16 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sun May 29 22:06:36 2005
;; MSG SIZE rcvd: 228
When I remove the 192.168.0.1 entry:
Code:
dig 167.206.3.141 www.google.com
; <<>> DiG 9.2.4 <<>> 167.206.3.141 www.google.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 56479
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;167.206.3.141. IN A
;; AUTHORITY SECTION:
. 5235 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2005052900 1800 900 604800 86400
;; Query time: 22 msec
;; SERVER: 167.206.3.140#53(167.206.3.140)
;; WHEN: Sun May 29 22:09:21 2005
;; MSG SIZE rcvd: 106
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15390
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 1
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 343 IN CNAME www.l.google.com.
www.l.google.com. 82 IN A 64.233.161.99
www.l.google.com. 82 IN A 64.233.161.104
www.l.google.com. 82 IN A 64.233.161.147
;; AUTHORITY SECTION:
l.google.com. 7016 IN NS b.l.google.com.
l.google.com. 7016 IN NS c.l.google.com.
l.google.com. 7016 IN NS e.l.google.com.
l.google.com. 7016 IN NS a.l.google.com.
;; ADDITIONAL SECTION:
b.l.google.com. 10132 IN A 64.233.179.9
;; Query time: 27 msec
;; SERVER: 167.206.3.141#53(167.206.3.141)
;; WHEN: Sun May 29 22:09:21 2005
;; MSG SIZE rcvd: 180
In both cases the route table looks fine.
Code:
route
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
link-local * 255.255.0.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
Grrr! Now it's working either way. I hate the way half the time I have to be very careful with my settings, and the other half I can bash random keyboard buttons and still have it work out just fine. Who knows if I'll be able to reproduce the problem now.
-
You kinda forgot the @ symbol in the digs. But I won't need to see 'em the right way if you got it working.