Symptoms
When trying to use the "Add IP Address interface", one of the following errors is presented:
The “/sbin/ip -family inet addr add x.x.x.x/y broadcast x.x.x.y dev eno12345678 label eno12345678:cp10” command (process 9999) reported error number 2 when it ended.: RTNETLINK answers: Numerical result out of range
The “/sbin/ip -family inet addr add x.x.x.x/y broadcast x.x.x.y dev enp10s0f1np1 label enp10s0f1np1:cp1” command (process 560139) reported error number 2 when it ended.: Error: Attribute failed policy validation.
The “/sbin/ip -family inet route add x.x.x.x/y dev enp10s0f1np1” command (process 9999) reported error number 2 when it ended.: RTNETLINK answers: File exists
Description
The kernel has a hard limit of 15 characters for the name of an interface. This is expected behavior per RedHat:
If your network interface has a long name, adding additional IPs will try to add 4+ characters to the name of the base interface, starting with ":cp1" and incrementing for each IP.
If the name of your interface + the additional label exceeds 15 characters, the system will be unable to add the interface.
Workaround
You or your system administrator will need to reduce the length of the interface name. Most long interface names are due to a portion of the MAC address being added to the interface name. Please see Red Hat's documentation on configuring network interfaces.