find the ID_USB_SERIAL_SHORT of the USB NIC:

root@pve03:~# udevadm info /sys/class/net/enx803f5dfb4b73 | grep ID_USB_SERIAL_SHORT
E: ID_USB_SERIAL_SHORT=4013000001


grab mac address

root@pve03:~# ip a | grep -A 1  enx803f5dfb4b73
3: enx803f5dfb4b73: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 80:3f:5d:fb:4b:73 brd ff:ff:ff:ff:ff:ff
    inet 172.16.35.203/24 scope global enx803f5dfb4b73
       valid_lft forever preferred_lft forever

Create a new File with the below content

cat /etc/systemd/network/10-vusb2.link
[Match]
Property=ID_USB_SERIAL_SHORT=4013000001
[Link]
Name=enx7eth2
MACAddress=80:3f:5d:fb:4b:73

Leave a Reply

Your email address will not be published. Required fields are marked *