Networking Concepts in RHEL 7 or CentOS 7
When upgrading servers, you should focus on understanding how network configuration has evolved.
In older versions of RHEL or CentOS, IP management was typically done by manually editing the network configuration files located under:/etc/sysconfig/network-scripts/
In contrast, the newer versions eliminate the need for direct file editing. Instead, IP addresses can be added, modified, or removed using NMCLI (Network Manager Command Line Interface).
To view the existing Ethernet connections, use the following command:
Example Output:
(This section would display the result of the command.)
NAME | UUID TYPE | DEVICE |
ens3 | 71697b55-cf9d-42c6-ba4d-bb0c01ae34d9 | 802-3-ethernet — |
You can configure a ethernet connection for Ip4.
#nmcli connection add con-name “static” ifname ens3 type ethernet autoconnect no ip4 172.25.25.25/24 gw4 172.25.254.254
Note:-If you do not want to autoconnect, then you have to manually add “autoconnect no” or else it is not required.
The result will be:-
NAME | UUID TYPE | DEVICE |
static | 6002793c-ad58-424e-a40d-36f647a5bcc6 802-ens3 | 3-ethernet |
ens3 | 71697b55-cf9d-42c6-ba4d-bb0c01ae34d9 802- | 3-ethernet — |
Networking Concepts in RHEL 7 / CentOS 7
When upgrading servers, it’s important to understand how network configuration has evolved between older and newer versions.
In older RHEL or CentOS releases, network configuration was typically managed by manually editing files under:/etc/sysconfig/network-scripts/
In modern versions (such as RHEL 7 and CentOS 7), manual editing is no longer required. Instead, you can use NMCLI (Network Manager Command Line Interface) to add, modify, or delete IP configurations easily.
To list all existing Ethernet connections, run:
Adding an Additional IP Address
You can add another IP address to an existing connection (for example, named static) without editing configuration files:
This command adds the specified IP address to the existing static connection.
To activate or bring up the connection, use:
Configuring DNS Servers
To set a DNS server for the connection, use:
Note: This command replaces any previously configured DNS servers.
If you want to add an additional DNS server without removing the existing one, include a plus sign (+
) before the option:
This will append the new DNS entry rather than overwrite the previous ones.
Here is a related post you maybe interested in: Network Installation on Linux using NFS
To get more updates follow us on Facebook, Twitter, LinkedIn