How to configure an IP Address on CentOS 7
First Method
On CentOS 7 or RHEL 7 one need to use the NetworkManager daemon. It attempts to make networking configuration and operation as painless and automatic as possible by managing the primary network connection and other network interfaces, like Ethernet, WiFi, and Mobile Broadband devices. In this quick tutorial you will learn about configuring a network interface using ifcfg files located in /etc/sysconfig/network-scripts/ directory in a CentOS 7 and RHEL 7:
- Create a file named /etc/sysconfig/network-scripts/ifcfg-eth0 as follows:
- DEVICE=eth0
- BOOTPROTO=none
- ONBOOT=yes
- PREFIX=24
- IPADDR=192.168.2.203
- Restart network service: systemctl restart network
Second Method
You can also use nmtui, a text-based user interface for configuring network interfaces
Select Edit a connection and press Enter.
Choose the network interface and then Edit.
Set the IP Address and enter OK.
0 comments:
Post a Comment
Please do not enter any spam link in the comment box.