LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Slackware 10.2 - ping: unknown host (https://www.linuxquestions.org/questions/linux-networking-3/slackware-10-2-ping-unknown-host-435918/)

TBomb 04-17-2006 04:57 AM

Slackware 10.2 - ping: unknown host
 
Hi there, I've done a search on this problem, and although there were plenty of results I didn't find any that helped with my problem...

I have a Slackware 10.2 box, connected via ethernet to a Belkin wireless router.

I used netconfig to try and get everything working,

IP: 192.168.1.8
Default Gateway: (the router) 192.168.1.1
Subnet Mask: 255.255.255.0

I can ping the router and all other networked computers fine, no packet loss, I can also access the routers config page via Konqueror, the problem arises when I try to ping something on the internet.

ping www.google.com
ping: unknown host www.google.com

It's really starting to bug me now, as the internet used to work fine on this machine before, but I haven't used it in a while, now I turn it on and it doesn't work :S

When I've had this problem with Windows I'd put it down to an incorrectly set default gateway, but I have set that so I'm stumped...

'route' shows:

route
Kernel IP routing table
Dest. Gateway Genmask Flags Use Iface
localnet * 255.255.255.0 U 0 eth0
loopback * 255.0.0.0 U 0 lo
default * 0.0.0.0 U 0 eth0

___

That bottom one, default, really doesn't look right to me. Any ideas?

zaichik 04-17-2006 06:19 AM

Here's the giveaway:
Code:

ping: unknown host www.google.com
You're having DNS problems--your machine can't find out what the IP address is for the hostname www.google.com. Make sure that your router is allowing traffic on port 53 and that /etc/resolv.conf (or Slackware's version of that) has valid nameservers listed.

TBomb 04-17-2006 06:53 AM

My /etc/resolv.conf is empty. What should be in there?

TBomb 04-17-2006 08:56 AM

I changed my resolv.conf file (which was empty) to:

nameserver 192.168.1.1


Now when I try to ping google it resolves the hostname, but I get destination host unreachable... I can still ping local machines.

zaichik 04-17-2006 06:50 PM

Quote:

Originally Posted by TBomb
'route' shows:

route
Kernel IP routing table
Dest. Gateway Genmask Flags Use Iface
localnet * 255.255.255.0 U 0 eth0
loopback * 255.0.0.0 U 0 lo
default * 0.0.0.0 U 0 eth0

___

That bottom one, default, really doesn't look right to me. Any ideas?

Missed that part of your post entirely. You are correct, that is not right. The default gateway ought to be the router's inside address. On RedHat-type systems, you can set that in

/etc/sysconfig/network-scripts/ifcfg-eth0

by setting the correct value for the gateway:

GATEWAY=192.168.1.1

and then restaring networking (or bringing the device down and back up). Not sure if Slackware keeps that info in the same spot or not.


All times are GMT -5. The time now is 10:53 PM.