-   Linux - Hardware (
-   -   Network card does not work properly (

franchukrom 11-17-2012 08:43 AM

Network card does not work properly
Hello, All.

I have a very strange problem with my network card. Often when I boot Linux I get this problem:


in infinite loop. It can't get DHCPACK and retries, retries, retries ...

But I found the way how to make it connect: reboot to Windows, wait Windows to connect to this network, then reboot to Linux. And after this Linux easily connects to this network. Why?


auto eth0
iface eth0 inet dhcp
hwaddress ether 00:2b:cb:dc:ff:bb

(I need to fake MAC, and this is root of the evil)

My system: Debian GNU/Linux Wheezy.

uname -a: Linux franchuk-r 3.6.2-vanillamy #1 SMP Thu Nov 8 17:57:16 EET 2012 x86_64 GNU/Linux (I have the same problem with Debian's 3.2 kernel and with Liquorix kernel).

My network card: 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)

Driver: r8169

// Sorry for my bad English.

hamlindsza 11-18-2012 08:11 AM


I guess your DHCP server assigns you an specific IP address based on your MAC.

The key is to change your MAC address before eth0 comes up. To do this, create a file in /etc/network/if-pre-up.d/ with the following contents:

#! /bin/sh
ifconfig eth0 hw ether 00:2b:cb:dc:ff:bb
Don't forget to give execute permissions to the file by running chmod +x /etc/network/if-pre-up.d/

Hope this helps :)

franchukrom 12-09-2012 01:13 AM

Thanks, that helped.

All times are GMT -5. The time now is 12:42 PM.