LinuxQuestions.org
Review your favorite Linux distribution.
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 01-11-2009, 07:56 AM   #1
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Rep: Reputation: 30
Kubuntu - LAN works but not Internet


I just installed Kubuntu on a PC which is connected to a LAN - router.
But Im unable to connect to the internet.
ping 192.168.1.* works but ping google.com returns unknown host. I can ping to all other PCs.

I have this in my /etc/network/interfaces

Code:
#eth0 main
auto eth0
iface eth0 inet dhcp

auto lo
iface loopback inet loopback
I even tried specifying gateway (192.168.1.1) though it was already detected via DHCP before I added it.
Any idea why my internet isnt working ?

Thanks
 
Old 01-11-2009, 09:36 AM   #2
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
Does this work?

ping 74.125.45.100

If you get feedback on it, then check your DNS to make sure you have that entered in your network setup.
 
Old 01-11-2009, 11:38 AM   #3
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
Do you have a default gateway (~$route)?
 
Old 01-11-2009, 12:10 PM   #4
framp
Member
 
Registered: Apr 2003
Location: Next to Stuttgart, Germany
Distribution: Debian, Mint, Raspbian
Posts: 131
Blog Entries: 5

Rep: Reputation: 27
Might be there is no default route set, might be there is no dns server defined, might be the dns server is no dns server, might be ...

We need details about your network config ;-) .

Pls execute this script and check the error messages and fix them by reading the referred URLs. If there are no config errors detected post the output of the log file collectNWData.txt in this forum or phpfi.com. This will give us defails about your network config and we most probably will be able to help you to get your problem fixed.
 
Old 01-12-2009, 03:03 AM   #5
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
Code:
~$cat /etc/resolv.conf
nameserver 192.168.1.1

~$cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

~$route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         192.168.1.1     0.0.0.0         UG    100    0        0 eth0
ping 74.125.45.100 works !
I get the google.com page when I enter 4.125.45.100 in konqueror !
 
Old 01-12-2009, 03:24 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Rep: Reputation: Disabled
Do you say your problem is solved? If not then its a DNS issue. Your system is not able to resolve the names of the ips.
 
Old 01-12-2009, 03:41 AM   #7
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
Not solved.
Quote:
Your system is not able to resolve the names of the ips.
How do I get that done ? I thought this would be take care of by the router.

Do I need to add the same nameserver IPs mentioned in the router to my PC's /etc/resolv.conf file ?
 
Old 01-12-2009, 04:18 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Rep: Reputation: Disabled
You could try that. But your router should do that for you. But if it is not resolving then editing your resolv.conf could be your answer.
 
Old 01-12-2009, 04:56 AM   #9
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
/etc/resolv.conf had just nameserver 192.168.1.1

Code:
/etc/init.d/networking stop

sudo kate /etc/resolv.conf 
// I added the nameservers and deleted 192.168.1.1

cat /etc/resolv.conf
203.94.227.70
203.94.243.70

/etc/init.d/networking start
cat /etc/resolv.conf
192.168.1.1
How come the edits made to /etc/resolv.conf were gone after starting the network ?

Last edited by anjanesh; 01-12-2009 at 05:10 AM.
 
Old 01-12-2009, 05:57 AM   #10
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
Solved.
I edited /etc/dhcp3/dhclient.conf
and uncommented prepend domain-name-servers and added the DNS servers here.
 
Old 01-12-2009, 06:02 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Rep: Reputation: Disabled
If you have a dhcp server running you can configure it to give dns information with ip address as well. You need not manually edit your resolv.conf file then.
 
Old 01-12-2009, 11:44 AM   #12
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
On the Windows PCs which are on the same LAN, the DNS servers mentioned on all Windows PCs are
Code:
203.xx.xxx.70
203.xx.xxx.70
While the DNS servers mentioned in the router is
Code:
203.xx.xxx.1
203.xx.xxx.1
So Im guessing that the DNS in the router is wrong and should've been 203.xx.xxx.70 instead of 203.xx.xxx.1.
 
Old 01-12-2009, 11:07 PM   #13
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Rep: Reputation: Disabled
So you could configure your dhcp to relay dns information as well. If your router acts as a dhcp server then edit the dns information in router manually.
 
  


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
CentOS 5.2: Only one of eth0 (internet) or eth1 (LAN) works Sinedie Linux - Networking 3 08-20-2008 04:52 AM
Server access issue - works from internet but not the lan kevinyeandel Linux - Networking 2 06-09-2008 08:49 AM
router pc problem, internet stopped working, lan works, using rc.firewall glorsplitz Linux - Networking 4 10-09-2007 07:18 PM
LAN works, but Internet does not connect digiplaya Linux - Networking 7 11-29-2003 05:07 PM
LAN works but Internet doesn't ???? El Croat Mandriva 11 08-24-2003 03:56 AM

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

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

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