I have some Dell hosts in our environment. I would like to be able to provide consistent network interface naming across platforms. I know that biosdevname attempts to make the interfaces consistent with regard to their physical/hardware layout. But this is not the kind of consistency I'm looking for. I'm looking for consistent names to allow my 10gbps ports and 1gbps to have the same name across different hardware platforms.
What I would like is that no matter how I have my interfaces physically allocated on my host that:
- The First interface will be em1 and it will always be the first 1gbps interface
- The second interface will be em2 and it will always be the first 10gbps interface
For example,
If in scenario 1 I have
--- --- --- ---
| 1 | 2 | 3 | 4 |
--- --- --- ---
Where: 1 and 2 are 10gbps interfaces - and port 1 is plugged in 3 and 4 are 1gbps interfaces - and port 3 is plugged in
em1 would be port 3 - because this is the first running 1gbps port em2 would be port 1 - because this is the first running 10gbps port
If in scenario 2 I have
--- --- --- ---
| 1 | 2 | 3 | 4 |
--- --- --- ---
Where: 1 and 2 are 1gbps interfaces - port 1 is plugged in 3 and 4 are 10gbps interfaces - port 3 is plugged in
em1 would be port 1 - because this is the first running 1gbps port em2 would be port 3 - because this is the first running 10gbps port
Is there a way to automate this interface naming selection criteria (aka. look for first running 1gbps interface and automatically configure it as em1, look at first running 10gbps interface and configure it as em1)
EDIT: Providing use case so it doesn't seem "as crazy"
This is for a KVM deployment, they want to be able to automatically attach vlan sub interfaces (aka em2.vlan# to pre-defined bridges attached to domains/guests). In order to ensure we know which interface we're adding a vlan to, we need some kind of consistency in network naming.
We've thrown around the idea of creating bonds of single interfaces to ensure that we have a consistent interface name. That might work fine, but would still be a manual process to figure out which interface is the first 10gbps interface to configure as bond0.
If there are other ideas of how to add vlan sub interfaces to the 10gbps port consistently without having to know the underlying naming convention for each machine that would be appreciated as well.
I realize things like openvswitch might work but we're kinda just trying to go very basic network connectivity here.