PROBLEM - Interface name changes after sleep on Macbook Pro

Published: by

  • Categories:

Strangely, broadcom-wl driver by defaults names the wireless card as eth1 (assuming I already had eth0 running).

At first, I thought that I could do with it. But, later when I put my mbp to sleep, after resuming the interface names got swapped which was really annoying. This stopped my network meter in conky.

To solve the problem, use udev rules. Primary job of udev is to manage device nodes.

Create a file /etc/udev/rules.d/10-network.rules with contents

SUBSYSTEM=="net", ATTR{address}=="mac-addr1", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="mac-addr2", NAME="wlan0"

Make sure that you have mac-addresses written in lower case.