Home‎ > ‎Server config‎ > ‎

Raspberry Pi - creating fixed network device names

The predictable network device names feature of Raspi is a pain in the ass. Here's how to make them the way you want:

Create the file /etc/udev/rules.d/72-static-name.rules
Add these lines, replacing the mac addresses with the mac addresses of your interfaces.

Code: Select all

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",ATTR{address}=="00:c0:ca:96:d8:8b", KERNEL=="w*",NAME="wlan0"ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",ATTR{address}=="b8:27:eb:1e:56:52", KERNEL=="w*",NAME="wlan1"
Same can be done for ethx.