Score:0

How to get rid of secondary IP address without disabling dhcpcd (because there is no DHCP server anyway)

es flag

I have one system running RHEL7 that mysteriously keeps coming up with a secondary IP address in addition to the one I set statically. When I do "ip addr show eno0", it describes this secondary address as being "scope global secondary dynamic". There are no files in "/etc/sysconfig/network-scripts/" that call for a dynamic IP. And in the past, this has been good enough to get only static IP.

All the searches I do on this lead to the suggestion to disable dhcpcd. But this is a new problem. This might solve it for now, right up until the point where I need to make eno1 have a dynamic IP address. Disabling dhcpcd shouldn't be necessary and hasn't been up until now.

The address it's getting is consistently the same thing, despite the fact that there is no DHCP server on this network. So it seems like it's getting this address from some config file local to the machine, but we can't identify it.

Any help would be appreciated. Thanks!

Score:0
in flag

The answer is easy, but does not seem very well known. In dhcpcd.conf, there are two options for that. Here is what the doc says :

allowinterfaces pattern When discovering interfaces, the interface name must match pattern which is a space or comma separated list of patterns passed to fnmatch(3). If the same interface is matched in denyinterfaces then it is still denied.

denyinterfaces pattern When discovering interfaces, the interface name must not match pattern which is a space or comma separated list of patterns passed to fnmatch(3).

Example : denyinterfaces eth0, wlan0

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.