WRONG IP ADDRESS - IFCONFIG

marjan.sayyad

New member
Joined
Nov 15, 2020
Messages
3
Hello Everyone,
I have installed CentOS 8. Then I have installed Nagios core on it. I installed it on Vmware 6.5 in my company.
After complete installation of OS and Nagios Core I noticed "ifconfig -a" is showing IP address different than I saved in /etc/sysconfig/network-script/ifcfg-ens192. I gave static IP address on ifcfg0ens192 file.
The problem is "ifconfig -a" is showing one of our dhcp Ip that our user workstation is using.

The thing is both IP address are working on http://IPAddress/nagios without any issue.
I will appreciate if someone can help me why is it showing wrong IP Address.
Thanks,
Marjan
 
Don't you see all the addresses in in "ip a" ?
Hi smtalk,
Thanks for your answer. Yes. when I type "ip a", I see both IP Addresses. the static Ip which I gave in ifcfg-ens192 and the wrong dhcp IP address is showing which this command.
What is it? does system need this IP? if not how can I remove it?
More Appreciated,
Marjan
 
It's hard to say, it depends on network configuration :) You may change ens192 configuration to static IP if it should work there.
 
“Ip a” is showing both IPs. When I remove “ip addr del IP address”, it removes it, but after restarting machine, it shows up again.
It's hard to say, it depends on network configuration :) You may change ens192 configuration to static IP if it should work there.
As you see in ifcfg-ens file, I only gave one static IP, but "ip a" is showing 2 IPs.( Please see the attachments)
Under the DHCP Ip address, time is decreasing. It seems like it is a temporary Ip Address.
Even when I remove the temporary dhcp IP with this command, “ip addr change IP address” and change valid life time to a lower number like 10 seconds, After 10 seconds it removes it, but after restarting machine, it shows up again.

I found this link: https://access.redhat.com/discussions/3206861 and did " omit_dracutmodules+="ifcfg" ", but it did not work.
Is the any other file can I check if my system set up to get dhcp IP from it, I can check and fix?

When I installed centos on physical machine, using same CentOS ISO file "CentOS-8.2.2004-x86_64-minimalCentOS-8.2.2004-x86_64-minimal", I did not have this issue. Is it possible on VMs, it creates temporary IP Address?

Your help is really appreciated!!!
 

Attachments

  • CentOSIPIssue.PNG
    CentOSIPIssue.PNG
    55.2 KB · Views: 9
  • ifcfgens.PNG
    ifcfgens.PNG
    4.3 KB · Views: 7
Back
Top