This machine has a public IP address (x.x.x.x) and a private IP address (192.168.1.102). Trying to get NetworkManager to assign both of those to a single ethernet port was an exercise in frustration - I could either get one or the other, but not both IP addresses available at the same time. A lot of the time 'ifconfig -a' would show one, neither or both of the "configured" IP addresses, and there was no logic to whether the interface would work or not.
So, nix NetworkManager.
Code: Select all
[root@xanadu]# systemctl status NetworkManager ● NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:NetworkManager(8)
Code: Select all
[root@xanadu]# ls -1 /etc/sysconfig/network-scripts/ifcfg* /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 /etc/sysconfig/network-scripts/ifcfg-lo [root@xanadu]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eth0 HWADDR=10:7B:44:90:34:7B DEVICE=eth0 ONBOOT=yes DNS1=192.168.1.254 DOMAIN=gornall.net IPV6_PRIVACY=no IPADDR=<public-address> NETMASK=<public-netmask> GATEWAY=<public-gateway> DNS2=18.104.22.168 PREFIX=24 [root@xanadu]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1 TYPE=Alias PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eth0 HWADDR=10:7B:44:90:34:7B DEVICE=eth0 ONBOOT=yes DNS1=192.168.1.254 DOMAIN=gornall.net IPV6_PRIVACY=no IPADDR=192.168.1.102 NETMASK=255.255.255.0 GATEWAY=192.168.1.254 DNS2=22.214.171.124 PREFIX=24
At this point, doing a 'systemctl restart network' will recover the network, and everything is sweetness and light again. At the moment my stopgap is to have cron run this every 5 minutes...
So, what is causing me to drop my network interface ? Is it some last vestige of NetworkManager that I don't know about, or it crossed my mind it could be a cron-job (but I can't find anything in the crontabs), or maybe power-management is switching the interface off ? Is there an easy way to turn off power management on Centos 7 ? I couldn't see anything in the BIOS that was related to power-management...
Any hints gratefully received