Wednesday, October 14, 2020

net-iface.name Human Network Interfaces Names or custom

SOLUTION:
Step 1: Disable the default Firmware inherited names.
Edit your /etc/default/grub changing the line from
-----
GRUB_CMDLINE_LINUX=""
to
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
-----
and, finally run as root:

sudo update-grub

and reboot your system.
sudo reboot

Create Custom interfaces names
Step 2: Create the persistent file /etc/udev/rules.d/70-persistent-net.rules as root and fill them.
sudo gedit /etc/udev/rules.d/70-persistent-net.rules

Example:
# 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 lan Device
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="XX:yy:XX:yy:XX:yy", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="ethX"

# PCI device Wlan Device
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="XX:yy:XX:yy:XX:yy", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="wlanX"

(Use the interfaces MAC Address to refer to the interface that you want to rename, and change the 'X' interface name values as you want)

Save changes and reboot.
sudo reboot

Enjoy!

No comments:

Post a Comment

Thank you for your comment. Will try to react as soon as possible.

Regards,

Networ King