Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am an Ubuntu user for the last couple of years. Recently facing problem to connect my new laptop into the Internet. I have an ISP connection which provide me a NAT address.

I changed all the information in network configuration.The network icon shows it is connected to Internet but when I browse, ping shows no Internet connection. /etc/network/interfaces look like this:

auto eth0
iface eth0 inet static
address 192.168.100.118(put you internet address provided by the ISP)
gateway 192.168.100.1(gateway address)
netmask 255.255.255.0
network 192.168.100.0

And when I ping my DNS server IP get the reply from DNS server.

I can not understand the problem,it should be mentioned that I also changed the Physical address of my laptop for using the existing connection.

In windows the connection is working fine.

Any suggestion in this question will help me a lot.

Thanks in advance.

share|improve this question
    
Does it work when you do ping 4.2.2.2? –  Azendale Jun 16 '11 at 18:16
    
Please dismiss or accept an answer –  Ringtail Feb 24 '12 at 1:46
add comment

1 Answer

You indicate a static IP, but the profile has no name servers listed... that is the base problem. I'm not familiar with the file you show, but would guess it needs a line like below. What I show below is the old-school way to put it directly into the resolv.conf file.

If ping by IP address works, but names do not work, then look in the file /etc/resolve.conf At a minimum this file must contain at least one line like:

nameserver 54.23.123.4

I made that number up, so don't use it. If there are no lines (up to 3) that start with the word "nameserver", or if the IP that is given is wrong, then, that is the problem.

If you know the IP of one or more of your name servers, the just add one to three of these lines and it should work right away. Note that you must be root or use sudo to do this. Also, use a text editor, not a word processor (or save as plain text).

Note, if you should use DHCP instead of a static IP, the DHCP client should over right this file upon making the connection and should put the nameserver lines in it as per the numbers told to it by your ISP's DHCP server. So do not be surprised if this file gets over written.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.