การปรับแต่ง IP Address บน CentOS 8 ด้วย nmtui

การปรับแต่ง IP Address บน CentOS 8 ด้วย nmtui

ตรวจสอบแพ็กเกจ NetworkManager
rpm -qa | grep NetworkManager

การตรวจสอบอินเตอร์เฟส ifconfig -a
ip a

การแก้ไขอินเตอร์เฟส nmtui-edit eth1
การเปิดปิดอินเตอร์เฟส
ifdown eth1
ifup eth1
ifconfig eth1

การปรับแต่ง IP Address บน CentOS 8 ด้วย nmtui
nmcli connection show nmcli

nmcli con mod eth1 ipv4.method manual
nmcli con mod eth1 ipv4.address 192.168.10.100/24
nmcli con mod eth1 ipv4.gateway 192.168.10.1

nmcli con mod eth1 ipv4.dns "1.1.1.1 192.168.10.1"
nmcli con mod eth1 autoconnect yes
nmcli con down eth1
nmcli con up eth1
ifconfig eth1
nmcli device show eth1
การปรับแต่งโดยเข้าห้องปรับแต่งค่าทางเครือข่ายห้อง '/etc/sysconfig/network-scripts'
cd /etc/sysconfig/network-scripts/
ls -lah

ifconfig eth1
mv ifcfg-eth1 ~/ifcfg-eth1.backup
vim ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="none"
NAME="eth1"
IPADDR="192.168.10.100"
NETMASK="255.255.255.0"
GATEWY=192.168.10.1
DNS1=1.1.1.1
DNS2=192.168.10.1
DEVICE="eth1"
ONBOOT="yes"

ifdown eth1
ifup eth1