LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2006, 04:57 AM   #1
TBomb
Member
 
Registered: May 2004
Location: Great Britain
Distribution: Slackware
Posts: 91

Rep: Reputation: 15
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?

Last edited by TBomb; 04-17-2006 at 04:58 AM.
 
Old 04-17-2006, 06:19 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
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.
 
Old 04-17-2006, 06:53 AM   #3
TBomb
Member
 
Registered: May 2004
Location: Great Britain
Distribution: Slackware
Posts: 91

Original Poster
Rep: Reputation: 15
My /etc/resolv.conf is empty. What should be in there?
 
Old 04-17-2006, 08:56 AM   #4
TBomb
Member
 
Registered: May 2004
Location: Great Britain
Distribution: Slackware
Posts: 91

Original Poster
Rep: Reputation: 15
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.
 
Old 04-17-2006, 06:50 PM   #5
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ping: unknown host www.google.com tcma Linux - Networking 7 03-02-2012 11:47 PM
ping: unknown host www.google.com juanjavier_xxx Debian 8 01-02-2006 01:47 PM
ping: unknown host in local intranet linuxjustin Linux - Networking 3 04-04-2004 02:03 PM
Resolver problem: ping localhost.localdomain gives Unknown host rmd Linux - Networking 0 11-06-2003 07:58 AM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration