0

Related to:

The problem with the second provided solution is that some USB3 NICs share for some weird reasons the same ATTR{serial} so my last resort in order to rename this interfaces is the usb path.

Because this attached NICs are always in the same position and place on a USB3 hub I tough that could be useful use the usb path to identify and rename the interfaces.

lsusb says:

...
Bus 002 Device 006: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 005: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 010: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 009: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 008: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 007: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
...

Sadly as always the things that should be intuitive doesn't work as the way expected.

I found that my interfaces are all on bus 2 and have various devnum from 5 to 10

So I tried with commands like this:

SUBSYSTEM="net", ACTION="add", DRIVERS="?*", ATTRS{busnum}="2", ATTRS{devnum}="5", ATTR{dev_id}="0x0", ATTR{type}="1", KERNEL="eth*", NAME="lan1"

But it doesn't work.

Also with this using the KERNELS path on a device that says to be in KERNELS="2-3:1.0":

SUBSYSTEM="net", ACTION="add", DRIVERS="?*", KERNELS="2-3:1.0", ATTR{dev_id}="0x0", ATTR{type}="1", KERNEL="eth*", NAME="lan1"

But nothing, the interfaces are not renamed...

Just why this rules doesn't work ?

1
  • 1
    == is a comparison, = is an assignment. I don't know if it's enforced or not (so if actually the answer in the 2nd link is wrong or not), but that's what is documented Eg: do you want to "assign" net to SUBSYSTEM or to check if it's the "net" subsystem? etc.
    – A.B
    Commented Apr 18 at 9:13

1 Answer 1

0

Found the problem, It was a syntax error as stated by @A.B basically I was using = instead of == that was used for assigning values instead of reading and comparing the content.

By using == as operator everything works fine.

1
  • Sadly if you have my same problem with this nic interfaces please check the definitive and working solution here that allows you to user original mac based address udev rules: unix.stackexchange.com/questions/774865 Commented Apr 21 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .