example42/puppet-network

Question: How does one deal with Consistent Network Device Naming in RHEL 7+ ?

linuxdan opened this issue · 2 comments

This is one of those chicken-egg dilemmas.
You cannot use "eth0, eth1, ..." any more.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming

One thought is to use facter to get the name of the primary interface dynamically and then fill in from there.

Well, typically you configure interfaces via hieradata and in Hiera you can interpolate facts.
Same, as you suggested, if you declare network resources directly in manifests.
So that's technically possible.

Bouke commented

We're disabling consistent network device naming, such to keep consistent naming across various linux distributions. In the future, I might reconsider and enforce consistent device naming. I think you're able to specify the interface name, allowing me to have a predefined binding. That way I would get the benefit of consistent network device naming.