User Tools

Site Tools


operating_systems:linux:debian:interface_name

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
operating_systems:linux:debian:interface_name [2017/11/07 07:29] kroduitoperating_systems:linux:debian:interface_name [2022/02/01 13:34] (current) ateixeira
Line 65: Line 65:
 If i comment the lan4 line in udev rules, lan4 (eth4 physical) become eth2, but lan2 stay lan2 and eth4 physical simply doesn't work because /etc/network/interfaces doesn't content ethX declarations. If i comment the lan4 line in udev rules, lan4 (eth4 physical) become eth2, but lan2 stay lan2 and eth4 physical simply doesn't work because /etc/network/interfaces doesn't content ethX declarations.
  
 + ====== Changing raspbian 9.9 (stretch) interface name ======
 +[[https://askubuntu.com/questions/947519/ubuntu-17-04-how-to-rename-a-usb-network-interface-based-on-path-not-based-on|source]]
  
 +found Path and MAC address
 +<code>
 +ifconfig
 +udevadm info -e | grep -A 5 -B 18 "INTERFACE=eth"
 +</code>
 +
 +add files like 1x-lanx.link in /etc/systemd/network/ with rules like :
 +<code>
 +[Match]
 +Path=<id_path>
 +MACAddress=00:e0:4c:36:01:6b
 +
 +[Link]
 +Name=lan0
 +</code>
 +
 +
 +<note important>To get the id_path type: udevadm info /sys/class/net/<network interface name></note>
 +
 +add file 99-default.link in /etc/systemd/network/ with rules like :
 +<code>
 +[Link]
 +NamePolicy=kernel database onboard slot path
 +MACAddressPolicy=persistent
 +</code>
 +
 +to permit user-defined name of USB network interfaces, it's necessary to enable the 80-net-setup-link.rules rule with this command : 
 +<code>
 +sudo ln -s /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules
 +</code>
 +
 + ====== Changing debian 11.1 (bullseye) interface name ======
 +
 +found ID_PATH and MAC address
 +<code>
 +udevadm info -e | grep -A 5 -B 18 "INTERFACE=<interface name>"
 +ip a
 +</code>
 +
 +edit files like 1x-lanx.link in /etc/systemd/network/ with rules like :
 +<code>
 +[Match]
 +Path=<id_path>
 +MACAddress=00:e0:4c:36:01:6b
 +
 +[Link]
 +Name=lan0
 +</code>
 +
 +make sure file 99-default.link is present in /etc/systemd/network/ with rules like :
 +<code>
 +[Link]
 +NamePolicy=kernel database onboard slot path
 +MACAddressPolicy=persistent
 +</code>
 +
 +to permit user-defined name of USB network interfaces, it's necessary to enable the 80-net-setup-link.rules rule with this command : 
 +<code>
 +sudo ln -s /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules
 +</code>
operating_systems/linux/debian/interface_name.1510039791.txt.gz · Last modified: 2017/11/07 07:29 by kroduit