Network Configuration On Red Hat Enterprise Linux/CentOS Linux

Опубликовано: 31 Март 2026
на канале: LyncSoft Services
215
2

Interface: eth0
IP Address: 172.x.x.x
Subnet Mask: 255.255.255.0
Gateway:172.x.x.x
Name Server or DNS: 8.8.8.8 (you can use any public DNS or your ISP DNS)
Broadcast address x.x.x.x
Method : Static or Manual (Define Static IP or Non-DHCP)

There are three types of method for configuration of Network in Linux or RHEL / CentOS Linux.

1 - ifcfg-eth0 Script Method (Complex):
Edit interface file using any editor.
vim /etc/sysconfig/network-scripts/ifcfg-eth0

2 - nmcli Method (Hard):
Edit Connection with Command Line Interface
nmcli connection modify eth0 ipv4.addresses 172.x.x.x/24 ipv4.gateway 172.x.x.x ipv4.dns 8.8.8.8 ipv4.method manual connection.autoconnect yes

3- nmtui Method: (Easy)
Edit Connection with Text Based User Interface