Re: How to tell if a network interface was renamed (and from what)
- In reply to: Mina_Galić : "Re: How to tell if a network interface was renamed (and from what)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Nov 2023 18:55:10 UTC
On 21 Nov 2023, at 12:16, Mina Galić wrote:
> Hi Mike,
>
>> Mina, do you care about epair, or is the behavior I described sufficient
>> for your purposes?
>
> I do deeply care about epair, but for me, ifinfo does the
> right thing for me:
>
> root@irc:~ # ifinfo | grep Interface
> Interface vnet0 (epair30):
> Interface lo0 (lo0):
That's not the whole story for epair. For example, I get this:
Interface bhyve (vtnet0):
Interface lo0 (lo0):
Interface lo1 (lo1):
Interface foo0a (epair0):
Interface foo0b (epair0):
But if you only need the driver name, it will do.
A problem with ifinfo is that it is not normally installed.
I think it is worth adding a similar feature for the driver name
to ifconfig.
> for one. For the other. For the main purpose, figuring out
> in cloud-init what the driver of an interface is / if the
> interface has been renamed, this is more than sufficient.
Currently I have this for ifconfig -D:
bhyve: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
ether 58:9c:fc:0b:0c:10
inet 10.0.3.1 netmask 0xffffff00 broadcast 10.0.3.255
inet6 fe80::5a9c:fcff:fe0b:c10%bhyve prefixlen 64 scopeid 0x1
inet6 2001:470:c202:3::1 prefixlen 64
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
drivername: vtnet0
It's a little more work to parse, but I decided that it was useful
for humans, and works with -a.
Mike
>
> Thank you very much,
>
> Mina