# eth0 wrong MAC after BIOS update (solved)

## i92guboj

Hello.

This has been bothering me for some months now. What I did in the past was to restore the old BIOS image and forget about the update for the time being.

Now I want to see if I can sort this out finally.

The box has an on-board NIC, and a regular PCI NIC. 

eth0 is the on-board NIC, the one that's not working right now (after the BIOS update). It's connected to the home switch. This NIC is the one that does NAT, meaning that the rest of my home network can't reach the internet until I fix this (or until I downgrade the BIOS revision again).

eth1 is the PCI NIC. It's connected to the DSL cable modem, so this box can reach the internet.

The nics as listed by lspci are these:

```
# lspci | grep -i net

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)

03:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
```

Both of them seem to be correctly picked up by my kernel:

```

[    9.587152] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded

[    9.587167] r8169 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

[    9.587194] r8169 0000:02:00.0: setting latency timer to 64

[    9.587230] r8169 0000:02:00.0: irq 41 for MSI/MSI-X

[    9.587558] r8169 0000:02:00.0: eth0: RTL8168d/8111d at 0xffffc9001017c000, ed:0b:00:00:e0:00, XID 083000c0 IRQ 41

[    9.606744] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded

[    9.606780] r8169 0000:03:07.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22

[    9.606821] r8169 0000:03:07.0: (unregistered net_device): no PCI Express capability

[    9.607843] r8169 0000:03:07.0: eth1: RTL8169sb/8110sb at 0xffffc900104ac800, 00:27:19:b1:1f:8c, XID 10000000 IRQ 22
```

But, after that, only eth1 comes up:

```
[   15.455673] r8169 0000:03:07.0: eth1: link down

[   15.455855] ADDRCONF(NETDEV_UP): eth1: link is not ready

[   17.630507] r8169 0000:03:07.0: eth1: link up

[   17.630688] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

```

After this I try to manually bring the interface up:

```
# LC_ALL=C /etc/init.d/net.eth0 start

 * Bringing up interface eth0

 *   192.168.0.1 ...

SIOCSIFADDR: File exists

SIOCSIFFLAGS: Cannot assign requested address                                                                                                                     [ !! ]

 * ERROR: net.eth0 failed to start
```

I tried removing the persisten net rules file under /etc/udev/rules.d, the file has been recreated with this contents, but everything seems to be the same.

```
# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x10ec:0x8168 (r8169)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ed:0b:00:00:e0:00", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8169 (r8169)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:27:19:b1:1f:8c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

```

Can anyone tell me where else to look into?

By the way, the MAC address for eth0 seems strange, doesn't it?

Thanks  :Smile: Last edited by i92guboj on Mon Jun 13, 2011 11:18 pm; edited 1 time in total

----------

## tomtom69

Hi,

the MAC address for eth0 seems invalid. It has bit 0 of the first byte set, meaning that this is a group address.

To figure out whether the BIOS update messed up the MAC: Are you able to boot another OS and verify the MAC address?

tom

----------

## jburns

See http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=2

Try adding the noop option in /etc/conf.d/net.

```
config_eth0=(

  "noop"

  "dhcp"

)
```

----------

## Anon-E-moose

If you google that mac addy you will find many have it show up.

This is one

http://vip.asus.com/forum/view.aspx?id=20080819140738109&board_id=1&model=P5GC-MX&page=1&SLanguage=en-us

they got by, by setting the mac address to a valid one.

It almost appears (from the many google hits) that it's a default non-working mac address.

I "assume" that the real mac got lost and for whatever reason it puts this (default?) one down.

----------

## i92guboj

 *tomtom69 wrote:*   

> Hi,
> 
> the MAC address for eth0 seems invalid. It has bit 0 of the first byte set, meaning that this is a group address.
> 
> To figure out whether the BIOS update messed up the MAC: Are you able to boot another OS and verify the MAC address?
> ...

 

I don't have any other available OS. I will boot a couple of linux livecds (or a couple dozen), but I suspect they will probably show the same MAC.

This makes some sense because, after all, it's an integrated NIC. The BIOS doesn't seem to show any relevant option (to change the MAC or something like that).

----------

## i92guboj

 *Anon-E-moose wrote:*   

> If you google that mac addy you will find many have it show up.
> 
> This is one
> 
> http://vip.asus.com/forum/view.aspx?id=20080819140738109&board_id=1&model=P5GC-MX&page=1&SLanguage=en-us
> ...

 

Right. So, the MAC is broken (I guess it's a bug in the BIOS).

I used ifconfig to change it, then used ifconfig again to bring up eth0. It seems right, though the network still doesn't work. 

dmesg, however, shows something that looks interesting when I bringh eth0 up manually:

```
[  104.642352] r8169 0000:02:00.0: eth0: unable to load firmware patch rtl_nic/rtl8168d-2.fw (-2)

[  104.649352] r8169 0000:02:00.0: eth0: link down

[  104.649371] r8169 0000:02:00.0: eth0: link down

[  104.649575] ADDRCONF(NETDEV_UP): eth0: link is not ready

[  106.284248] r8169 0000:02:00.0: eth0: link up

[  106.284797] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[  116.643352] eth0: no IPv6 routers present
```

I'll keep trying.

----------

## i92guboj

Ok, I have some progress.

I uninstalled radeon-ucode and installed linux-firmware. The message about the firmware doesn't appear anymore. However, the net.eth0 service fails to start. It says:

```
# LC_ALL=C /etc/init.d/net.eth0 restart

 * Bringing up interface eth0

 *   192.168.0.1 ...

SIOCSIFADDR: File exists

SIOCSIFFLAGS: Cannot assign requested address                                                                                                                     [ !! ]

 * ERROR: net.eth0 failed to start
```

So, I proceed manually:

```
# ifconfig eth0 hw ether 00:80:48:BA:d1:30

# ifconfig eth0 up

# ifconfig

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:80:48:ba:d1:30  

          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::280:48ff:feba:d130/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:88 errors:0 dropped:0 overruns:0 frame:0

          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:12272 (11.9 KiB)  TX bytes:468 (468.0 B)

          Interrupt:41 Base address:0xa000 

eth1      Link encap:Ethernet  HWaddr 00:27:19:b1:1f:8c  

          inet addr:212.231.245.99  Bcast:212.231.245.255  Mask:255.255.254.0

          inet6 addr: fe80::227:19ff:feb1:1f8c/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:18450 errors:0 dropped:0 overruns:0 frame:0

          TX packets:3016 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:2154548 (2.0 MiB)  TX bytes:434888 (424.6 KiB)

          Interrupt:22 Base address:0xc800 

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:8 errors:0 dropped:0 overruns:0 frame:0

          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:400 (400.0 B)  TX bytes:400 (400.0 B)

```

After this, I can start dnsmasq manually, and it will receive queries from other machines in my network, so, the thing seems to be working, manually, that is.

But I have no idea on how to -properly- fix the problem. I could always script this in the local service, but that's not a fix. So, besides downgrading my BIOS, do you have any idea on how to proceed?

By the way: thanks everyone for the input, it was really helpful. All of it  :Smile: 

----------

## Anon-E-moose

A few people that seem to  have problems with eth* coming up properly have added

```
rc_depend_strict="YES"
```

to /etc/rc.conf (it's normally commented out)

I have no idea why it works for some or what it really does (the documentation on openrc sucks)

----------

## i92guboj

Well, it was a conflict with the previous command (the ip was taken so...).

What I finally did was to assign a new MAC to the interface using /etc/conf.d/net, this way:

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

mac_eth0=( "00:80:48:ba:d1:30" )

config_eth1=( "dhcp" )

config_eth0=( "192.168.0.1" )

```

Rebooted, and it all works now.

To sum up: a BIOS upgrade broke the firmware in the ROM of my onboard NIC, turning its MAC to ed:0b:00:00:e0:00. It seems to be a common problem for some ASUS boards, so watch out if you own one and you intend to update your BIOS. So, I have to change that MAC before the card will work again. It seems to be working right now without any problem, and I can finally enjoy my updated BIOS. Let's see if it solves a random issue I am having with pendrives and kernel oooops, but that's a different story.

Thank you ALL. Case closed   :Very Happy: 

----------

