artaxerxe
On my CentOS 8 machine I want to bring my network interface up at startup even though it is not physically connected. My ifcfg-eth0 script looks like this:
```
TYPE=Ethernet
BOOTPROTO=static
IPADDR=192.168.1.10
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=eth0
DEVICE=eth0
ONBOOT=yes
PROXY_METHOD=none
BROWSER_ONLY=no
```
But hen I start the machine, this connection is down. I need to bring it up with
> nmcli con up eth0
What can I do to bring it up when my machine starts up?
Top Answer
artaxerxe
The issue is related to the fact that NetworkManager doesn't bring up automatically the device if it is not physically connected. In order to tell it to ignore this, **device.ignore-carrier** property must be set to yes. This can be done as follows (I think this is the recommended way to do it):
1. Create an empty file in /etc/NetworkManager/conf.d/. I called it general.conf.
2. put in it the following content:
> [device]
>
> match-device=interface-name:eth0
>
> ignore-carrier=yes
3. Restart the NM service:
> systemctl restart NetworkManager
For more information on this, you have to consult man pages for NetworkManager and the related ones:
> man NetworkManager
>
> man NetworkManager.conf
>
> man nm-settings
... and a few others.
Hope this helps.