Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 2014 10:32:16 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Martin Hanson <greencoppermine@yandex.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: NICs devices switches "pshycial" place on each boot
Message-ID:  <alpine.BSF.2.11.1412031024340.32996@wonkity.com>
In-Reply-To: <1511041417624247@web23g.yandex.ru>
References:  <1511041417624247@web23g.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Dec 2014, Martin Hanson wrote:

> I got a small Intel Atom N280 box I wanted to use as a PF firewall.
>
> It has one Intel NIC that gets registered as "bge0",

That would be Broadcom.

> then it has three
> USB->NIC dongles with the ASIX AX88179 chipset which gets registered
> as "ue0", "ue1" and "ue2".
>
> I have set each device to a static IP during boot.
>
> The problem is however that upon boot the devices gets switched.
>
> So first boot:
>
> | USB DONGLE 1 | UE0 | 192.168.1.1 |
> | USB DONGLE 2 | UE1 | 192.168.2.1 |
> | USB DONGLE 3 | UE2 | 192.168.3.1 |
>
> Next boot:
>
> | USB DONGLE 1 | UE1 | 192.168.2.1 |
> | USB DONGLE 2 | UE2 | 192.168.3.1 |
> | USB DONGLE 3 | UE0 | 192.168.1.1 |
>
> Upon each boot the order changed, there is no fixed pattern.

Right, USB devices are detected dynamically, and the order is not 
guaranteed.

> This is a major problem as the device *still* has the right name and the
> right IP, but it is as though it has been physically removed from the
> slot and changed place.
>
> Is it somehow possible to deal with this problem?
>
> pciconf doesn't display those devices.

usbconfig will show the USB devices, 'usbconfig -d 0.3 dump_device_desc' 
shows output from device 0.3.  It might be possible to assign a unique 
name to each with 'ifconfig name' when they are detected by devd.  That 
would depend on some unique ID for each that can be detected by devd. 
If they are all the same brand and model, vendor and product ID will not 
help.  Serial number is often not set on USB devices.  MAC address would 
work, if that is passed to devd.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1412031024340.32996>