Configuring IP Networking with ifcfg Files

Configuring an Interface with Static Network Settings Using ifcfg Files
For example, to configure an interface with static network settings using ifcfg files, for an interface with the name enp1s0, create a file with the name ifcfg-enp1s0 in the /etc/sysconfig/network-scripts/ directory, that contains:

DEVICE=enp1s0
BOOTPROTO=none
ONBOOT=yes
PREFIX=24
IPADDR=10.0.1.27

Configuring an Interface with Dynamic Network Settings Using ifcfg Files

DEVICE=em1
BOOTPROTO=dhcp
ONBOOT=yes

References
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_ifcg_files