I've noticed that my Ethernet port works fine once, but after it's disconnected and i connect to a wireless network and I go and try to plug the Ethernet port back in, it doesn't work until I reboot. Why is this?!
Also, the lights light up but it's like the Ubuntu doesn't see it. Is there a way to reboot the Ethernet port programmaticly through Terminal? I've also tried to delete and readd Auto Ethernet through the Network Preferences.
I have a Lenovo ThinkPad L512 with Ubuntu 10.04
==UPDATE==
I did the first step Maco said to do and here is what I got:
oscargodson@ubuntu:~$ sudo service network-manager stop
[sudo] password for oscargodson:
network-manager stop/waiting
oscargodson@ubuntu:~$ sudo ifconfig eth0 up
SIOCSIFFLAGS: Cannot allocate memory
oscargodson@ubuntu:~$ sudo dhclient eth0
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
SIOCSIFFLAGS: Cannot allocate memory
SIOCSIFFLAGS: Cannot allocate memory
Listening on LPF/eth0/60:eb:69:02:50:f0
Sending on LPF/eth0/60:eb:69:02:50:f0
Sending on Socket/fallback
receive_packet failed on eth0: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
send_packet: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
send_packet: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
send_packet: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
send_packet: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
send_packet: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
send_packet: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
send_packet: Network is down
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
I've tried everything Maco suggested and finally figured out my memory isn't low although I keep getting a SIOCIFFLAGS: Cannot allocate memory error. I have over 1GB of RAM free as we speak.
I found this page: http://www.linuxquestions.org/questions/linux-newbie-8/weird-ethernet-problem-838220/
And did what the person there said which was:
lspci| grep -i ethernet
dmesg | grep -i ethernet
And it gave me some output and the last command gave me:
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
I then tried Maco's stuff again and i didn't get the error anymore, however, the Ethernet still doesn't connect although now it doesn't give me the memory allocation error.
Sounds like bug. Lets dig in.
First, stop Network Manager:
sudo service network-manager stop
Then, plug in the cable and bring up the interface
sudo ifconfig eth0 up
and tell it to ask for a new dhcp leasesudo dhclient eth0
(I'm guessing it's eth0, if not use the right name)Did it work? If so, file a bug on Network Manager:
ubuntu-bug -p network-manager
If not, try reloading the network driver. This should simulate a reboot to the ethernet port. To find out your driver, look in /etc/udev/rules.d/70-persistent-net.rules You'll see some bits like:
Finding the one that matches your interface's name, look at what's in the parentheses where mine says r8169. That's your module's name.
(replacing r8169 with your module's name) Try the dhclient step again. If that worked, I suspect it's a kernel bug.
ubuntu-bug -p linux
I'm getting the same problem. Wireless works on boot provided router is switched on beforehand. If its not then I have to go through the process of setting up a network again. Wired connection refuses to work at all with the ifconfig: SIOCSIFFLAGS: Cannot allocate memory coming up. N.B. This is using BrowserLinux (based on Puppy Linux)