Internet Connection not working in Ubuntu 9.04
Hi there
I installed a fresh copy of Ubuntu 9.04, everything went fine but when I tried to connect to the internet in Firefox it fail to load the page.
I am also able to connect to my router but can't connect to the internet.
Is there any solution to solve this problem? Anyone can help me out would be great
Thanks
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- milvers
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
check firefox isnt working in offline mode
you may also not be getting dns resolution of names to ip
can you please provide the output of:
ping -c 1 www.bmezine.com
and
ping -c 1 38.99.130.180
if the line with the ip address works, you are not translating names to ip. you will then need the following:
For Gnome:
gksudo gedit /etc/resolv.conf
For KDE:
kdesudo kate /etc/resolv.conf
and add these lines:
nameserver 4.2.2.1
nameserver 151.197.0.38
nameserver 67.138.54.100
Save the file and close the editor then execute
sudo /etc/init.
you can now test using:
ping -c 1 www.bmezine.com
Which should now work.
Revision history for this message
|
#2 |
Hi there
Thank you for your type to write this useful help guide
I tried the first your lines and it works and did not go even further down as I managed to fix my problem five hours after I post it here. The problem is now solved.
Here is what I did to fix my internet connection
I manually adjust the internet connection due to the version of Ubuntu was unable to automatic detect myIP and network setting.
1.Right click on the little NetworkManager icon and click on the network name(my is EthO) to make sure it now connect as it was and go to "Edit Connection"
2.Go to "IPv4 Setting" Tab
3.Change Automatic(DHCP) to Manual in the drop down box
4.Click on “Add” button
Here is what got me stuck, as I did not know what Address I have or what netmask so here is what I had to find to able to put them in the right order
- Address(IP)
- Netmask
- Gateway
I went to the help guide and it help me little bit with how to find internet connection info
Some of the step I followed to get the important information I need to fill the missing gap...
-Terminal ifconfig ethO (Your network name might be different to my)
-Copy and paste the IP adress from I net Addr: section
-Secondly get the Netmask from Mask: section.
(Or just type ifconfig -a in the Terminal to display all of the connection you have connected to your machine)
The last one is what Gateway do I have? As it dosent appear in my ipconfig or I just dont know if it is there or what step I should do but what I know myself is
Went to my Window Vista machine that is connected to the internet
-Start- run- cmd- ipconfig- this is where I found my “default Gateway address.
Wrote down the gateway address and went back to Ubuntu 9.04 and filled the gap and click “Apply” to save the setting.
5.The hardest part is what DNS Server am I on? Well since I am a noob and have little knowledge with networking stuff.
The trick that I know of is by access to my router that has the DNS information I need
-But Cant remember how I got the IP address to point at the router that is connected to the internet.
-I went to Firefox and put the IP address for my router and it took me to the Router Configuration Page. This is how I got my DNS address from, copied and paste into gap.
6.The last step was to check the internet function in Firefox and it works perfect for me
I just wanted to share this knowledge with others who have problem with their internet connection in Ubuntu. So good luck and thank to the people that I visited at “Ubuntu Community Forum” for other problem relate to internet connection.
Revision history for this message
|
#3 |
Awesome dude. I do the same on my systems except i use /etc/network/
You may want to install a local DNS service on your Ubuntu system to speed up name resolution as well as reduce DNS traffic on the internet. Its none essential butcan speed things up:
sudo apt-get install dnsmasq
gksudo gedit /etc/dnsmasq.conf
find:
listen-address=
change it to:
listen-
Save and close gedit
gksudo gedit /etc/resolv.conf
set the top line to:
nameserver 127.0.0.1
Save and close gedit
sudo /etc/init.
now to test:
dig www.bmezine.com (make a note of the query time)
andy@fileserver:~$ dig www.bmezine.com
; <<>> DiG 9.5.1-P2 <<>> www.bmezine.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25781
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.bmezine.com. IN A
;; ANSWER SECTION:
www.bmezine.com. 42382 IN CNAME bmezine.com.
bmezine.com. 60 IN A 38.99.130.180
;; Query time: 33 msec <---**QUERY TIME IS HERE DUDE**
;; SERVER: 127.0.0.
;; WHEN: Sun Apr 26 11:21:23 2009
;; MSG SIZE rcvd: 63
then do it again:
andy@fileserver:~$ dig www.bmezine.com
; <<>> DiG 9.5.1-P2 <<>> www.bmezine.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33536
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.bmezine.com. IN A
;; ANSWER SECTION:
www.bmezine.com. 42323 IN CNAME bmezine.com.
bmezine.com. 1 IN A 38.99.130.180
;; Query time: 0 msec <--**BIT FASTER WOULDNT YOU SAY****
;; SERVER: 127.0.0.
;; WHEN: Sun Apr 26 11:22:22 2009
;; MSG SIZE rcvd: 74
Revision history for this message
|
#4 |
I will have to try that later and reply with my result soon. Thanks
Revision history for this message
|
#5 |
Actionparsnip,
I followed your first part and my problem was exactly how you described it. I even tried typing in yahoo's ip to firefox and the yahoo homepage popped right up. I tried your fix, but it didn't do anything. Am I supposed to add those three lines after three nameservers already on there or replace them?
Revision history for this message
|
#6 |
you add them as extra. Your system is failing DNS.
Add the nameserver lines to /etc/resolv.conf and you should be ok. Those are public DNS servers but we have no assured availability so adding a few will help
Revision history for this message
|
#7 |
Ok, no success. My ubuntu machine that is working has a .conf that looks like this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1
search myhome.westell.com
The one that isn't working now says this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 131.156.126.46
nameserver 131.156.126.2
nameserver 192.168.1.1
nameserver 4.2.2.1
nameserver 151.197.0.38
nameserver 67.138.54.100
search myhome.westell.com
BTW, thanks for your help
Revision history for this message
|
#8 |
Milvers
I have the same problem as u.
but i cannot see the little NETWORKMANAGER. where is it? I have ubuntu 9.04 as well.
Revision history for this message
|
#9 |
Hi Kululu
For your problem, I think Network Manager should be found in Administrator <Tab bar>
Hope that help
Milvers
Revision history for this message
|
#10 |
Thanks Milvers
I have seen it.
Can you explain me clearly the point 5. above about the DSN. how can I got it since I don't have any connection? how to know my router is connect to internet? I don't know even if wot is a router, i am a very young beginning.
cheers
Franck
Revision history for this message
|
#11 |
Hi Frank
Ok for your problem to see if your router is connected to your computer and to the Internet is to right click on the network icon(desktop taskbar) and click on "Connection Information". Look for Default Route which is the address to your router and type in that IP address in your nomination browser and it would direct you to your router configuration page.
If you don' t see the default route's IP I think you are not connect to the router(check for cable plug in etc) and try again.
Hope that helps
Regards
Milvers
Revision history for this message
|
#12 |
Thanks again for your answer.
This thing is that the " Connection Information" is not highlighted. The icon network on the desktop tasbar has a red cross on it and then I can not even if access the "Connection Information" because it is not highligthed. I am not using a cable but try to connect via wifi.
Cheers
Franck
Revision history for this message
|
#13 |
Hi,
I'm having the same problem, internet connected, can ping router and what not. Cannot browse the internet. I tried ActionParsnip's and when i ping the address, it says "network unreachable"
anyone have any ideas?
Revision history for this message
|
#14 |
nevermind, did the second thing and it worked -_-
Revision history for this message
|
#15 |
Hi,
My internet provider has given me an IP address and all the things related to this, i mean the necessary things needed using LAN.
They also gave me a login name and password to connect to internet.
And it works fine with Windows XP.
But when i connect to internet in Ubuntu 9.04 using IP address, default gateway, netmask, DNS server nd all that, my wired connection is established but it cant open any sites. i also check the incoming connection through ping and i get valuable response from the server i mean i get received bytes from server. But still cannot open any sites.
Firefox says "Failed to connect to inernet"
Please help, if anyone have any idea.
Thanks for reading.
Revision history for this message
|
#16 |
actionparsnip's answer of adding those 3 nameservers to /etc/resolv.conf worked beautifully.
What I would like to know is Why?
And why would 9.04 DNS resolution not work out of the box?
I already tried disabling ipV6 and all the other suggestions to no avail.
Any enlightenment?
Thanks in advance.
Revision history for this message
|
#17 |
Very simple. Your system gets all its information using DHCP (Dynamic Host Control Protocol). It is the DHCP servers job to give all the information about how the system communicates on the network it is attatched to. This includes address, subnet mask, DNS / WINS server addresses, default gateway and insome cases even proxy settings. This make network administration central for administrators of large networks but you will find smart admins use static addressing for servers.
It appears the addressing of your DNS servers is not being given by the DHCP server you use so you have to manually fill them out yourself.
8.8.8.8 and 8.8.4.4 are googles DNS servers and you can install and configure dnsmasq to run a local DNS service and make name resolutions quicker and therefore speed up your connection as the internet will not be used to resolve names.
sudo apt-get install dnsmasq; gksudo gedit /etc/dnsmasq.conf; sudo /etc/init.d/dnsmasq restart; gksudo gedit /etc/resolv.conf
Scroll to line 90ish and you will see:
listen-
uncomment the line and save the file. Close gedit and another file will open
add the line:
nameserver 127.0.0.1
to the TOP of the file, save and close gedit
You can now test with:
dig www.yahoo.com; sleep 5; dig www.yahoo.com
andy@fileserver:~$ dig www.yahoo.com
; <<>> DiG 9.6.1-P2 <<>> www.yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36982
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.yahoo.com. IN A
;; ANSWER SECTION:
www.yahoo.com. 141 IN CNAME www.wa1.
www.wa1.
www-real.
;; Query time: 9 msec
;; SERVER: 194.168.
;; WHEN: Thu Dec 31 14:34:46 2009
;; MSG SIZE rcvd: 94
; <<>> DiG 9.6.1-P2 <<>> www.yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29737
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.yahoo.com. IN A
;; ANSWER SECTION:
www.yahoo.com. 54 IN CNAME www.wa1.
www.wa1.
www-real.
;; Query time: 0 msec
;; SERVER: 127.0.0.
;; WHEN: Thu Dec 31 14:36:13 2009
;; MSG SIZE rcvd: 118
Notice how the query time is 0ms
;)