Show the available interfaces:
nmcli device
Edit the interface configuration file
/etc/sysconfig/network-scripts/eth0
Configure the interface with the NetworkManager so it autoconnects
nmcli connection modify eth0 connection.autoconnect true
Modify the properties as shown below:
- Change
BOOTPROTO
value fromdhcp
tonone
- Set the properties
IPADDR
,PREFIX
/NETMASK
,GATEWAY
andDNS1
,DNS2
- Ensure the property
ONBOOT
is set toyes
Reset the connection:
nmcli connection down eth0
nmcli connection up eth0