:: Re: [DNG] if2mac init.d service for…
Top Pagina
Delete this message
Reply to this message
Auteur: tito
Datum:  
Aan: dng
Onderwerp: Re: [DNG] if2mac init.d service for persistent network interface names
On Thu, 24 Dec 2020 16:21:24 +0100
aitor <aitor_czr@???> wrote:

> Hi Tito,
>
> On 24/12/20 14:24, tito via Dng wrote:
> >   BTW: I noticed during my test that even pci bus numbers can
> >           change wildly in the predictable names case (vs MACS,
> >           if I recall it correctly).
> >           I thought that being tied to soldered sockets on the
> > motherboard they were immutable. Are they numbered on a first come
> >           first served basis? or where is my error?
> The following code is supposed to list the mac addresses together
> with the assigned names of
> all your network devices:

>
> https://www.gnuinos.org/if2mac/ <https://www.gnuinos.org/if2mac/>
>
> There is a lot of superfluous code on that, because i've just taken
> it from the backend of simple-netaid.
> Since it's has been tested only in the case of an unique wired device
> and an unique wireless device (my case),
> please can you say if it works fine for you? If so, does the output
> in the command line matches your desired order?
> You need to install libiw-dev, and you can build it via:
>
> $ gcc if2mac.c -o if2mac -liw
>
> Thanks in advance,
>
> Aitor.
>
>
>
>


Hi,
it works in detecting and listing the devices:

./if2mac
MAC Address=00:xx:xx:xx:xx:47 -> eth5 - wired
MAC Address=00:xx:xx:xx:xx:46 -> eth4 - wired
MAC Address=00:xx:xx:xx:xx:4D -> eth11 - wired
MAC Address=54:xx:xx:xx:xx:62 -> wlan0 - wireless
MAC Address=00:xx:xx:xx:xx:6B -> eth3 - wired
MAC Address=00:xx:xx:xx:xx:4A -> eth8 - wired
MAC Address=00:xx:xx:xx:xx:4C -> eth10 - wired
MAC Address=00:xx:xx:xx:xx:4B -> eth9 - wired
MAC Address=00:xx:xx:xx:xx:49 -> eth7 - wired
MAC Address=00:xx:xx:xx:xx:6A -> eth2 - wired
MAC Address=00:xx:xx:xx:xx:69 -> eth1 - wired
MAC Address=00:xx:xx:xx:xx:68 -> eth0 - wired
MAC Address=00:xx:xx:xx:xx:48 -> eth6 - wired
MAC Address=00:xx:xx:xx:xx:6A -> br0 - wired

The order is somewhat..... different.

Ciao,
Tito