Cannot find eth0 Device
It appears that my trusty debian based server died over the weekend, my motherboard would not do a post at all. After lots of trial and error swapping hardware in and out, I decided it was time to build a new one. Luckily for me I had some spare hardware waiting to be utilised. This is how my first server was born, never throw away old hardware it may come in handy one day!
The new system I just happen to have lying around was made up of an Abit an7 board and an AMD Semprom 2400+. I used the ram out my old machine, along side the existing ram in the new machine. Banking on the hard drives not being corrupt and not being the reason that my old server had died I also attached these to the new machine.
I attached a keyboard and a monitor and powered it up. Hey presto it booted up in no time at all. This might not sound like much of an achievement, but try moving a hard drive with Windows installed on it, into a brand new machine with totally different hardware, go on I dare you!
So I was feeling pleased with myself, having spent only around 30-45 mins without my trusty old server, and I opened putty on my laptop and tried to ssh into my new box. What was wrong? I still couldn’t connect to my server.
Executing the ifconfig command only came back with the loopback interface (lo). I couldn’t understand what was happening, but then I realised I was using a different network adapter, as they are both on board Lan controllers and therefore have different mac addresses. Linux being the clever OS that it is does not want to override your settings for device eth0, just in case you are using two interface cards and would like to use the other one at a later date.
If you execute the following:
ifconfig -a
you should get something like this:
eth1 Link encap:Ethernet HWaddr 00:50:8D:EB:89:7C
inet addr:192.168.0.50 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:8dff:feeb:897c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3258 errors:0 dropped:0 overruns:0 frame:0
TX packets:2780 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4002714 (3.8 MiB) TX bytes:303357 (296.2 KiB)
Interrupt:177 Base address:0xc000
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
This is showing you that your new network card is actually mapping to device eth1. To get your network up and running quickly simply open /etc/network/interfaces or your equivalent if you are not using debian, and replace occurrances of eth0 with eth1 or whatever device ifconfig reported. Then execute the following:
sudo /etc/init.d/networking restart
This will restart the networking daemon and set up eth1 as your new device. If you want to revert it back to eth0, I believe you can remap the mac address of the new card by creating or editing /etc/iftab, but this will suffice for me.





March 6th, 2010 at 2:10 pm
Does my mac adresse change if I upgrade my computer with some other hardware? For example change the graphic card?
March 7th, 2010 at 9:51 am
No, your mac address is the address of your lan card, so it will only change if you upgrade your network card.
September 14th, 2010 at 7:28 pm
Interesująca witryna i dobre artykuły. Gratuluje ;]
May 24th, 2011 at 12:48 am
I’m very pleased to find this blog. I want to say thank you for your effort in creating this amazing read! I certainly enjoyed it and I have you book marked to look at new issues you post.
July 15th, 2011 at 10:23 pm
Thank you, I have been searching for info about this subject for ages and yours is the best I’ve discovered so far.
August 7th, 2011 at 3:30 am
Fantastic Article! Your tips as well as insights happen to be easily worthwhile seeing. You really gave me valuable material. Thank you for posting it!
August 8th, 2011 at 8:15 am
Bardzo dobrze napisane. very very good.
August 21st, 2011 at 4:18 am
Greetings, Making it very say thank you to the exact autor within the websites. Each is clear not to mention good. The picture is likewise dramatic to do. Could you amuse phon me personally what is the theme will you employ? warm regards over again and therefore carry on with the truly great occupation.
September 9th, 2011 at 12:03 am
Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between usability and visual appeal. I must say that you’ve done a excellent job with this. In addition, the blog loads very quick for me on Safari. Superb Blog!