[systemd-devel] About stable network interface names

Lennart Poettering lennart at poettering.net
Mon May 29 09:40:31 UTC 2017


On Mon, 29.05.17 11:34, Cesare Leonardi (celeonar at gmail.com) wrote:

> On 29/05/2017 07:10, Greg KH wrote:
> > > For example, in one of those tests I initially had this setup:
> > > Integrated NIC: enp9s0
> > > PCIE1 (x1): dual port ethernet card [enp3s0, enp4s0]
> > > PCIE2 (x16): empty
> > > PCIE3 (x1): dual port ethernet card [enp7s0, enp8s0]
> > > 
> > > Then i inserted a SATA controller in the PCIE2 slot and three NICs got
> > > renamed:
> > > Integrated NIC: enp10s0
> > > PCIE1 (x1): dual port ethernet card [enp3s0, enp4s0]
> > > PCIE2 (x16): empty
> > > PCIE3 (x1): dual port ethernet card [enp8s0, enp9s0]
> > 
> > Do you mean to show that PCIE2 is still empty here?
> 
> No, sorry, cut and paste error. In the last case PCIE2 was occupied by the
> SATA controller.
> 
> > Anyway, PCI can, and will sometimes, renumber it's devices on booting
> > again, that's a known issue.  It is rare, but as you have found out,
> > will happen.  So anything depending on PCI numbers will change.  Nothing
> > we can really do about that.
> 
> Do you mean that it could rarely happen on boot also without doing any
> change to the hardware?

Well, the firmware can do whatever it wants at any time, and this is
really up to the firmware. Ideally firmware would keep things strictly
stable, to make this useful, but you know how firmware is...

> So, to avoid surprises, in case of multiple NICs it's highly recommendable
> anyway to hook interface naming to MAC address, isn't it?

Well, different naming strategies have different advantages and
disadvantages. If you use the MAC address, then replacing hardware
becomes harder, and you can't cover hardware that doesn't have fixed
MAC addresses (or VMs).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list