Table of Contents
Static and Dynamic IP on a Single Interface
Oct 2017
Introduction
During the configuration of an MFEL (CentOS 7.2, MFEL 7x) I suddenly lost connection. After some investigation i noticed that my control interface had two addresses. When I did an ip a on the interface, I saw something similar to the section below.
6: enp4s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:1e:67:eb:69:4c brd ff:ff:ff:ff:ff:ff inet 10.43.3.67/19 brd 10.43.31.255 scope global enp4s0f0 valid_lft forever preferred_lft forever inet 10.43.2.244/22 brd 10.43.2.254 scope dynamic enp4s0f0 valid_lft forever preferred_lft forever
I tried to add NM_Controlled=no to the interface configuration file, but that didn't help. So in the end I had to disable the built in Network Manager, which to be honest we don't use because our interfaces are always set to Static.
Disable Network Manager
To disable the Network Manager, at the CLI, enter the following:
systemctl disable NetworkManager.service systemctl stop NetworkManager.service systemctl restart network
I did a reboot and confirmed that I now only had the Static IP that I had configured in my interface configuration file (/etc/sysconfig/network-scripts/ifcfg-enp4s0f0)