Skip to content

Instantly share code, notes, and snippets.

@bo33b
Created March 12, 2024 01:59
Show Gist options
  • Save bo33b/9327ad5cc35fc50c782bf1561ef79ba3 to your computer and use it in GitHub Desktop.
Save bo33b/9327ad5cc35fc50c782bf1561ef79ba3 to your computer and use it in GitHub Desktop.
RasPi statically link network interface names to mac
# Create file /etc/udev/rules.d/72-static-name.rules
# Add these, changing the mac addresses accordingly.
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:01", KERNEL=="e*",NAME="eth1"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:02", KERNEL=="e*",NAME="eth2"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:03", KERNEL=="e*",NAME="eth3"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:04", KERNEL=="e*",NAME="eth4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment