How to configure interface on centos linux?

Network configuration is fixed with “nmtui” tool.

Except for the nmtui tool, the ethernet ens33 configuration is changed as follows.

ens33 automatically gets IP over dhcp.

vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=ens33
UUID=1da2f14f-a29e-4a22-9d47-a847eac09d8a
ONBOOT=yes
DEVICE=ens33
DNS=10.255.255.101

ens34 static ip is given.

vim /etc/sysconfig/network-scripts/ifcfg-ens34
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=10.255.255.101
PREFIX=8
GATEWAY=10.255.255.1
DNS1=10.255.255.101
DOMAIN=osinetworks.net
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=ens34
UUID=befd3561-d81f-4f6d-94d0-e252460375af
ONBOOT=yes
DEVICE=ens34

Gerekli değişiklikler yapıldıktan sonra network servisi restart edilir.
systemctl restart NetworkManager

By:

Posted in:


Leave a comment