IP Aliases For Services (including Dhcpd)?

Home » CentOS » IP Aliases For Services (including Dhcpd)?
CentOS 3 Comments

I’d like to consolidate the services from several old servers onto 2
CentOS7 VMs that are currently running dhcpd in a balanced/failover configuration. It will simplify things to add the IPs from the old servers as aliases, at least temporarily so everything will continue to connect without changes.

However, after adding the first one, I see in the logs that DHCPD is sending its DHCPACKs alternating between ens192 and ens192:0 every other time, but oddly it is always using the non-alias IP as the source every time according to tcpdump -n. Is this configuration likely to confuse anything?

3 thoughts on - IP Aliases For Services (including Dhcpd)?

  • Yes confusion will abound. There should only ever be one and only one DHCP
    server on any network. With two you will sooner of later have multiple DHCP
    client hosts with the same IP addresses.

  • No, it’s not going to give out duplicate IPs. The dual servers are configured as primary/secondary and know about each other with some protocol to track what leases are already out. https://kb.isc.org/article/AA-00502/0/A-Basic-Guide-to-Configuring-DHCP-Failover.html My question is just about multiple IPs as aliases on the server side. So far it looks like it is always sending with the same source IP
    even though it logs that it used the alias interface name. I’m just wondering if it would confuse clients if it gets an IP from one source and subsequent ACKs from another. But, I guess that has been happening for a long time already with the dual server setup.

  • This is normal behavior. When you have multiple IPs aliased on a system, they all answer for inbound, but the outbound traffic always shows the primary system IP as the source.

    You might be able to finagle some sort of firewall SNAT rules to fake it, but I’ve never tried that, so I can’t vouch for the viability of such a notion.