Find the answer to your Linux question:
Results 1 to 6 of 6
My MAC address has magically changed after unloading the old driver and loading a new driver. 1. I have installed a new driver on Linux. I did this because the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    Question New driver causes MAC-address to change


    My MAC address has magically changed after unloading the old driver and loading a new driver.

    1. I have installed a new driver on Linux. I did this because the old one would hang now and then, I downloaded a new from the internet. This one I did 'make' and configure, but did not correctly start it (did not know the right commands and so). Then I discovered that there was already another driver on the system with a similar name. So I decided to remove the old and use the new. The old was from /lib/modules/2.6.24-24-generic/kernel directory, while the new one came from /lib/modules/2.6.24-24-generic/ubuntu/wireless/

    2. The old driver was removed with:

    rmmod /lib/modules/2.6.24-24-generic/kernel/drivers/net/wireless/rtl8187.ko
    rmmod /lib/modules/2.6.24-24-generic/kernel/net/mac80211/mac80211.ko
    rmmod /lib/modules/2.6.24-24-generic/kernel/net/wireless/cfg80211.ko
    rmmod /lib/modules/2.6.24-24-generic/kernel/drivers/misc/eeprom_93cx6.ko

    3. The new driver was installed with:
    360 insmod /lib/modules/2.6.24-24-generic/ubuntu/wireless/rtl8187-usb/ieee80211/ieee80211_crypt-rtl.ko
    361 insmod /lib/modules/2.6.24-24-generic/ubuntu/wireless/rtl8187-usb/ieee80211/ieee80211_crypt_ccmp-rtl.ko
    362 insmod /lib/modules/2.6.24-24-generic/ubuntu/wireless/rtl8187-usb/ieee80211/ieee80211_crypt_tkip-rtl.ko
    363 insmod /lib/modules/2.6.24-24-generic/ubuntu/wireless/rtl8187-usb/ieee80211/ieee80211_crypt_wep-rtl.ko
    365 insmod /lib/modules/2.6.24-24-generic/ubuntu/wireless/rtl8187-usb/ieee80211/ieee80211-rtl.ko
    366 insmod /lib/modules/2.6.24-24-generic/ubuntu/wireless/rtl8187-usb/rtl8187/r8187.ko

    Note: some of this info comes from memory and I have first tried to install other drivers. I can have forgotten something....

    I notice that my MAC address has changed. Why? It is just one number higher. It was: 00:18:4d:fe:14:4d and is now 00:18:4d:fe:14:4e
    The LAN interface name in ifconfig changed from wlan0 to wlan1.
    It is Realtec USB stick.


    Question one: Why does this change in MAC address happen?
    Question two: Why is the name of the interface changed?
    Question three: What defines the name of the interface (beside that it can be done manually with ifconfig) when the system starts automatically?

    FYI: this command crashes the system: the keyboard hangs and gives an infinitive number of 'enter' even when I unplug the keyboard (press power button shuts graciously down though:
    ifconfig wlan1 hw ether 00:18:4d:fe:14:4d

    Version: Ubuntu 8.0.4 2.6.24-24-generic #1 SMP Wed Mar 25 12:16:54 UTC 2009 i686 GNU/Linux

    Output of dmesg:
    OLD
    Code:
    [   29.742590] input: Power Button (FF) as /devices/virtual/input/input4
    [   29.766486] ACPI: Power Button (FF) [PWRF]
    [   29.766584] input: Power Button (CM) as /devices/virtual/input/input5
    [   29.778611] agpgart: Detected an Intel 830M Chipset.
    [   29.778743] agpgart: Detected 8060K stolen memory.
    [   29.793459] agpgart: AGP aperture is 128M @ 0xf0000000
    [   29.806483] ACPI: Power Button (CM) [PBTN]
    [   30.026451] i810_smbus 0000:00:02.0: i810/i815 i2c device found.
    [   31.360717] ACPI: PCI Interrupt 0000:00:1f.5[B] -> GSI 17 (level, low) -> IRQ 21
    [   31.360758] PCI: Setting latency timer of device 0000:00:1f.5 to 64
    [   31.529329] phy0: Selected rate control algorithm 'simple'
    [   31.645743] phy0: hwaddr 00:18:4d:fe:14:4d, rtl8187 V1 + rtl8225z2
    [   31.645772] usbcore: registered new interface driver rtl8187
    [   31.696816] ieee80211_crypt: registered algorithm 'NULL'
    [   31.700436] ieee80211_crypt: registered algorithm 'WEP'
    [   31.704097] ieee80211_crypt: registered algorithm 'TKIP'
    [   31.707725] ieee80211_crypt: registered algorithm 'CCMP'
    [   31.757617] 
    [   31.757620] Linux kernel driver for RTL8187/RTL8187B based WLAN cards
    [   31.757623] Copyright (c) 2004-2005, Andrea Merello
    [   31.757625] rtl8187: Initializing module
    [   31.757627] rtl8187: Wireless extensions version 22
    [   31.757629] rtl8187: Initializing proc filesystem
    [   31.757649] sysfs: duplicate filename 'rtl8187' can not be created
    [   31.757652] WARNING: at /build/buildd/linux-2.6.24/fs/sysfs/dir.c:424 sysfs_add_one()
    [   31.757657] Pid: 3024, comm: modprobe Not tainted 2.6.24-24-generic #1
    [   31.757683]  [<c01d777f>] sysfs_add_one+0x9f/0xe0
    [   31.757710]  [<c01d7cb8>] create_dir+0x48/0x90
    [   31.757731]  [<c01d7d29>] sysfs_create_dir+0x29/0x50
    [   31.757738]  [<c021577f>] kobject_get+0xf/0x20
    [   31.757747]  [<c0215c43>] kobject_add+0x93/0x1b0
    [   31.757769]  [<c0215df1>] kobject_register+0x21/0x50
    [   31.757777]  [<c0282571>] bus_add_driver+0x71/0x1e0
    [   31.757802]  [<e008e24e>] usb_register_driver+0x8e/0x110 [usbcore]
    [   31.757835]  [<e0373954>] rtl8180_proc_module_init+0x24/0x30 [r8187]
    [   31.757855]  [<c01507e6>] sys_init_module+0x126/0x19c0
    [   31.757979]  [<c01043b2>] sysenter_past_esp+0x6b/0xa9
    [   31.758064]  =======================
    [   31.758069] kobject_add failed for rtl8187 with -EEXIST, don't try to register things with the same name in the same directory.
    [   31.758075] Pid: 3024, comm: modprobe Not tainted 2.6.24-24-generic #1
    [   31.758081]  [<c0215cc3>] kobject_add+0x113/0x1b0
    [   31.758103]  [<c0215df1>] kobject_register+0x21/0x50
    [   31.758112]  [<c0282571>] bus_add_driver+0x71/0x1e0
    [   31.758134]  [<e008e24e>] usb_register_driver+0x8e/0x110 [usbcore]
    [   31.758156]  [<e0373954>] rtl8180_proc_module_init+0x24/0x30 [r8187]
    [   31.758173]  [<c01507e6>] sys_init_module+0x126/0x19c0
    [   31.758293]  [<c01043b2>] sysenter_past_esp+0x6b/0xa9
    [   31.758330]  =======================
    [   31.758333] usbcore: error -17 registering interface 	driver rtl8187
    [   31.778199] intel8x0_measure_ac97_clock: measured 54164 usecs
    [   31.778203] intel8x0: clocking to 48000
    [   33.386183] lp0: using parport0 (interrupt-driven).
    [   33.495700] Adding 975200k swap on /dev/sda6.  Priority:-1 extents:1 across:975200k
    [   34.076906] EXT3 FS on sda5, internal journal
    [   35.045584] kjournald starting.  Commit interval 5 seconds
    [   35.045597] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
    [   35.045846] EXT3 FS on sda7, internal journal
    [   35.045852] EXT3-fs: mounted filesystem with ordered data mode.
    [   35.618838] ip_tables: (C) 2000-2006 Netfilter Core Team
    NEW
    Code:
    [   32.683849] input: Power Button (FF) as /devices/virtual/input/input4
    [   32.707735] ACPI: Power Button (FF) [PWRF]
    [   32.707832] input: Power Button (CM) as /devices/virtual/input/input5
    [   32.739830] ACPI: Power Button (CM) [PBTN]
    [   32.789179] agpgart: Detected an Intel 830M Chipset.
    [   32.789317] agpgart: Detected 8060K stolen memory.
    [   32.803937] agpgart: AGP aperture is 128M @ 0xf0000000
    [   33.021803] i810_smbus 0000:00:02.0: i810/i815 i2c device found.
    [   34.131348] ieee80211_crypt: registered algorithm 'NULL'
    [   34.134776] ieee80211_crypt: registered algorithm 'WEP'
    [   34.147610] ieee80211_crypt: registered algorithm 'TKIP'
    [   34.151126] ieee80211_crypt: registered algorithm 'CCMP'
    [   34.228395] 
    [   34.228398] Linux kernel driver for RTL8187/RTL8187B based WLAN cards
    [   34.228401] Copyright (c) 2004-2005, Andrea Merello
    [   34.228403] rtl8187: Initializing module
    [   34.228405] rtl8187: Wireless extensions version 22
    [   34.228407] rtl8187: Initializing proc filesystem
    [   34.257517] rf_chip:5
    [   34.286255] rtl8187: Card reports RF frontend Realtek 8225
    [   34.286262] rtl8187: WW:This driver has EXPERIMENTAL support for this chipset.
    [   34.286266] rtl8187: WW:use it with care and at your own risk and
    [   34.286269] rtl8187: WW:**PLEASE** REPORT SUCCESS/INSUCCESS TO Realtek
    [   35.433949] ACPI: PCI Interrupt 0000:00:1f.5[B] -> GSI 17 (level, low) -> IRQ 21
    [   35.433984] PCI: Setting latency timer of device 0000:00:1f.5 to 64
    [   35.855080] intel8x0_measure_ac97_clock: measured 55028 usecs
    [   35.855085] intel8x0: clocking to 48000
    [   35.901890] rtl8187: This seems a new V2 radio
    [   35.902418] rtl8187: Reported EEPROM chip is a 93c46 (1Kbit)
    [   36.036892] rtl8187: Card MAC address is 00:18:4d:fe:14:4e
    [   36.215537] rtl8187: PAPE from CONFIG2: 0
    [   36.238531] rtl8187: EEPROM Customer ID: FF
    [   36.238534] 
    [   36.238953] rtl8187: Driver probe completed
    [   36.238955] 
    [   36.238978] usbcore: registered new interface driver rtl8187
    [   36.239909] SetRFPowerState8185(): unknown RFChipID: 0x5!!!
    [   37.089592] udev: renamed network interface wlan0 to wlan1
    [   37.360920] lp0: using parport0 (interrupt-driven).
    [   37.470628] Adding 975200k swap on /dev/sda6.  Priority:-1 extents:1 across:975200k
    [   38.051305] EXT3 FS on sda5, internal journal
    [   39.479898] kjournald starting.  Commit interval 5 seconds
    [   39.479922] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
    [   39.480113] EXT3 FS on sda7, internal journal
    [   39.480116] EXT3-fs: recovery complete.
    [   39.480293] EXT3-fs: mounted filesystem with ordered data mode.
    [   39.926139] ip_tables: (C) 2000-2006 Netfilter Core Team
    (Question 4: I should save for another thread: why were there so many errors in the log and did the driver work anyway in the old situation?)

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,695
    In theory, the MAC address cannot be changed - it is burned into the device and is assigned such that no two ethernet adapters ANYWHERE will have the same MAC address. I note that it is only off in the last digit (4e vs 4d). It's conceivably possible that the card actually has 2 addresses assigned to it, so the next time it was installed it switched to the other one. Just a SWAG here, but the board could have been designed to provide, with additional transceivers, more than one port, so it would have multiple addresses burned into the chip or firmware.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    Exclamation

    I know that MACs are unique. That is why I want to know what is happening here. Even if a device is assigned multiple addresses, this is usually to be used for different functions, for example an AP that create multiple logical cells.

    However, that is not the case with this Netgear WG111v2 USB stick: i just use it as station. The only change is the driver. So, what is so different with the ubuntu wireless driver and the standard linux kernel driver?

    I found in /etc/udev/rules.d/70-persistent-net.rules:
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:18:4d:fe:14:4e", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

    I changed wlan1 in wlan0 and now the LAN number is wlan0 when I load the new driver. So, it is this file that defines the interface names.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,695
    Well, you might ask on the kernel.org site. The kernel boffins might be better able to say why changing the driver changed the MAC, because it shouldn't have. Maybe you found a bug?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9
    Thank you! I would like to ask on The Linux Kernel Archives, but I do not believe this site has any forums. Maybe I am not looking in the right place.
    Any suggestion?

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,695
    Quote Originally Posted by mvdberg112 View Post
    Thank you! I would like to ask on The Linux Kernel Archives, but I do not believe this site has any forums. Maybe I am not looking in the right place.
    Any suggestion?
    From The Linux Kernel Archives
    Reporting Linux Kernel bugs

    Please see Reporting bugs for the Linux kernel if you want to report a Linux kernel bug. Bug reports sent to the kernel.org administrators will be ignored.

    There is now a bugzilla setup at bugzilla.kernel.org. Currently this is for reporting kernel version 2.6 bugs only.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •