1, the network card configuration file
[Email protected] ~]# #/etc/sysconfig/Network-script/ifcfg-eth0
[Email protected] ~]# #config
[[email protected] ~]# #c f g
[Email protected] ~]# Ll/etc/sysconfig/network-scripts/ifcfg-eth0
-rw-r--r--. 3 root root 229 Oct 16:55/etc/sysconfig/network-scripts/ifcfg-eth0
2. Detailed explanation of network card configuration file
[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0 #网卡的名字
HWADDR=00:0C:29:90:89:D9 #HWADDR HardWare Address hardware addresses MAC address
Type=ethernet #网络类型 Ethernet
uuid=ae779ae6-044d-43d5-a33b-48c89e8de10e #UUID unique identity that is unique in the system.
Onboot=yes #******boot on? Whether to start the network adapter when powering on or restarting the NIC
Nm_controlled=yes #是否受network程序管理
How the Bootproto=none #****** network card obtains the IP address of the IP Address Card
#dhcp get an IP address automatically
#none a fixed IP address
#static a fixed IP address
ipaddr=10.0.0.100 #IPADDR IP Address
netmask=255.255.255.0 #子网掩码 determine the maximum number of machines in this LAN
gateway=10.0.0.2 #GATEWAY Gateway to the entire building.
dns1=223.5.5.5
dns2=223.6.6.6
Userctl=no #普通用户是否能控制网卡
Peerdns=yes #网卡配置文件里面的DNS优先于/etc/resolv.conf
Exercises:
Explain in detail the meaning of each line in the NIC configuration file?
Linux Basic Learning -6.2-NIC configuration file