LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-24-2006, 06:31 AM   #1
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Rep: Reputation: 15
Unable to connect to Internet. (Network is unreachable)


Hello friends,

I can't connect to the internet.
If i ping 192.168.1.1 (router IP) i take 0% packet loss.
But when i am going to ping 64.179.4.146 says Network is unreacable.

If i run netstat -nr the result is:
MyServer:~ # netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

MyServer:~ # /sbin/route add -net 0.0.0.0 gw 192.168.1.1 eth0
MyServer:~ # netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

Now i can ping the IP 64.179.4.146 but still i can't browse to the internet.

MyServer:~ # ping http://www.linuxquestions.org
ping: unknown host http://www.linuxquestions.org


MyServer:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0B:CD:1C:71:01
inet addr:192.168.1.3 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::20b:cdff:fe1c:7101/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4815 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:313620 (306.2 Kb) TX bytes:11877 (11.5 Kb)
Interrupt:177

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:294 errors:0 dropped:0 overruns:0 frame:0
TX packets:294 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21631 (21.1 Kb) TX bytes:21631 (21.1 Kb)

My firewall is disabled.

MyServer:~ # cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.1.3 MyServer.site MyServer

My internet Connection is Cable.

Thanks guys.
 
Old 09-24-2006, 06:34 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
cat /etc/resolv.conf
you must be missing dns servers there.
 
Old 09-24-2006, 06:47 AM   #3
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
That's my resolv.conf

MyServer:~ # cat /etc/resolv.conf
# generated by NetworkManager, do not edit!

search company.com


nameserver 192.168.1.1


but i can't figure out is something is missing.

Last edited by georgiozoze; 09-24-2006 at 07:35 AM.
 
Old 09-24-2006, 07:47 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
What returns:
Code:
grep hosts /etc/nsswitch.conf
 
Old 09-24-2006, 07:59 AM   #5
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
MyServer:~ # grep hosts /etc/nsswitch.conf
hosts: files dns


that's the output.
 
Old 09-24-2006, 01:00 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Are you sure your router serves/relays dns queries ?
 
Old 09-24-2006, 01:37 PM   #7
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
What exactly you mean?
My router is Zonet.
Also, in my LAN i don't have problem i can see my server with samba, but i don't have access to internet.

Last edited by georgiozoze; 09-24-2006 at 01:41 PM.
 
Old 09-24-2006, 02:07 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by georgiozoze
What exactly you mean?
I mean, your settings are implying your router (192.168.1.1) is acting as a DNS server, which may be incorrect.
Quote:
My router is Zonet.
So have a look at its documentation and see what it tells about DNS.
I suspect you'd rather set your /etc/resolv.conf nameserver to your ISPs DNS servers.
 
Old 09-24-2006, 02:27 PM   #9
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
Sorry, but i didn't find something on the documents.

When i was with my old machine it was allright and i had the same settings. Now that i change my hardware i have this problem.
I read somewhere that maybe i need to do compile to my kernel. Is it possible to need it?

I don't believe that the problem is on router, because i connect the pc direct to the cable modem and when i make ping 64.179.4.146 , the output is:
connect: Network is Unreachable

Last edited by georgiozoze; 09-24-2006 at 03:06 PM.
 
Old 09-24-2006, 04:02 PM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by georgiozoze
Sorry, but i didn't find something on the documents.

When i was with my old machine it was allright and i had the same settings. Now that i change my hardware i have this problem.
I read somewhere that maybe i need to do compile to my kernel. Is it possible to need it?
Very unlikely.
Quote:
I don't believe that the problem is on router, because i connect the pc direct to the cable modem and when i make ping 64.179.4.146 , the output is:
connect: Network is Unreachable
Well, you wrote earlier:

Now i can ping the IP 64.179.4.146 [...]
 
Old 09-24-2006, 05:05 PM   #11
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
Yes i wrote it.

But, when i reboot the machine i couldn't ping.

If i'll write again the command /sbin/route add -net 0.0.0.0 gw 192.168.1.1 eth0
i can ping, but if i make again a reboot i can't.

I don't know why.
 
Old 09-24-2006, 11:16 PM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
That's because you didn't tell the machine to have this routing setting to persist.

Please tell what distribution you are using.
 
Old 09-25-2006, 02:27 AM   #13
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
I have Suse 10.1
 
Old 09-25-2006, 11:28 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by georgiozoze
I have Suse 10.1
So the supported way to configure your network settings is through the yast interface.
Open the "DNS and hostname" icon to enter the DNS server(s), and the "Routing" icon to tell what the defaultroute is.
 
Old 09-25-2006, 12:32 PM   #15
georgiozoze
Member
 
Registered: Oct 2003
Posts: 35

Original Poster
Rep: Reputation: 15
In the routing icon is empty. Nothing.
 
  


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
unable to add default route (network unreachable) beebop Linux - Networking 12 05-30-2005 11:07 AM
Getting message "connect: Network is unreachable" trying to access the Internet denver1980 Linux - Networking 5 12-29-2004 05:22 PM
connect: Network is unreachable teach42 Fedora 1 08-10-2004 06:16 PM
Internet Problems? Network unreachable plehman Fedora 0 07-11-2004 05:18 PM
connect: Network is unreachable joenomad Linux - Networking 11 04-21-2002 10:33 AM


All times are GMT -5. The time now is 11:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration