This post will help you in Configuring Network IP Address on RHEL7 / CentOS7.
If you are interested in learning, Request you to go through the below recommended tutorial.
DevOps Full Course Tutorial for Beginners - DevOps Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
We all know some network changes are happened in RHEL7 and CentOS7, click the link to read more http://www.learnitguide.net/2015/05/network-changes-in-rhel7.html
Basically, We configure the network ip addresses on linux using anyone of the below mentioned ways,
1. Editing the configuration file.
2. Using Text based or Graphical based Network Utility.
3. Using the Command Line Interface.
In this article, we will see how to configure network IP Address on RHEL7/Centos7 using nmcli command line interface.
nmcli is the advanced command line interface available in rhel 7/centOS 7.
Note: Install bash-completion package to have auto command complete features for nmcli utility.
Steps involved:
1. Identify the Network devices.
2. Activate/Connect the Network devices.
3. Establish the Network connection with proper type.
4. Assign the IP Address as per the requirement.
5. Restart the network devices.
Ensure the network card which doesnt have ip address or card which need to be change the ip address as the image shows.
Above image shows, we identified our card as ens33 but it is disconnected. So we will connect or activate the network devices.
Using nmcli, we will connect the network connection as below to configure ip adresses.
Choose the network card and select the proper types (Ethernet, bluetooth, wifi, bond, bridge, team and so on.). Use the below command to establish the network connection.
Ensure the network connection we established as
Assign the IP Address to the network card using nmcli and set immediately from dhcp to manual, if not, your static ip will be changed by dhcp after the reboot. If you need dynamic ip, then leave it as it is.
To get the changes effect, down and up the network interfaces.
Verfiy the IP Address. Network configuration on RHEL7 or CentOS 7 is done.
Stay connected with us on social networking sites, Thank you.
1. Editing the configuration file.
2. Using Text based or Graphical based Network Utility.
3. Using the Command Line Interface.
In this article, we will see how to configure network IP Address on RHEL7/Centos7 using nmcli command line interface.
nmcli is the advanced command line interface available in rhel 7/centOS 7.
Note: Install bash-completion package to have auto command complete features for nmcli utility.
Configuring Network IP Address on RHEL7 / CentOS7
Steps involved:
1. Identify the Network devices.
2. Activate/Connect the Network devices.
3. Establish the Network connection with proper type.
4. Assign the IP Address as per the requirement.
5. Restart the network devices.
Step1 : Identify the network devices
Ensure the network card which doesnt have ip address or card which need to be change the ip address as the image shows.
[root@server1 ~]# ip aor
[root@server1 ~]# nmcli dev status
Above image shows, we identified our card as ens33 but it is disconnected. So we will connect or activate the network devices.
Step 2 : Activate/Connect the Network devices
Using nmcli, we will connect the network connection as below to configure ip adresses.
[root@server1 ~]# nmcli dev con ens33
Step 3 : Establish Network connection with proper type
Choose the network card and select the proper types (Ethernet, bluetooth, wifi, bond, bridge, team and so on.). Use the below command to establish the network connection.
[root@server1 ~]# nmcli con add type ethernet ifname ens33 con-name ens33
Ensure the network connection we established as
[root@server1 ~]# nmcli con show
Step 4 : Assign IP Address as per the requirement
Assign the IP Address to the network card using nmcli and set immediately from dhcp to manual, if not, your static ip will be changed by dhcp after the reboot. If you need dynamic ip, then leave it as it is.
[root@server1 ~]# nmcli con modify ens33 ipv4.addresses 192.168.2.20
[root@server1 ~]# nmcli con modify ens33 ipv4.method manual
Step 5 : Restart network devices
To get the changes effect, down and up the network interfaces.
[root@server1 ~]# nmcli con down ens33
[root@server1 ~]# nmcli con up ens33
[root@server1 ~]# ip a
Verfiy the IP Address. Network configuration on RHEL7 or CentOS 7 is done.
Related Content on Linux might be useful to you to improve your Linux Skills.
How to Configure IP Address on Ubuntu using Netplan
How to Access Linux Server from Windows Remotely
Configure SSH Passwordless Login Authentication (SSH-keygen)
How to Create LVM Partition in Linux – LVM Tutorial
Install & Configure Samba Server on Linux (RHEL7 / CentOS7)
How to Access Linux Server from Windows Remotely
Configure SSH Passwordless Login Authentication (SSH-keygen)
How to Create LVM Partition in Linux – LVM Tutorial
Install & Configure Samba Server on Linux (RHEL7 / CentOS7)
Keep practicing and have fun. Leave your comments if any.
Support Us: Share with your friends and groups.Stay connected with us on social networking sites, Thank you.
0 Comments