FreeBSD mixes names of similar USB to ethernet adapters

Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I have two Asix USB to ethernet adapters. The FreeBSD determines those as ue1 and ue2 adapters.
The problem is, that on reboot, sometimes the interface ue1 become ue2 and viceversa, which pretty much screws my network configuration.
The both adapters have the very similar MAC, and might be the issue when system tries to recognize it.
On the Linux systems, I previously sorted this out by setting static udev rules by adapters mac address.
How I can achieve the similar in Freebsd? I know it is related to devd but I'm not sure how to manage it, so the adapters get 'static' name.
usbconfig
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
usbconfig -d ugen0.5 dump_device_desc
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000114>
bNumConfigurations = 0x0001
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000013>
bNumConfigurations = 0x0001
freebsd udev ifconfig usb-device
add a comment |Â
up vote
4
down vote
favorite
I have two Asix USB to ethernet adapters. The FreeBSD determines those as ue1 and ue2 adapters.
The problem is, that on reboot, sometimes the interface ue1 become ue2 and viceversa, which pretty much screws my network configuration.
The both adapters have the very similar MAC, and might be the issue when system tries to recognize it.
On the Linux systems, I previously sorted this out by setting static udev rules by adapters mac address.
How I can achieve the similar in Freebsd? I know it is related to devd but I'm not sure how to manage it, so the adapters get 'static' name.
usbconfig
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
usbconfig -d ugen0.5 dump_device_desc
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000114>
bNumConfigurations = 0x0001
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000013>
bNumConfigurations = 0x0001
freebsd udev ifconfig usb-device
1
I don't know the answer to your question, but it isn't the similarity of the MAC addresses that causes the issue. It is the fact that are the same "kind" of device (ue) coupled with the fact that the USB probe isn't guaranteed to see the devices in the same order
â Fox
Jan 16 at 8:03
That was my blind guess. And yes, you are correct.
â fugitive
Jan 16 at 11:14
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I have two Asix USB to ethernet adapters. The FreeBSD determines those as ue1 and ue2 adapters.
The problem is, that on reboot, sometimes the interface ue1 become ue2 and viceversa, which pretty much screws my network configuration.
The both adapters have the very similar MAC, and might be the issue when system tries to recognize it.
On the Linux systems, I previously sorted this out by setting static udev rules by adapters mac address.
How I can achieve the similar in Freebsd? I know it is related to devd but I'm not sure how to manage it, so the adapters get 'static' name.
usbconfig
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
usbconfig -d ugen0.5 dump_device_desc
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000114>
bNumConfigurations = 0x0001
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000013>
bNumConfigurations = 0x0001
freebsd udev ifconfig usb-device
I have two Asix USB to ethernet adapters. The FreeBSD determines those as ue1 and ue2 adapters.
The problem is, that on reboot, sometimes the interface ue1 become ue2 and viceversa, which pretty much screws my network configuration.
The both adapters have the very similar MAC, and might be the issue when system tries to recognize it.
On the Linux systems, I previously sorted this out by setting static udev rules by adapters mac address.
How I can achieve the similar in Freebsd? I know it is related to devd but I'm not sure how to manage it, so the adapters get 'static' name.
usbconfig
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
usbconfig -d ugen0.5 dump_device_desc
ugen0.5: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000114>
bNumConfigurations = 0x0001
ugen0.4: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001 <ASIX Elec. Corp.>
iProduct = 0x0002 <AX88179>
iSerialNumber = 0x0003 <00000000000013>
bNumConfigurations = 0x0001
freebsd udev ifconfig usb-device
asked Jan 15 at 14:26
fugitive
710418
710418
1
I don't know the answer to your question, but it isn't the similarity of the MAC addresses that causes the issue. It is the fact that are the same "kind" of device (ue) coupled with the fact that the USB probe isn't guaranteed to see the devices in the same order
â Fox
Jan 16 at 8:03
That was my blind guess. And yes, you are correct.
â fugitive
Jan 16 at 11:14
add a comment |Â
1
I don't know the answer to your question, but it isn't the similarity of the MAC addresses that causes the issue. It is the fact that are the same "kind" of device (ue) coupled with the fact that the USB probe isn't guaranteed to see the devices in the same order
â Fox
Jan 16 at 8:03
That was my blind guess. And yes, you are correct.
â fugitive
Jan 16 at 11:14
1
1
I don't know the answer to your question, but it isn't the similarity of the MAC addresses that causes the issue. It is the fact that are the same "kind" of device (ue) coupled with the fact that the USB probe isn't guaranteed to see the devices in the same order
â Fox
Jan 16 at 8:03
I don't know the answer to your question, but it isn't the similarity of the MAC addresses that causes the issue. It is the fact that are the same "kind" of device (ue) coupled with the fact that the USB probe isn't guaranteed to see the devices in the same order
â Fox
Jan 16 at 8:03
That was my blind guess. And yes, you are correct.
â fugitive
Jan 16 at 11:14
That was my blind guess. And yes, you are correct.
â fugitive
Jan 16 at 11:14
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
The solution I suggest is call a script on attach that looks at the mac adress and renames the device.
attach 0
device-name "(ue)[0-9]+";
action "yourscript $device-name";
;
Untested:
#!/bin/sh
MAC=`ifconfig $1 | grep ether`
INBOUND_MAC="foo"
OUTBOUND_MAC="bla"
if [ "$MAC" == "$INBOUND_MAC" ]; then
ifconfig $1 name inbound
else
ifconfig $2 name outbound
fi
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The solution I suggest is call a script on attach that looks at the mac adress and renames the device.
attach 0
device-name "(ue)[0-9]+";
action "yourscript $device-name";
;
Untested:
#!/bin/sh
MAC=`ifconfig $1 | grep ether`
INBOUND_MAC="foo"
OUTBOUND_MAC="bla"
if [ "$MAC" == "$INBOUND_MAC" ]; then
ifconfig $1 name inbound
else
ifconfig $2 name outbound
fi
add a comment |Â
up vote
0
down vote
The solution I suggest is call a script on attach that looks at the mac adress and renames the device.
attach 0
device-name "(ue)[0-9]+";
action "yourscript $device-name";
;
Untested:
#!/bin/sh
MAC=`ifconfig $1 | grep ether`
INBOUND_MAC="foo"
OUTBOUND_MAC="bla"
if [ "$MAC" == "$INBOUND_MAC" ]; then
ifconfig $1 name inbound
else
ifconfig $2 name outbound
fi
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The solution I suggest is call a script on attach that looks at the mac adress and renames the device.
attach 0
device-name "(ue)[0-9]+";
action "yourscript $device-name";
;
Untested:
#!/bin/sh
MAC=`ifconfig $1 | grep ether`
INBOUND_MAC="foo"
OUTBOUND_MAC="bla"
if [ "$MAC" == "$INBOUND_MAC" ]; then
ifconfig $1 name inbound
else
ifconfig $2 name outbound
fi
The solution I suggest is call a script on attach that looks at the mac adress and renames the device.
attach 0
device-name "(ue)[0-9]+";
action "yourscript $device-name";
;
Untested:
#!/bin/sh
MAC=`ifconfig $1 | grep ether`
INBOUND_MAC="foo"
OUTBOUND_MAC="bla"
if [ "$MAC" == "$INBOUND_MAC" ]; then
ifconfig $1 name inbound
else
ifconfig $2 name outbound
fi
answered Jan 26 at 15:34
arved
827512
827512
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f417247%2ffreebsd-mixes-names-of-similar-usb-to-ethernet-adapters%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
I don't know the answer to your question, but it isn't the similarity of the MAC addresses that causes the issue. It is the fact that are the same "kind" of device (ue) coupled with the fact that the USB probe isn't guaranteed to see the devices in the same order
â Fox
Jan 16 at 8:03
That was my blind guess. And yes, you are correct.
â fugitive
Jan 16 at 11:14