rules for interface naming for on-board cards
Hi, I am trying to understand the way interface names are given. So one way is hard coding in net_device->name. If the name contains a %d format string, the first available device name with the given base is used; assigned numbers start at zero. On my base machine, I have 1 NIC card which is onboard, rest I can remove and plug. For the onboard card I get the interfaces as em1-4, while all the other cards I get names as p1p2, p3p4 etc. Does Udev know the difference. How are these names given, definitely there must be some configuration which is used to distinguish on-board card vs removable. Thanks.
If the name contains a %d format string, the first available device name with the given base is used; assigned numbers start at zero.
On my base machine, I have 1 NIC card which is onboard, rest I can remove and plug. For the onboard card I get the interfaces as em1-4, while all the other cards I get names as p1p2, p3p4 etc.
This looks like systemd's way of naming network interfaces (aka predictable network interface names). Are you running a systemd enabled system? If so, look at this systemd guide for the naming convention: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfac... HTH, -mandeep
Does Udev know the difference.
How are these names given, definitely there must be some configuration which is used to distinguish on-board card vs removable.
Thanks.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, Thanks. I see that in my system for onboard devices I get a sysfs attribute "acpi_index", which is not available for removable cards. So currently existence and non existence of this file will be sufficient to detect. Thanks. On Mon, May 2, 2016 at 10:22 PM, Mandeep Sandhu <mandeepsandhu.chd@gmail.com> wrote:
If the name contains a %d format string, the first available device name with the given base is used; assigned numbers start at zero.
On my base machine, I have 1 NIC card which is onboard, rest I can remove and plug. For the onboard card I get the interfaces as em1-4, while all the other cards I get names as p1p2, p3p4 etc.
This looks like systemd's way of naming network interfaces (aka predictable network interface names). Are you running a systemd enabled system?
If so, look at this systemd guide for the naming convention:
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfac...
HTH, -mandeep
Does Udev know the difference.
How are these names given, definitely there must be some configuration which is used to distinguish on-board card vs removable.
Thanks.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (2)
-
Gadre Nayan -
Mandeep Sandhu