Saturday, May 24, 2008

Network Connection problem

Well, I did a dist-upgrade to Dapper about two months ago (or whenever Dapper finally came out) and my NIC card wouldn't come up. There were absolutely zero configuration differences between the two installations, the only difference was the kernel (in fact, dropping back to the Breezy kernel worked fine). However, I was getting sick of the newer kernels not working, so today I dug in and figure out how to fix the problem.

The solution was not cool.

First, the diagnosis was that ifconfig would not show eth0 at all. lspci and dmesg reported no errors, really, and obviously modprobe was useless. ifup reported some strange errors like:

SIOCSIFADDR: No such device eth0
eth0: ERROR while getting interface flags: No such device

Google didn't find anything useful on any search, until I came across this dude's blog who was getting an identical error in a totally different situation.

http://www.pletscher.org/blog/?p=29

WOOHOO!

I ran 'ifconfig -a' and it found an eth1 for some reason (though 'ifup eth1' also had no effect) which had a MAC address in it. I hopped into '/etc/iftab', changed the MAC address on eth0 to the MAC that was attached to eth1 in ifconfig and rebooted. VOILA! Network up and running!

Hope this helps someone.