Can't get an IP address
Solution 1
The first thing to try is to make sure you have link. You can check this using either
# ethtool eth0
or
# mii-tool eth0
Look for a line about Link Detected. If it says no, then you have a problem with your network card, network cable or switch.
I wrote a guide to troubleshooting network problems that you might find useful.
Solution 2
have you tried a different network cable?
Solution 3
Set a static ip adress in /etc/network/interfaces
Something like this, change it to your network config
# The primary network interface auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.5
Then reboot router or other end of your network (computer - router/modem).
Now see what happens. Of still no succes, see if you can set iface eth0 inet DHCP instead of the above...
Related videos on Youtube
Alex
I'm a Distinguished Engineer at Robinhood. I used to be the Tech Lead of Developer Productivity at Stripe where I built Sorbet. Before that I was the CTO and cofounder at Trimian. Before that I was a Software Engineer at Facebook on HHVM and the Open Graph. Before that I was the Tech Lead for Yahoo! SearchMonkey. See my homepage for more.
Updated on September 17, 2022Comments
-
Alex almost 2 years
I'm running Ubuntu 9.04.
I have an onboard network card. The computer usually boots perfectly, but today, I don't have an IP address. The light is on, on the network card as well as the switch. Other computers work in the switch and I tried other ports to no avail.
# sudo ifconfig eth0 up SIOCSIFFFLAGS: Resource temporarily unavailable # sudo dhclient ... some messages ... receive_packet failed on eth0: Network is down
Driver is
e100
. I triedmodprobe eepro100
, but still same problem.Update: Putting in another network card didn't help! Could it be some sort of IRQ conflict?
-
mas almost 15 yearsAre the the card's IP settings configured statically or dynamically (e.g. DHCP). If the latter, is the DHCP server up and configured and able to service the request from the client (e.g. spare IP addresses, MAC address table entry correct (if used) &c)?
-
RateControl almost 15 years
lspci
command should so your card's make and model -
Alex almost 15 yearsDHCP. And other computers on the network are getting IPs fine.
dhclient
won't even get the packets out since the interface can't come up.
-
-
Alex almost 15 yearsLink Detected : No. :(. Did something die in the motherboard to-do with networking?
-
John Gardeniers almost 15 yearsWouldn't be the first time. Disable the onboard card and plug in another one.