Then, verify the name of the network interface: :~# ip addr show
To do this, open a terminal and run as root user: :~# yum install net-tools
How to do it in CentOS 7įirst, you must know what address and what the network interface is called. However, it is a slightly less secure method as the IP address will never change. Its main advantage is that it is easier to deploy network services.
Nonetheless, a router can also assign this type of address through the device’s MAC address. Otherwise, static IP addresses are assigned manually by a user and will not change until the user assigns another.
Update the interface file as per the requirement. vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 For interface enp0s3, the file name would be ifcfg-enp0s3.
In this method, we will edit the network interface file found under /etc/sysconfig/network-scripts/ directory. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Here, I wish to change the IP address of enp0s3. The output of ifconfig -a may look like below. OR ip a Choose the desired network interface You can use any one of the below commands to list down the available network interfaces on the system. Let us configure our system for the following information. Configure Static IP Address in CentOS 7 / RHEL 7 READ: How To configure DHCP server on CentOS 7, Ubuntu 18.04 & Debian 9īut, if you go to the bigger organizations, they use static (manual) IP to avoid network issues due non-availability of DHCP servers. In some cases, these tasks are automated using DHCP (Dynamic Network Configuration Protocol) which takes care of assigning IP Address to Desktop/Servers. Setting up the network and bringing servers into the network is the primary administration task for any system administrator.