Advertisement

Unix, ping google.com or traceroute google.com results in unknown host google.com?

Started by January 06, 2006 05:18 AM
2 comments, last by Corfe 18 years, 8 months ago
Hi, when I enter ping google.com or traceroute google.com, it gives me "unknown host google.com", but I can use the ip address eg "ping 72.14.207.99". Does anyone know for what reason I can't enter a dns address, but can enter an IP address? Thanks
Is your computer set for static IP (and if so did you set a DNS address manually)?

Is your computer set for dynamic IP from a router (and if so is it setup to give DNS information to clients)? If it's a hardware router, it should do this automatically, but if you built it yourself you'll probably have to configure it to do so yourself.

Have you tried taking your link to the internet down and back up, in case that will fix it? (in Debian you should do "ifdown eth0" then "ifup eth0", assuming your internet is connected through the network connection called eth0 (ethernet 0)).

Last question, is the system dual-boot? If so, does whatever other system is on the computer see DNS addresses ok?
Advertisement
Quote: Original post by Corfe
Is your computer set for static IP (and if so did you set a DNS address manually)?

Yes I've set it to a static ip, I haven't set a DNS address as far as I know,

Quote: Original post by Corfe
Is your computer set for dynamic IP from a router (and if so is it setup to give DNS information to clients)? If it's a hardware router, it should do this automatically, but if you built it yourself you'll probably have to configure it to do so yourself.

I've manually set the ip to one that I have listed on my router.

Quote: Original post by Corfe
Have you tried taking your link to the internet down and back up, in case that will fix it? (in Debian you should do "ifdown eth0" then "ifup eth0", assuming your internet is connected through the network connection called eth0 (ethernet 0)).

Still same problem.


Quote: Original post by Corfe
Last question, is the system dual-boot? If so, does whatever other system is on the computer see DNS addresses ok?

Only the one OS is installed.



The strange thing is, I had Solaris 8 installed earlier, which was able to access DNS addresses, but then I wiped that and installed Solaris 10, where I am now having the problem.

Although I did do one setting differently. On solaris 8, I chose to use DHCP, I didn't on Solaris 10, because I wanted to set the ip to the one defined on the router, and not have to use ifconfig later.

Heres what ifconfig says about my settings:
Quote:
# ifconfig elxl0
elxl0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.194 netmask ffffff00 broadcast 192.168.0.255
ether 0:10:5a:e3:39:bd


The netmask seems strange, and I think it was 255.255.255.0 during the previous installation, but when I try and set it, it tells me i'm entering an invalid netmask.

Thanks
I think what you need to do is go to /etc/resolv.conf (hopefully it isn't different in your distro, I'm in Debian) and add a line "nameserver a.b.c.d" (where a.b.c.d is the address of the DNS server of your ISP). Usually they have two, so if yours does, throw both lines in there, you can set as many as you want, and I believe it will search for the appropriate name in that order (if not found at the first go to the 2nd, etc.)

If you're looking for the DNS address, usually you can find it by looking in the router (I assume yours is hardware).

Sometimes the IP of the nameserver might change, so this is usually received automatically when you get IP from DHCP. I don't know how to automate this process for static IP, and if you find out how let me know. One way around this would be to tell the router to give this computer's MAC address a certain IP every time, and then you can tell your computer to use DHCP (and it'll get the right DNS every time it renews IP).

If you don't want to do that or can't, I don't know how to fix it, and if you find out please tell me. As a last resort, you could always write some wacky script to connect to your router, figure out what the DNS addresses are, and update your resolv.conf file automatically. I've done something similar to this before (for finding the external IP address), and could help you out with it if you like (just reply here). Throw your script in crontab to run every hour or every day, or whatever you like, and you should be good.

This topic is closed to new replies.

Advertisement