Solved

Ubuntu 8.10 won't get IP address (wired)

Posted on 2009-04-10
34
1,672 Views
Last Modified: 2013-11-15
It's been one of those nights... I just set up a desktop with Ubuntu 8.10. The install went fine. The only thing that refuses to work is networking. I know the NIC and cable are fine because when this machine was running Windows earlier, it connected without any problems. I have a Linksys wireless router sitting between my computers and the cable modem. The router has DHCP enabled, and this Ubuntu machine was set to grab an IP using DHCP. No luck. I tried restarting dbus, I tried bringing eth0 down and up again, it absolutely refuses to pull an IP address. When I run ifconfig eth0, it shows no "inet addr" but it does have an "inet6 addr".

So next I tried a static IP address. It assigned okay, but I couldn't connect to anything.

Next, I bypassed the router entirely. I connected the Ubuntu machine directly to the cable modem, set eth0 back to DHCP, restarted dbus, brought eth0 down and up... still no IP address.

I have no idea why this isn't working. Help please?


Edit: I tried replacing the cable with another known good cable just for the sake of doing it. I get the same behavior. I even tried rebooting. When the system comes back up and I log in, the network status icon says "The network connection has been disconnected."
0
Comment
Question by:elorc
  • 15
  • 14
  • 3
  • +1
34 Comments
 
LVL 5

Expert Comment

by:ping_it
ID: 24121161
I think it is some problem with the drivers or with the services.

Put here the output of those commands:

ps -e

tcpdump -i eth1 -nntq (or eth0 -- you know)


0
 
LVL 30

Expert Comment

by:IanTh
ID: 24121280
try setting up an ipv4 address in the ip4 tab and specify in your dhcp config a oreferred ip address thats what I had to do with my ubuntu test web server  
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24121288
What I wanted to know is whether the DHCP client process is running and whether is "trying" to get the IP address.

If not, you need to configure the dhcp client -- here is what to do:http://linuxpoison.blogspot.com/2009/03/how-to-configure-dhcp-client.html

After this explanation there is what needs to be changed for ubuntu, since some files are somewhere else
0
 
LVL 30

Expert Comment

by:IanTh
ID: 24121334
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24121942
disconnect the cable, reattach it, run dhcp and (after it fails) post here the output of dmesg | tail -n 20
0
 
LVL 1

Author Comment

by:elorc
ID: 24122403
ps -e showed the following:
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 events/0
    7 ?        00:00:00 khelper
   44 ?        00:00:00 kintegrityd/0
   46 ?        00:00:00 kblockd/0
   48 ?        00:00:00 kacpid
   49 ?        00:00:00 kacpi_notify
  120 ?        00:00:00 cqueue
  124 ?        00:00:00 kseriod
  170 ?        00:00:00 pdflush
  171 ?        00:00:00 pdflush
  172 ?        00:00:00 kswapd0
  218 ?        00:00:00 aio/0
 1142 ?        00:00:00 ksuspend_usbd
 1144 ?        00:00:00 khubd
 1150 ?        00:00:00 ata/0
 1155 ?        00:00:00 ata_aux
 1855 ?        00:00:00 scsi_eh_0
 1857 ?        00:00:00 scsi_eh_1
 1908 ?        00:00:00 scsi_eh_2
 1909 ?        00:00:00 scsi_eh_3
 2054 ?        00:00:00 kjournald
 2228 ?        00:00:00 udevd
 4329 tty4     00:00:00 getty
 4330 tty5     00:00:00 getty
 4337 tty2     00:00:00 getty
 4338 tty3     00:00:00 getty
 4339 tty6     00:00:00 getty
 4504 ?        00:00:00 acpid
 4533 ?        00:00:00 kondemand/0
 4616 ?        00:00:00 syslogd
 4667 ?        00:00:00 dd
 4669 ?        00:00:00 klogd
 4692 ?        00:00:00 dbus-daemon
 4714 ?        00:00:00 avahi-daemon
 4715 ?        00:00:00 avahi-daemon
 4748 ?        00:00:00 cupsd
 4803 ?        00:00:00 hald
 4806 ?        00:00:00 console-kit-dae
 4869 ?        00:00:00 hald-runner
 4888 ?        00:00:00 hald-addon-inpu
 4897 ?        00:00:00 hald-addon-cpuf
 4898 ?        00:00:00 hald-addon-acpi
 4923 ?        00:00:00 hald-addon-stor
 4967 ?        00:00:00 bluetoothd
 4972 ?        00:00:00 btaddconn
 4974 ?        00:00:00 btdelconn
 4999 ?        00:00:00 krfcommd
 5022 ?        00:00:00 NetworkManager
 5026 ?        00:00:00 wpa_supplicant
 5029 ?        00:00:00 nm-system-setti
 5060 ?        00:00:00 gdm
 5063 ?        00:00:00 gdm
 5067 tty7     00:00:02 Xorg
 5098 ?        00:00:00 system-tools-ba
 5132 ?        00:00:00 atd
 5160 ?        00:00:00 cron
 5233 tty1     00:00:00 getty
 5265 ?        00:00:00 gnome-keyring-d
 5276 ?        00:00:00 x-session-manag
 5451 ?        00:00:00 dbus-launch
 5452 ?        00:00:00 dbus-daemon
 5455 ?        00:00:00 pulseaudio
 5460 ?        00:00:00 gconf-helper
 5462 ?        00:00:00 gconfd-2
 5468 ?        00:00:00 seahorse-agent
 5471 ?        00:00:00 gvfsd
 5472 ?        00:00:00 gnome-keyring-d
 5482 ?        00:00:00 gvfs-fuse-daemo
 5486 ?        00:00:00 gnome-settings-
 5487 ?        00:00:00 compiz
 5553 ?        00:00:01 compiz.real
 5561 ?        00:00:00 gnome-screensav
 5562 ?        00:00:00 sh
 5563 ?        00:00:00 compiz-decorato
 5565 ?        00:00:00 gtk-window-deco
 5566 ?        00:00:01 gnome-panel
 5568 ?        00:00:01 nautilus
 5570 ?        00:00:00 bonobo-activati
 5578 ?        00:00:00 gvfs-hal-volume
 5580 ?        00:00:00 gvfs-gphoto2-vo
 5584 ?        00:00:00 trashapplet
 5587 ?        00:00:00 gvfsd-burn
 5589 ?        00:00:00 gvfsd-trash
 5594 ?        00:00:00 fast-user-switc
 5598 ?        00:00:00 mixer_applet2
 5612 ?        00:00:00 bluetooth-apple
 5614 ?        00:00:00 nm-applet
 5620 ?        00:00:00 tracker-applet
 5621 ?        00:00:00 evolution-alarm
 5623 ?        00:00:00 python
 5626 ?        00:00:00 trackerd
 5627 ?        00:00:00 update-notifier
 5629 ?        00:00:00 gnome-power-man
 5650 ?        00:00:01 jockey-backend
 5700 ?        00:00:01 gnome-terminal
 5702 ?        00:00:00 gnome-pty-helpe
 5703 pts/0    00:00:00 bash
 5720 pts/0    00:00:00 ps


tcpdump -i eth0 --nntq:

tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel



dmesg after trying to bring eth0 back up:

[  193.816077] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[  325.329453] tcpdump uses obsolete (PF_INET,SOCK_PACKET)
[  351.152053] device eth0 entered promiscuous mode
[  363.988026] device eth0 left promiscuous mode
[  409.816042] eth0: Transmit timeout, status 0d 0000 c07f media 10.
[  409.816056] eth0: Tx queue start entry 4  dirty entry 0.
[  409.816061] eth0:  Tx descriptor 0 is 0008205a. (queue head)
[  409.816066] eth0:  Tx descriptor 1 is 00082046.
[  409.816071] eth0:  Tx descriptor 2 is 00082156.
[  409.816075] eth0:  Tx descriptor 3 is 00082156.
[  409.816095] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[  584.336087] device eth0 entered promiscuous mode
[  595.260027] device eth0 left promiscuous mode
[  661.816060] eth0: Transmit timeout, status 0d 0000 c07f media 10.
[  661.816073] eth0: Tx queue start entry 4  dirty entry 0.
[  661.816079] eth0:  Tx descriptor 0 is 00082156. (queue head)
[  661.816084] eth0:  Tx descriptor 1 is 00082156.
[  661.816088] eth0:  Tx descriptor 2 is 00082156.
[  661.816092] eth0:  Tx descriptor 3 is 00082156.
[  661.816112] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1



ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:14:85:0a:12:d9  
          inet6 addr: fe80::214:85ff:fe0a:12d9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          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:18 Base address:0xa400

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:486 errors:0 dropped:0 overruns:0 frame:0
          TX packets:486 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:30448 (30.4 KB)  TX bytes:30448 (30.4 KB)


0
 
LVL 5

Expert Comment

by:ping_it
ID: 24122422
as I can see the DHCP client is not starting.

You need to start the dhcp client in order for the ubuntu machine to ask for an IP address
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24122448
if you don't have it you should install it...

dhcp-client

in ps -e should appear: "dhcpcd"

http://packages.ubuntu.com/dapper/dhcp-client
http://packages.ubuntu.com/dapper/dhcpcd

Use the graphical interface of Ubuntu to download and install a package from the repositories. It will install automatically the necessary dependencies
0
 
LVL 1

Author Comment

by:elorc
ID: 24122490
It shows that dhcp3-client is already installed in the package manager. See attached.
dhcp1.png
dhcp2.png
dhcp3.png
dhcp4.png
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24122523
so it is installed, but not started....
I will try to search for some infos in 10 minuts
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24122590
what do you have on /etc/network/interfaces?

Open in new window

0
 
LVL 5

Expert Comment

by:ping_it
ID: 24122673
apt-get remove dhcp-client ... there is written that conflicts... it's the old version also installed...

you need only one
0
 
LVL 1

Author Comment

by:elorc
ID: 24123289
/etc/network/interfaces:

auto lo
iface lo inet loopback



Should I manually enter the eth0 interface here and try that? I had expected to see that info here (since I thought the network configuration GUI would link back to this).
0
 
LVL 1

Author Comment

by:elorc
ID: 24123311
When I try to sudo apt-get remove dhcp-client...

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

0
 
LVL 5

Expert Comment

by:ping_it
ID: 24123322
You can change the interfaces file like here:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Then I think you have to restart the network... don't remember the command, if you can just restart the machine
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24123330
Oh, found: sudo /etc/init.d/networking restart
0
 
LVL 1

Author Comment

by:elorc
ID: 24123382
Oh about the apt-get remove thing... I figured it out, I still had package manager minimized. I closed it and tried to apt-get remove dhcp-client... it says it isn't installed:

frank@quintus:~$ sudo apt-get remove dhcp-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package dhcp-client is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Author Comment

by:elorc
ID: 24123383
Ok so I changed my /etc/network/interfaces to:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp


Then I restarted networking. I saw this:

* Reconfiguring network interfaces...
There is already a pid file /var/run/dhclient.eth0.pid with pid 6993
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp

Listening on LPF/eth0/00:14:85:0a:12:d9
Sending on LPF/eth0/00:14:85:0a:12:d9
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 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received
No working leases in persistent database - sleeping



So I checked ifconfig, and now there is both eth0 and eth0:avahi...

eth0      Link encap:Ethernet  HWaddr 00:14:85:0a:12:d9  
          inet6 addr: fe80::214:85ff:fe0a:12d9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          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:18 Base address:0xa400

eth0:avahi Link encap:Ethernet  HWaddr 00:14:85:0a:12:d9  
          inet addr:169.254.5.194  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:18 Base address:0xa400

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:502 errors:0 dropped:0 overruns:0 frame:0
          TX packets:502 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31632 (31.6 KB)  TX bytes:31632 (31.6 KB)



Next I rebooted the system (I figured maybe that might help), but I'm seeing the same thing from ifconfig and I'm still not able to get a network connection or IP address from DHCP.
0
 
LVL 1

Author Comment

by:elorc
ID: 24123461
This might be helpful by the way... the results from lspci. Note that at the bottom it does identify the ethernet controller correctly.

00:00.0 Host bridge: ALi Corporation M1689 K8 Northbridge [Super K8 Single Chip]
00:01.0 PCI bridge: ALi Corporation AGP8X Controller
00:02.0 PCI bridge: ALi Corporation M5249 HTT to PCI Bridge
00:03.0 ISA bridge: ALi Corporation M1563 HyperTransport South Bridge (rev 70)
00:03.1 Bridge: ALi Corporation M7101 Power Management Controller [PMU]
00:04.0 Multimedia audio controller: ALi Corporation M5455 PCI AC-Link Controller Audio Device (rev 20)
00:0e.0 IDE interface: ALi Corporation M5229 IDE (rev c7)
00:0e.1 IDE interface: ALi Corporation ULi 5289 SATA (rev 10)
00:0f.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:0f.1 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:0f.2 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:0f.3 USB Controller: ALi Corporation USB 2.0 Controller (rev 01)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon X1650 Series (rev 9a)
01:00.1 Display controller: ATI Technologies Inc Radeon X1650 Series (Secondary) (rev 9a)
02:07.0 Multimedia audio controller: Creative Labs SB Audigy LS
02:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0
 
LVL 5

Expert Comment

by:ping_it
ID: 24123464
No DHCPOFFERS received

It means that it couldn't receive any IP address, because nobody answered to the request.

Please make sure that the DHCP server is working fine. You can try two things.

To connect it directly to the ISP -> your ISP in theory works fine and gives you an IP address.

Or you can try to check the configuration on the linksys, but the first option would be the best for troubleshooting.
0
 
LVL 1

Author Comment

by:elorc
ID: 24123521
I tried it connected directly to the cable modem, it still doesn't work. It still does the "No DHCPOFFERS received." I was searching around on Google a bit and I was reading some things that seem to suggest that there is a problem with the drivers used for the Realtek ethernet controllers (which is the one that I have): http://ubuntuforums.org/archive/index.php/t-522728.html

The problem I'm seeing here is that the link he refers to as his solution doesn't work, so I'm not sure what to do to fix this.
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24123557
it's because the router won't act as a dhcp server... maybe you need to configure it?
0
 
LVL 1

Author Comment

by:elorc
ID: 24123579
ai_ja_nai: It's not the router. Again, I've tried all of this connected directly to the cable modem as well. The router _is_ configured for DHCP, and is assigning addresses correctly to every other device attached to it.
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24123582
Ohh... I am afraid that is the problem :( I hate those problems...

Like ATI drivers in Linux... always problems... You can try to see whether there are updated drivers on the Realtek website, but... don't know.

I did my best to help you... anyway if you resolve it, let me know, I am curious.

P.s. you can do something else... if you have, try to put another NIC -> would be a nice test
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24123583
ai_ja_nai:he even tried to connect it directly to the ISP - no go
0
 
LVL 1

Author Comment

by:elorc
ID: 24123712
Well failing any luck getting this thing to work (really disappointed with Ubuntu if they don't properly support Realtek 8139, which I believe is a pretty common controller...), I guess I'll blow $20 on a D-Link DFE-530TX+ from Best Buy.
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24123723
You are right...
anyway before buying sth I suggest to contact somebody who knows well what is supported, otherwise u risk to buy something that is not supported as well.
0
 
LVL 1

Author Comment

by:elorc
ID: 24123752
On a few of the Realtek posts I read, it seems like the DFE-530TX is a recommended card. I guess if it doesn't work I can take it back and try another one. I'm sure Best Buy has several cards to pick from.

0
 
LVL 5

Accepted Solution

by:
ping_it earned 500 total points
ID: 24123767
Or maybe, just to give a try (because we are still not 100% sure that it's the NIC) you can get from another PC, or from a friend a NIC, u mount it on your ubuntu and you try... some minutes and u see. If it works, then buy a new one ..  if it doesn't work... hehe or is also not supported or the problem is somewhere else
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24123909
Uhm, have you unlocked the proprietary drivers, in Ubuntu, if present?
0
 
LVL 1

Author Comment

by:elorc
ID: 24123935
I don't believe so. How can I do that?
0
 
LVL 1

Author Comment

by:elorc
ID: 24124425
Problem solved: I bought a Linksys LNE100TX 10/100 ethernet adapter. I shut the machine down, installed the card, and disabled the on-board Realtek NIC. Even though the Realtek works fine on apparently every other OS, this will have to do because I'm just tired of fighting with Ubuntu at this point. :)

Thank you for all of your help ping, you put a lot of effort into helping me resolve this with the Realtek and I really do appreciate that!
0
 
LVL 1

Author Closing Comment

by:elorc
ID: 31569141
The solution you provided _should_ have worked, but for some reason Ubuntu wasn't having any of it. Oh well. Like I said, I really appreciate your help. You rock. Thank you!
0
 
LVL 5

Expert Comment

by:ping_it
ID: 24124848
I am happy for that. If you need anything else, please tell me.

Ciao
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now