1. Introduction
The Centos8 system is updated. The new version makes people feel very comfortable. At this time, someone will configure the network card of the CentOS8 system to make the system go online, and they will encounter that the configured network card will not take effect. Think about it and configure CentOS7. Ah, the biggest change in the CentOS8 update is the network card. Next, configure the network card;
Two, configuration
Network card configuration file: /etc/sysconfig/network-scripts/ifcfg-ens33
[ root@localhost ~]# cd /etc/sysconfig/network-scripts/[root@localhost network-scripts]# ls #You will see a configuration file for configuring the network card
[ root@localhost network-scripts]# vim ifcfg-ens33 #Enter into the network card configuration file
The following configuration files: red boldface is modification; yellow background is added; black boldface is added comment.
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPADDR=192.168.10.111
NETMASK=255.255.255.0
GATEWAY=192.168.10.1
DNS1=114.114.114.114
IPV4_FAILURE_FATAL=no
# IPV6INIT=yes
# IPV6_AUTOCONF=yes
# IPV6_DEFROUTE=yes
# IPV6_FAILURE_FATAL=no
# IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=7afc67d5-b767-4d89-97b4-2558f8dc33c3
DEVICE=ens33
ONBOOT=yes
[ root@localhost network-scripts]# nmcli c reload #Restart the network card
Seeing this, do you feel the gap with the CentOS7 system!
Three, nmcli command explanation
nacli uses:
Usage: nmcli [options] OBJECT
Options:
o[verview] Overview mode (hide default values)
t[erse] concise output
p[retty] neat output
m[ode] tabular|multiline output mode
c[olors] auto|yes|no whether to use colors in the output
e[scape] yes|no escapes the column separator in the value
a[sk] ask for missing parameters
s[how-secrets] allows to show password
w[ait] Set the timeout waiting time for the completed operation
v[ersion] shows the program version
h[elp] output this help
Object:
g[eneral] General status and operation of the NetworkManager
n[etworking] overall networking control
r[adio] network manager radio switch
c[onnection] network manager connection
d[evice] devices managed by the network manager
a[gent] The secret agent or polkit agent of the network manager
m[onitor] monitor network manager changes
Generally use c:
[ root@localhost network-scripts]# nmcli c –-help #Option view help
COMMAND :={ show | up | down | add | modify | clone | edit |delete| monitor | reload | load |import|export}
to sum up
The above is the CentOS8 network card configuration file introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!
Recommended Posts