LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to Connect to the Internet in Linux. (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-connect-to-the-internet-in-linux-885542/)

kkumaresan.p 06-10-2011 04:28 AM

Unable to Connect to the Internet in Linux.
 
Hi,

I have installed Linux 5.6 in my home PC, i tired to use internet connection its failed to connect. Whereas i am able to work in windows XP.

In Linux:-

i am not able to ping any sites.

i am using BSNL Broadband connection.

i have enable the option DHCP (IN DNS Configuration) to obtain an IP automatically from the ISP.

/etc/resolv.conf file looks like

search localhost
nameserver 192.168.1.1

Please help me to resolve this issue.

Thanks in Advance.

ButterflyMelissa 06-10-2011 04:55 AM

Quote:

nameserver 192.168.1.1
Hi, is'nt that the IP of your gateway? I guess the IP of the DNS server of your ISP goes there.

Try pinging your own box:

Quote:

ping 127.0.0.1
Check what the settings are

Quote:

ifconfig -a
Are there valid settings? IP address, gateway, netmask? Are netmask of your gateway (modem?) and your box the same? Is your box set to use DHCP? If so, try a static IP address instead, maybe DHCP is not available on your setup - your modem has to have a DHCP sever available....if not, you cannot get an IP address.

I'll keep this thread in view to see where else I could help...

Thor

16pide 06-10-2011 05:17 AM

to help us help you, please post the output of the following terminal commands:
Code:

ifconfig
ifconfig -a
route
grep hosts /etc/nsswitch.conf
ping 192.168.1.1
ping 8.8.8.8


saivnoba 06-10-2011 06:06 AM

Quote:

Originally Posted by kkumaresan.p (Post 4381646)
Hi,
I have installed Linux 5.6 in my home PC, i tired to use internet connection its failed to connect. Whereas i am able to work in windows XP.

In Linux:-
i am not able to ping any sites.

i am using BSNL Broadband connection.

i have enable the option DHCP (IN DNS Configuration) to obtain an IP automatically from the ISP.

/etc/resolv.conf file looks like

search localhost
nameserver 192.168.1.1

You have not mentioned which distro you are using. By 5.6, I guess it is either RHEL or CentOS. Please post the output of
Code:

uname -a
Also, are you trying wired connection or wireless. On my CentOS box I tried a lot to get wireless working. But no success.

In your resolv.conf file, line starting from nameserver is correct. But I'm not sure about the first line. I don't have it in my box. Try after removing the line 'search localhost'.

Also, can you ping 192.168.1.1? But not websites like www.google.com? Check for firewall settings in your modem.

ButterflyMelissa 06-10-2011 06:19 AM

Quote:

Also, can you ping 192.168.1.1? But not websites like www.google.com? Check for firewall settings in your modem.
If that's the case, I bet the DNS is not set properly/at all. If that's the only itch, he'd be able to ping google directly using the IP address 74.125.79.147 ... How about trying:

Quote:

ping 74.125.79.147
and see what gives? If it's a clean install, google will not be in the block list...

divyashree 06-10-2011 06:40 AM

Quote:

Originally Posted by kkumaresan.p (Post 4381646)
Hi,

I have installed Linux 5.6 in my home PC, i tired to use internet connection its failed to connect. Whereas i am able to work in windows XP.

In Linux:-

i am not able to ping any sites.

i am using BSNL Broadband connection.

i have enable the option DHCP (IN DNS Configuration) to obtain an IP automatically from the ISP.

/etc/resolv.conf file looks like

search localhost
nameserver 192.168.1.1

Please help me to resolve this issue.

Thanks in Advance.

The IP in your resolv.conf, have you entered this manually or it took automatically ?

You can do one thing, if internet works in windows, in windows go to cmd, run the ipconfig /all and collect the dns server adresses and put them in the resolv.conf .

Now check whether it works or not.


All times are GMT -5. The time now is 09:59 AM.