0

I'm adding a secondary IP to my CentOS 8 server running NetworkManager. I would previously have done this with ifcfg-style configuration files, but I'm trying to embrace the future and the direction RHEL/CentOS is setting. Unfortunately, this isn't going the way I expected.

What I was expecting, was a new ethernet interface. The reason for wanting this, is that it allows me to bind different services to different IPs, possibly on the same ports. This is nothing new, and it "just worked" with files like ifcfg-eth0:1 in previous versions of CentOS. Now, my ifcfg-eth0:1 alias file is either being completely ignored, or results in an additional IP being added to the primary interface. No method has so far created an additional network interface.

My question now is this: Is this actually possible in CentOS8 without reverting to network-scripts? Is the concept of binding a service to a specific network interface a thing of the past??

2

There isn't a new network interface. There's no such thing as a virtual network interface alias eth0:1 any more, not for well over a decade. It is just a secondary address on eth0, and it also was just a secondary address on eth0 when you were using it in previous versions of CentOS.

You didn't mention anything about why you thought you actually had distinct network interfaces (again, you didn't) or what you are trying to accomplish, so it's impossible to advise you on what to do next.

| improve this answer | |
  • You're absolutely right - terrible question. Spotting an alias interface while running ifconfig was my go-to proof of success, and obviously this is only true for our ancient CentOS 5.5 server. Looking at our slightly less outdated CentOS 6.1 server, I see in the output of ip addr that secondary IPs are actually associated with the primary interface. I guess times change! :D – Saustrup Sep 8 at 7:17
1

A service is bound to an IP address, not to an interface. Therefore, nothing changes when you update to newer scripts. If you have some issue, please describe the actual issue in the question and you can get help to resolve the issue.

| improve this answer | |
  • Sorry, frustration got the best of me. I seemed to remember that you could specify an interface when configuring how a service should bind, but obviously an IP is the way to go. Thanks for correcting me. – Saustrup Sep 8 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.