文章摘要
GPT 4
1
2
3
[rootClocalhost~]# cd /etc/sysconf ig/network-scripts/
[rootClocalhost~]# ls
[rootClocalhost~]# vi ifcfg-ens160
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vim ifcfg-ens160

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens160"
UUID="c203d758-1006-4fed-85cf-b485feac9682"
DEVICE="ens160"
ONBOOT="yes"
IPADDR=192.168.200.181
NETMASK=255.255.255.0
GATEWAY=192.168.200.2
DNS1=114.114.114.114

# 重启网卡
systemctl restart network