centOS7 after the restart, even without Internet (LAN gone, ifcfg-ens33 file does not exist)

problem

  • When ifconfig query, only locard, but ifconfig -awhen there is a query ens33card
  • ls /etc/syconfig/network-scripts/Find all NIC configuration file when there is no ifcfg-ens33network card configuration file

solve

Adding /etc/syconfig/network-scripts/ifcfg-ens33NIC configuration file, which is based on my virtual machine configuration information, specific ip address IPADDRcan set up their own, HWADDRphysical address their own queries virtual machine network adapter advanced options, GATEWAYNAT set the query virtual machine's virtual network configurator (I NAT configuration) to get the gateway address

NAME=ens33
DEVICE=ens33                    # 网卡设备名称, 必须和 `NAME` 值一样
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.194.136
NETMASK=255.255.255.0
HWADDR=00:0C:29:8B:F9:99
GATEWAY=192.168.194.2

Then removedNetworkManger

systemctl stop NetworkManager
systemctl disable NetworkManager
service network restart

Restarting network (via systemctl): [ OK]
At this point, the problem is solved

Host of ping nowhere virtual machine

The reason: VMware Network Adapter VMnet8 adapter card and a virtual machine ip ip is not a network segment
Solution: Reference https://blog.csdn.net/ww1473345713/article/details/51490525
using the above operation card ens33 starts successfully, then the host modify the network adapter on the VMnet8 ip, refer to this link to content

Reference article

https://hk.saowen.com/a/33d903bdca3afa97b412db39a81509b8aa0f4c481104acf50342fdf3e7a4b02e

Published 118 original articles · won praise 14 · views 50000 +

Guess you like

Origin blog.csdn.net/github_38641765/article/details/86606779