unable to connect to the internet

Asked by jegan

hi all,
i a new to ubuntu.i had installed it recently.
when i tried to connect to internet, i had activated the wifi catcher.the list wifi connections available was displayed
i found mine and entered the security key..i was able to connect..but i tried to browse ,i wasnt able to[even though it says that i am connected says that i am connected]
please help me

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Pokie_Carlwin (ek-diggitydank) said :
#1
Revision history for this message
Jim Hutchinson (jphutch) said :
#2

If you were able to connect to the wifi access point (AP) the problem is probably not related to your Ubuntu setup or any problem with wireless on your computer. It is probably a problem with how the router is configured, how it connects to your cable or dsl modem (if separate) or a problem with your ISP.

If you can connect to the AP we will need to determine where the connection stops. Do you know your router's local IP address? 192.168.1.1 is very common but it depends a lot on brand and whether or not you have changed it.

In a terminal (apps - accessories) type

ifconfig

You should see a bunch of output for at least three adapters: eth0, eth1 and lo. It is not always the same but eth1 is often the wireless (if you have something other than eth that is fine). What is the inet address? Post that here or post all the output if you are not sure.

Once we know you have an IP for the computer when can then try and ping the router, the modem and then google or something.

If you computer's IP address (eth1) is something like 192.168.1.102 we can try to infer the IP of the router. Or you can look it up in the router's instructions. If the router IP is 192.168.1.1, in the terminal type

ping 192.168.1.1

Replace the IP with whatever is correct for your router.

Press ctrl-c to stop in from pinging after 4 or 5 responses and paste the output here.

One we see what you are getting we can go from there.

Revision history for this message
jegan (jeganmhn) said :
#3

thanks for the advice jim.
i got windows vista also on the same pc..and i am able to connect...i will try it with ubuntu and let you know..
let me know if there is any other way to go about this..thanks jim

Revision history for this message
Jim Hutchinson (jphutch) said :
#4

Well, the only way to go about it is to determine where the connection is breaking down. In your original post you said you were able to connect to the wireless AP but not the internet. If that is the case, then the problem should also occur in vista as the problem occurs at or after the AP (unless it's DNS issues). If that is not the case then there is a problem between the computer and AP but that is not what you described. Next time you connect to the AP run the ifconfig command in a terminal and see if you have an IP address for the computer. If not, that helps localize the problem. If so, well, we'll cross that bridge later.

Actually, if you get an IP for the computer (i.e. it is connecting) and you still cannot surf the web, try visiting a web site by IP. For example, one IP for google is 64.233.167.104. Put that in as an address. If you get to google it's a DNS problem. If you still can't then I'm starting to run out of ideas.

Revision history for this message
jegan (jeganmhn) said :
#5

yep..when i put in the ip address i am able to connect..:)
i did a nslookup in vista..got the dns..but when i put it in..it is still not working

Revision history for this message
jegan (jeganmhn) said :
#6

can you please tell me how i should go abt this..
thanks jim..

Revision history for this message
jegan (jeganmhn) said :
#7

i have taken some screen shots put i cannot seem to paste it here..

Revision history for this message
Jim Hutchinson (jphutch) said :
#8

Well, glad to know we identified the problem. Unfortunately, DNS is not a strength of mine. We can try a few things and maybe we'll get lucky.

There should be a file /etc/resolv.conf. Open it and see if has content. It should have a nameserver IP listed. If so, what is it? It should match either the IP or your router or the DNS given to you by your ISP (may be automatically set up - can you access a setup page for your modem and see if there are DNS address listed).

Make sure that your router lists DNS addresses. Access the setup page and check. The router may list the IP of the modem as the DNS address, one or more from you ISP or a mixture (I have the modem IP and one DNS from my ISP). If your router is not picking up the DNS address then you may need to configure it manually.

You can also open up system - admin - network and click the DNS tab. If there is nothing listed under DNS servers you can add either one from your ISP or put in the IP of your router.

You will have to play around a bit and see if something works. Like I said, I'm kind of shooting in the dark but maybe one of these will work. If not, post back and let me know what you tried and what happened and I'll see if I can come up with anything else. Try just one thing at a time and see if it works. You may need to restart networking after each change for it to take effect.

sudo /etc/init.d/networking restart

Revision history for this message
jegan (jeganmhn) said :
#9

well..when i executed sudo /etc/init.d/networking ...i got...

jeganmohan@jeganmohan-laptop:~$ sudo /etc/init.d/networking restart
Password:
 * Reconfiguring network interfaces... RTNETLINK answers: No such process
There is already a pid file /var/run/dhclient.eth0.pid with pid 4536
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:18:8b:c2:38:67
Sending on LPF/eth0/00:18:8b:c2:38:67
Sending on Socket/fallback
There is already a pid file /var/run/dhclient.eth0.pid with pid 134993416
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:18:8b:c2:38:67
Sending on LPF/eth0/00:18:8b:c2:38:67
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
eth2: ERROR while getting interface flags: No such device
There is already a pid file /var/run/dhclient.eth2.pid with pid 134993416
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
eth2: ERROR while getting interface flags: No such device
eth2: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up eth2.
ath0: ERROR while getting interface flags: No such device
There is already a pid file /var/run/dhclient.ath0.pid with pid 134993416
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
ath0: ERROR while getting interface flags: No such device
ath0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up ath0.
wlan0: ERROR while getting interface flags: No such device
There is already a pid file /var/run/dhclient.wlan0.pid with pid 134993416
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
wlan0: ERROR while getting interface flags: No such device
wlan0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up wlan0.

....
plus i checked out the entry in the file /etc/resolv.conf ..its the same entry as the one present in...system - admin - network and click the DNS tab..its the one which corresponds to the DNS given by the ISP

there are 3 other machines connected to the wireless router..so i there is no problem with the router..:(..i can connect to the internet on my windows machine...
i really appreciate the effort you that you are putting into this..
thanks jim

Revision history for this message
jegan (jeganmhn) said :
#10

output of iwconfig
jeganmohan@jeganmohan-laptop:~$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11g ESSID:"Shaktiman"
          Mode:Managed Frequency:2.437 GHz Access Point: 00:19:5B:B8:A6:D3
          Bit Rate:54 Mb/s Tx-Power:13 dBm
          Retry limit:15 RTS thr:off Fragment thr:off
          Power Management:off
          Link Quality=74/100 Signal level=-59 dBm Noise level=-60 dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:835 Missed beacon:0

Revision history for this message
Jim Hutchinson (jphutch) said :
#11

Hmmm, I'm starting to think it's more than just DNS problems. It sounds like your wifi is detected and working but then maybe not. Odd. Lets try cleaning things up a bit and restarting.

First open /etc/network/interfaces (sudo gedit /etc/network/interfaces) and comment out (add # in front of each line) all except

auto lo
iface lo inet loopback

Then

sudo killall NetworkManager

sudo /etc/init.d/networking restart

sudo NetworkManager

See it you can connect to your AP. If so, see what sort of connectivity you have. Like before, test with just an IP in firefox if using a domain name doesn't work.

See if you can ping your router.

Ping 192.168.1.1 (or whatever the router IP is)

If you can, see if you can ping your modem. I'm assuming you have a wireless router connected to a cable or dsl modem.

Let me know what happens.

Revision history for this message
jegan (jeganmhn) said :
#12

Hi Jim
This is what i did..

sudo gedit /etc/network/interfaces
jeganmohan@jeganmohan-laptop:~$ sudo killall NetworkManager
jeganmohan@jeganmohan-laptop:~$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces... Ignoring unknown interface eth0=eth0.
                                                                         [ OK ]
jeganmohan@jeganmohan-laptop:~$ sudo NetworkManager

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
jeganmohan@jeganmohan-laptop:~$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.08 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=1.13 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=1.08 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=1.12 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=1.02 ms
64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=0.946 ms
64 bytes from 192.168.0.1: icmp_seq=7 ttl=64 time=0.966 ms
^C64 bytes from 192.168.0.1: icmp_seq=8 ttl=64 time=1.00 ms

--- 192.168.0.1 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 6999ms
rtt min/avg/max/mdev = 0.946/1.045/1.135/0.075 ms
////////////////////////////////////////////////////////////////
jeganmohan@jeganmohan-laptop:~$ ping 192.168.1.254
PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
64 bytes from 192.168.1.254: icmp_seq=1 ttl=254 time=2.34 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=254 time=1.84 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=254 time=1.90 ms
64 bytes from 192.168.1.254: icmp_seq=4 ttl=254 time=1.96 ms
64 bytes from 192.168.1.254: icmp_seq=5 ttl=254 time=1.80 ms
64 bytes from 192.168.1.254: icmp_seq=6 ttl=254 time=6.22 ms
64 bytes from 192.168.1.254: icmp_seq=7 ttl=254 time=1.85 ms
64 bytes from 192.168.1.254: icmp_seq=8 ttl=254 time=1.96 ms
64 bytes from 192.168.1.254: icmp_seq=9 ttl=254 time=2.09 ms

--- 192.168.1.254 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 8000ms
rtt min/avg/max/mdev = 1.809/2.445/6.225/1.345 ms
................
i was able to ping to my my default gateway..
i am able to connect to google using only the ip address

what should i do now...
beofer doing the above i ran cable from the wireless router to my laptop..and i got the same results..i can connect using the ip address but not otherwise...
i dont mind having a wired connection..so can you help me out in either problem
tha nks jim

Revision history for this message
Jim Hutchinson (jphutch) said :
#13

I'd say this is almost certainly a DNS problem but I don't know how to solve it. There are several places where the DNS addresses are stored: your router, modem, the resolv.conf file and perhaps others. If the obvious ones (router, modem) have the correct address(es) then I'm not sure why they are not being picked up and used. I think you would have the best luck getting this fixed by joining one of the IRC channels. There are people there almost all the time and someone will surely have ideas. I'd suggest picking the IRC channel associated with the nearest loco team.

https://wiki.ubuntu.com/LoCoTeamList

I'm on #ubuntu-colorado a lot and I know there are a few people there who could help.

Anyway, sorry I don't have the answer, but at least we have a name for the problem.

Revision history for this message
gnuskool (gnuskool) said :
#14

Being able to ping an outside ip address but not being able to surf is a DNS problem, read here on how to go about sorting it https://answers.launchpad.net/ubuntu/+question/2248

Can you help with this problem?

Provide an answer of your own, or ask jegan for more information if necessary.

To post a message you must log in.