Configuring Network IP Address on RHEL7 / CentOS7

How to Configure Network IP Address in RHEL7 or CentOS7, redhat network configuration command line, network configuration in linux, network configuration in redhat 7, red hat network configuration, red hat network configuration default gateway, red hat network configuration static ip, rhel network configuration command line, network configuration in rhel 7 and centos 7 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 a or [root@server1 ~]# nmcli dev status As per the screenshot, we identified the 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 the 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

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.


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 a
or
[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
activate the network card devices rhel7

Step 3 : Establish the 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
establish the network connection rhel7

Step 4 : Assign the 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
assigning the ip address rhel7 centos 7

Step 5 : Restart the 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

ifdown and ifup the network interfaces on rhel7 and centos 7


Verfiy the IP Address.  Network configuration on RHEL7 or CentOS 7 is done.
configure network on centos, configure network on centos7, configure network on centos 6, Configuring Network IP Address on RHEL7/CentOS7, How to Configure Network IP Address in RHEL7 or CentOS7, redhat network configuration command line, network configuration in linux
Leave your comments if any. how to configure network in linux, configure network in rhel, configure network in rhel7, configure network on linux, configuring rhel7 network, configuring network in linux, configure network in redhat 7, configure network redhat 7, configure network redhat 6
Subscribe us on youtube channel for practical video tutorials and follow us on social networking sites to not miss any updates. network configuration in redhat 7, red hat network configuration, red hat network configuration default gateway, red hat network configuration static ip, rhel network configuration command line, network configuration in rhel 7 and centos 7
October 01, 2015

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget