As shown in the figure above, the ip configured in /etc/sysconfig/network-scripts/ifcfg-enp0s3 is static, but after restarting, the ip is not 192.168.1.124. Why is this? My local computer cannot ping 192.168.1.124, which means this IP is not occupied
Try changing IPADDRESS to IPADDR?
http://jingyan.baidu.com/arti... I configured it as above and there is no problem
There is a typo in this line, but it seems to have nothing to do with the problem: ePV6INIT=yes
I guess your problem lies in the IP, 192.168.1.124/255.255.0.0. This network segment includes the 192.168.122.1/255.255.255.0 network segment of virbr0. In reality, there should be no such subnet division. Judging from the final IP 192.168.31.183/255.255.255.0 on your enp0s3, it should be that Linux failed to apply the static IP you configured first, and then obtained the IP from the DHCP server. If this is the case, then your enp0s3 should be in For the 192.168.31.0/255.255.255.0 network segment, you can try configuring an IP for the 192.168.31.0/255.255.255.0 network segment. If there is no problem, it means that the configuration format is not wrong, but there is a problem with the IP and subnet mask.
You can also try running ifdown enp0s3 first and then ifup enp0s3 command to restart the network card and see if ifup outputs any prompt information.
I found the problem, it turned out that
IPADDR
was written asIPADDRESS
, sweat! ! !