How To Configure CentOS 7 Network Settings - Serverlab
How To Configure CentOS 7 Network Settings - Serverlab
Configuring a Static IP
A static address is one that is permanently assigned to one host. It is an address that is manually
configured by the administrator.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=enp3s0
ONBOOT=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ifdown enp0s3
ifup enp0s3
vi /etc/sysconfig/network-scripts/ifcfg-
https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-configure-centos-7-network-settings/ 1/2
6/21/2021 How to Configure CentOS 7 Network Settings - Serverlab
. Add the following settings. If a configuration already exists, modify it to look like the following:
DEVICE=enp3s0
ONBOOT=yes
DHCP=yes
ifdown enp0s3
ifup enp0s3
ip a show enps3s0
The output will display basic information about the interface, such as device name, IP address,
MAC address, etc. The following is an example of the output.
https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-configure-centos-7-network-settings/ 2/2