LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-04-2014, 01:26 PM   #1
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 268

Rep: Reputation: 25
r8169: Fake MAC in Windows = No connection in linux


Hello, I think I found a bug with the r8169 driver. I'm posting this in case someone finds it useful.

<tl;dr> If you don't want to read all this please skip down to the bold text.
I have a PC with two operating systems (Windows 7, XUbuntu), and two hard drives - one for each OS. Rather than dual-booting I prefer to use the BIOS boot menu to choose which OS to run. I've recently had to format my Windows 7 HDD and reinstall the OS. My PC has a Realtek Gigabit Ethernet NIC based on the R8111e chipset, and the linux kernel module for this NIC is r8169. Recently I noticed that my Linux could suddenly not connect any more. The DHCP server would try to get an address, but it would eventually fail and repeat the cycle endlessly. I pinged the NIC, and it worked fine. I pinged the gateway, but there was no reply. It was as if my NIC just died. But this only happened in Linux. Once I rebooted to Windows, the connection worked fine. So I decided to test it a bit.

I powered on the PC and booted into linux - connection worked fine again.
I rebooted into linux without powering off the PC - connection worked fine.
I booted into windows, then rebooted into linux - No connection
I booted into linux - connection fine, rebooted to windows, and back to linux again - No connection

It would seem that every time I booted/rebooted into Windows, and then rebooted to linux again, my PC would not get any connectivity. It is as if Windows was doing something to the NIC itself. I was able to regain connectivity in Linux by doing:

# rmmod r8169
# modprobe r8169

That restored the connection, and I could once again connect to the internet. So what the hell did windows do? I mean this wasn't always happening to me, it only started recently. This has been bugging me for a while, but I've finally located the problem. I recalled that I wanted to change the NIC MAC address in the device manager on Windows. So I went back to Windows, disabled it, and rebooted back to Linux. Voila, everything worked again!


</tl;dr> - The solution / workaround
The problem is that changing the Ethernet card MAC address (Network address) in Windows 7 device manager causes the r8169 module not to work in linux upon reboot. A rmmod/modprobe will temporarily solve the problem, but the fake MAC has to be removed from Windows in order to regain full connectivity.
 
Old 07-04-2014, 08:28 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,056

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
Maybe not fake at all. Maybe it does burn/copy a new mac in the card? Then it might fail under an installed linux. Guess you could try to change in windows and reboot to some few live media's.
 
Old 07-13-2014, 02:28 AM   #3
trieudoahong
LQ Newbie
 
Registered: May 2010
Location: California
Distribution: RHEL
Posts: 8

Rep: Reputation: 3
What MAC address of the NIC is being showed up when running ifconfig without your workaround? Is it the manufacture burned one or the fake one?

Last edited by trieudoahong; 07-13-2014 at 02:30 AM.
 
  


Reply

Tags
r8169 fake mac


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] adding a fake MAC address Skaperen Linux - Networking 13 10-11-2011 01:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration