Network interface names by using udev rules: Difference between revisions
Jump to navigation
Jump to search
Created page with "* Check current interfaces names and mac addresses: <code># ip link show</code> *Find the device type id of the interface (for example, <code>eth0</code>): <pre> # cat /sys/class/net/eth0/type 1</pre> * <code>/etc/udev/rules.d/70-persistent-net.rules</code>: <pre> SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="11:22:33:44:55:ab",ATTR{type}=="1",NAME="eth0" ... </pre> * Regenerate the initrd" |
No edit summary |
||
| Line 14: | Line 14: | ||
* Regenerate the initrd | * Regenerate the initrd | ||
[[Category: Linux]] | |||
Latest revision as of 12:23, 2 January 2024
- Check current interfaces names and mac addresses:
# ip link show
- Find the device type id of the interface (for example,
eth0):
# cat /sys/class/net/eth0/type 1
/etc/udev/rules.d/70-persistent-net.rules:
SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="11:22:33:44:55:ab",ATTR{type}=="1",NAME="eth0"
...
- Regenerate the initrd