Re: Locking network card configuration

2022-11-22 Thread Thomas Bohl
mac2dev() { # This got long ifconfig | while IFS= read _line; do if [[ "$_line" = [a-z]!(\ *):* ]]; then _dev=${_line%%:*} elif [[ "$_line" = *lladdr*$1* && $_dev != vlan* ]]; then echo $_dev

Re: Locking network card configuration

2022-11-22 Thread chohag
Theo de Raadt writes: > > > + for _hn in /etc/hostname.??:??:??:??:??:??; do > > > + _mac=`echo $_hn | cut -c 15-31` _mac=${_hn#/etc/hostname.} > > > + _if=`ifconfig | grep -B 1 $_mac | head -n 1 | awk -F ": " > > > '{print $1}'` mac2dev() { # This got long

Re: Locking network card configuration

2022-11-21 Thread Theo de Raadt
Theo de Raadt wrote: > Thomas Bohl wrote: > > > Hello, > > > > > I suppose there is some argument that we should support hostname.MAC > > > files > > > > Maybe a function in netstart right before vifscreate could be enough > > to achieve this? I creates this diff, against stable for now

Re: Locking network card configuration

2022-11-21 Thread Theo de Raadt
Thomas Bohl wrote: > Hello, > > > I suppose there is some argument that we should support hostname.MAC > > files > > Maybe a function in netstart right before vifscreate could be enough > to achieve this? I creates this diff, against stable for now though, > as a test. > > Create a

Re: Locking network card configuration

2022-11-21 Thread Thomas Bohl
Hello, I suppose there is some argument that we should support hostname.MAC files Maybe a function in netstart right before vifscreate could be enough to achieve this? I creates this diff, against stable for now though, as a test. Create a /etc/hostname.MAC file like you would create a

Re: Locking network card configuration

2022-11-20 Thread Steve Litt
Theo de Raadt said on Sun, 20 Nov 2022 19:35:22 -0700 >Steve Litt wrote: > >> Vitaliy Makkoveev said on Mon, 21 Nov 2022 03:48:21 +0300 >> >> >> On 20 Nov 2022, at 18:06, Odd Martin Baanrud >> >> wrote: >> >> >> >> Hello, >> >> >> >> I have a Raspberry Pi 4 with 2 USB NIC’s attached. >> >>

Re: Locking network card configuration

2022-11-20 Thread Theo de Raadt
Steve Litt wrote: > Vitaliy Makkoveev said on Mon, 21 Nov 2022 03:48:21 +0300 > > >> On 20 Nov 2022, at 18:06, Odd Martin Baanrud > >> wrote: > >> > >> Hello, > >> > >> I have a Raspberry Pi 4 with 2 USB NIC’s attached. > >> One via USB3 (ure0), and the other via USB2 (ure1). > >> Since

Re: Locking network card configuration

2022-11-20 Thread Steve Litt
Vitaliy Makkoveev said on Mon, 21 Nov 2022 03:48:21 +0300 >> On 20 Nov 2022, at 18:06, Odd Martin Baanrud >> wrote: >> >> Hello, >> >> I have a Raspberry Pi 4 with 2 USB NIC’s attached. >> One via USB3 (ure0), and the other via USB2 (ure1). >> Since they are connected to different USB

Re: Locking network card configuration

2022-11-20 Thread Vitaliy Makkoveev
> On 20 Nov 2022, at 18:06, Odd Martin Baanrud wrote: > > Hello, > > I have a Raspberry Pi 4 with 2 USB NIC’s attached. > One via USB3 (ure0), and the other via USB2 (ure1). > Since they are connected to different USB interfaces, I thaught they would > get configured the same way on reboot. >

Re: Locking network card configuration

2022-11-20 Thread Stuart Henderson
On 2022-11-20, Odd Martin Baanrud wrote: > Hello Stuart, > > Can you recommend a USB 2 or 3 NIC which uses a different driver then ure,, > with good performance? > Does any of the known manufactures, Asus e.i, use a different chipset? I'd look at "man -k 1gb|grep -i usb" and search for chipset

Re: Locking network card configuration

2022-11-20 Thread Odd Martin Baanrud
Hello Stuart, Can you recommend a USB 2 or 3 NIC which uses a different driver then ure,, with good performance? Does any of the known manufactures, Asus e.i, use a different chipset? Martin

Re: Locking network card configuration

2022-11-20 Thread Stuart Henderson
On 2022-11-20, Odd Martin Baanrud wrote: > Hello, > > I have a Raspberry Pi 4 with 2 USB NIC’s attached. > One via USB3 (ure0), and the other via USB2 (ure1). > Since they are connected to different USB interfaces, I thaught they would > get configured the same way on reboot. > But that’s not

Locking network card configuration

2022-11-20 Thread Odd Martin Baanrud
Hello, I have a Raspberry Pi 4 with 2 USB NIC’s attached. One via USB3 (ure0), and the other via USB2 (ure1). Since they are connected to different USB interfaces, I thaught they would get configured the same way on reboot. But that’s not the case. They became swapped on reboot. Is there a way