Psychz - Bhaskar
Votes: 0Posted On: Sep 26, 2019 12:36:41
Since you have already accessed your server using IPMI and did a fresh install of CentOS 7 on your own, configuring IPs will a piece of cake for you. To do so, you will have to take control of your server again using an IPMI. Once you do so, the following steps will help you to configure an IP range for the system.
Prerequisites
- Operating system: CentOS 7
- Minimum of one Active network interface
- Root permission
Step 1 - Check the network interfaces by using the command:
#
ifconfig
The network configuration file in CentOS 7 is stored in “/etc/sysconfig/network-scripts”. There are multiple network files under “network-scripts” directory depending on the number of interfaces configured. The following steps will show you how to bind a range of IPs.
Step 2 - Edit the network interface file to which you want the static IP assigned.
vi /etc/
sysconfig
/network-scripts/
ifcfg
-enp2s0
Note: This file can be edited using a VI editor to configure static IP in the server. The different parameters to be added are:
BOOTPROTO – It is the protocol to be implemented during Boot time. It has to be changed to “static” for static IP configuration.
IPADDR – Edit the IP address in the IPADDR field
PREFIX – Add the IP range that has to be configured.
NETWORK – Add the network IP of the IP range.
GATEWAY – Add the Gateway IP
DNS - Add the address of the DNS server.
Save and close the file.
Step 3 - Restart the network services by the command
#
Systemctl
restart network
This should configure the IP addresses on your machine.