can't connect to the internet

Asked by thatamsyndrome

well i'm really new to ubuntu and one of my first problems is that i can't get online. i've gone through most of the guides off of this site but none have resolved my issue. currently when i check in the network that my wired connection setting is for DHCP and it is enabled. after that i pretty much don't know what else i can do. right now my home network is setup like this: ISP is Optimum Online (it uses DHCP), modem is Motorola SBV5120, router is Linksys WRT160N (wired), OS is UBuntu 8.04, browser is Firefox 3 Beta 5
I know the internet is working fine because I have 2 other computers wireless and 1 wired. Two of which as XP OS and one is Vista OS.
I've tried searching through all the other questions but so far i've only found people w/ PPPoE issues or PPP issues, none with DHCP connection problems. any thoughts or ideas? thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Selene ToyKeeper
Solved:
Last query:
Last reply:
Revision history for this message
Tony Mugan (tmugan) said :
#1

Open up a terminal window (Applications menu, Accessories) and post the answers to

ifconfig

and to list the PCI adapters detected

lspci

and to show the USB devices you have attached.

lsusb

This information will let you confirm whether your netowrk card is supported...
https://wiki.ubuntu.com/HardwareSupport

Revision history for this message
thatamsyndrome (thatamsyndrome) said :
#2

eth0 Link encap:Ethernet HWaddr 00:08:02:7c:b2:8c
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:36
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:10 Base address:0x9000

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1246 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:62860 (61.3 KB) TX bytes:62860 (61.3 KB)

00:00.0 Host bridge: ATI Technologies Inc RS200/RS200M AGP Bridge [IGP 340M] (rev 02)
00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 340M]
00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)
00:07.0 ISA bridge: ALi Corporation M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+]
00:0a.0 CardBus bridge: Texas Instruments PCI4410 PC card Cardbus Controller (rev 02)
00:0a.1 FireWire (IEEE 1394): Texas Instruments PCI4410 FireWire Controller (rev 02)
00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)
00:0c.0 Communication controller: Conexant HSF 56k HSFi Modem (rev 01)
00:10.0 IDE interface: ALi Corporation M5229 IDE (rev c4)
00:11.0 Bridge: ALi Corporation M7101 Power Management Controller [PMU]
00:13.0 USB Controller: NEC Corporation USB (rev 41)
00:13.1 USB Controller: NEC Corporation USB (rev 41)
00:13.2 USB Controller: NEC Corporation USB 2.0 (rev 02)
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon IGP 330M/340M/350M

Bus 003 Device 002: ID 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 "TetraHub"
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

so far i think its supported, or atleast UBuntu recognizes that i have a realtek ethernet controller

Revision history for this message
Selene ToyKeeper (toykeeper) said :
#3

Two commands which may shed light on the issue... please run both, and tell us what the output is:

  sudo ethtool eth0
  sudo dhclient eth0

The ethtool command will show things like whether the card is plugged in. The dhclient command will attempt to get an address from DHCP, and print details about what happens.

If it works, it will end with something like:

  bound to 192.168.1.103 -- renewal in 1786 seconds.

If you see that, try to access the network.

Revision history for this message
thatamsyndrome (thatamsyndrome) said :
#4

Settings for eth0:
 Supported ports: [ TP MII ]
 Supported link modes: 10baseT/Half 10baseT/Full
                         100baseT/Half 100baseT/Full
 Supports auto-negotiation: Yes
 Advertised link modes: 10baseT/Half 10baseT/Full
                         100baseT/Half 100baseT/Full
 Advertised auto-negotiation: Yes
 Speed: 10Mb/s
 Duplex: Half
 Port: MII
 PHYAD: 32
 Transceiver: internal
 Auto-negotiation: on
 Supports Wake-on: d
 Wake-on: d
 Current message level: 0x00000007 (7)
 Link detected: no
tam@Tamster:~$ sudo dhclient eth0
There is already a pid file /var/run/dhclient.pid with pid 6387
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:08:02:7c:b2:8c
Sending on LPF/eth0/00:08:02:7c:b2:8c
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
--------------------------------------------------------
well that last part seems to be the problem. but me being a noob at ubuntu, i have no idea what to do. X-D
btw, thanks for the help so far.

Revision history for this message
Juraj Lukac (hrasko) said :
#5

I think your problem is not in your Ubuntu box, I'd say you don't have the DHCP server enabled on your Linksys WRT160N router. Your ISP may give you an IP through the DHCP but that's the IP that is set at your router. You need still to enable the DHCP server on the private side of your router. Or you can set the IP address for your eth0 interface to some static value in /etc/network/interfaces file.

Revision history for this message
Selene ToyKeeper (toykeeper) said :
#6

This part of "ethtool"s output may be the problem:

  Link detected: no

That means it doesn't think it's plugged in. However, it could also mean it hasn't checked yet. Could you run "sudo ifconfig eth0 up" and then run "sudo ethtool eth0" again? This will force it to check the cable.

If you still see no link detected, check your physical connection. The cable may be loose, dirty, or broken. Otherwise, if it says it detected a link, the issue could be (as Juraj suggested) a broken or disabled DHCP server.

Let us know what you find, and we'll go from there.

Revision history for this message
thatamsyndrome (thatamsyndrome) said :
#7

the rj45 works fine, tested it on my other computer. it does say "link detected: no". the DHCP has always been enabled on my router (on by default). i know its not the NIC card on my computer because when i switch OS, it works fine. i even went as far as setting up a static IP w/ my router, still nothing. here's the readout that i got for sudo ethtool eth0:

Settings for eth0:
 Supported ports: [ TP MII ]
 Supported link modes: 10baseT/Half 10baseT/Full
                         100baseT/Half 100baseT/Full
 Supports auto-negotiation: Yes
 Advertised link modes: 10baseT/Half 10baseT/Full
                         100baseT/Half 100baseT/Full
 Advertised auto-negotiation: Yes
 Speed: 10Mb/s
 Duplex: Half
 Port: MII
 PHYAD: 32
 Transceiver: internal
 Auto-negotiation: on
 Supports Wake-on: d
 Wake-on: d
 Current message level: 0x00000007 (7)
 Link detected: no

Revision history for this message
Tony Mugan (tmugan) said :
#8

Funny that it has negotiated down to a half-duplex 10Mb/s link and that the link is not detected.
Your router handles 100Mb/s full-duplex and your connection to the router is a hard-wire not wireless.

http://www.linksys.com/servlet/Satellite?c=L_Product_C2&childpagename=US%2FLayout&cid=1175239516849&pagename=Linksys%2FCommon%2FVisitorWrapper

Can you try swapping the cable and perhaps the port on the router with another machine that you have proven is working?

It seems like a long-shot but what you are experiencing is odd.

Revision history for this message
Martin Božič (martin-bozic) said :
#9

If your box is dual boot and the network interface card (NIC) is integrated onto motherboard it might be that Windows somehow lockup the NIC on hardware level and prevent Linux to communicate with it. The solution might be to get a PCI NIC.

Revision history for this message
Juraj Lukac (hrasko) said :
#10

you could also post here output of these two commands:

mii-tool
mii-diag

as root. but from the ethtool output it really seems the link (conection) between your computer and the router is established.

trying to connect another computer through that router like Tony Mugan says might be helpful too.

Revision history for this message
Best Selene ToyKeeper (toykeeper) said :
#11

Okay, we're all guessing at things which could possibly cause the problem. Linux thinks the cable isn't plugged in, but apparently it works in a different OS on the same computer.

The realtek 8139 family of NICs generally works pretty well, but there are two drivers for it. Maybe the other driver will work better; I've heard that happens occasionally. Try doing the following:

  lsmod | grep 8139

This should say "8139cp" or "8139too". I'll assume 8139cp for now, but the names should be swapped if lsmod shows the other one.

Then, to swap drivers, run:

  sudo ifdown eth0
  sudo modprobe -rv 8139cp
  sudo modprobe -v 8139too

And, assuming it loads correctly, try to bring up the network:

  sudo dhclient eth0

Hopefully this is just one of the rare cards which doesn't like the default driver.

Revision history for this message
thatamsyndrome (thatamsyndrome) said :
#12

Thanks Scott Scriven, that solved my question.

Revision history for this message
thatamsyndrome (thatamsyndrome) said :
#13

OMG scott you are a genius! it works perfectly now. Thats weird that it didn't like the default driver. But thinking outside the box really helped me out. I really appreciate your help and everyone else's input as well :-D

Revision history for this message
Selene ToyKeeper (toykeeper) said :
#14

Okay, good. One last thing you probably want to know...

To make the change permanent, edit the file /etc/modprobe.conf . One way to do this is by running "sudo nano /etc/modprobe.conf". Keyboard shortcuts are listed onscreen inside nano.

In the file, add a line which says:

  alias eth0 8139too

Then save and quit. This will tell the computer which driver to use in the future.

Revision history for this message
johny (joh13ny) said :
#15

I have dual boot os win xp and ubuntu 8.4.In wn xp there is no problem on connecting to the internet but when I use ubuntu I can't connect to the internet