centos7 cannot connect to the external network

1. First, ensure that the virtual machine is in NAT mode##

2. Open the cmd window, enter ipconfig, and check what the ipv4 address of vmnet8 is, and the DNS also needs to be noted. ## will be used later

Note: The ip of vmnet8 must be in the same network segment as the gateway IP of the virtual machine

3. Next, the VM enters the virtual network editor##

Remember the gateway IP

4. Enter the system and manually set static IP and DNS (domain name service)

Note: The address here as long as the first three segments are the same as the gateway IP, and the last segment is set by yourself, but it cannot be repeated with the gateway IP

5. Finally restart the virtual machine network card##

Centos command line input command: service network restart

Let me say a bit more here. After setting up the virtual network card, the virtual network card cannot access the external network. If it is a NAT internal cluster, it is not necessary to connect to the external network. But if your machine needs to go online, you need to put the virtual network card into the shared network list.

Open your network card configuration. If you have a wired or broadband direct connection, please share the network card you use to surf the Internet with the virtual network card. Wireless, choose wireless network card

Recommended Posts

centos7 cannot connect to the external network
Solution for Ubuntu unable to connect to the network
Solution to the virtual machine ubuntu16.04 cannot connect to the Internet
Set the network card to bridge mode under CentOS6.3 KVM
CentOS7 modify the network card name
Centos7 change the network card name
How to modify the hostname on CentOS 8
Solution to the problem that ubuntu cannot connect to the Internet in the virtual machine
VMware Fusion install CentOS7 and configure the network
CentOS7.0 network configuration
CentOS 7.0 network configuration
Solve the problem that Centos8 cannot install docker
CentOS6.5 network settings
The easiest way to install Chrome on CentOS 6
How to modify the CentOS server time to Beijing time
Centos7 modify the system language to simplified Chinese
The tutorial for upgrading from Centos7 to Centos8 (detailed graphic)
CentOS 7 system to view the system version and machine digits
What are the methods for python to connect to mysql
Solution to the slow speed of ubuntu18.04 wireless network
Install centos7 and connect
Linux Network Foundation (CentOS7)
Centos 6.4 python 2.6 upgrade to 2.7
Centos 6.4 python 2.6 upgrade to 2.7
CentOS6.5 upgrade kernel to 3.10.28
CentOS 5 to CentOS 5.8 YUM source
CentOS 7 network settings --- connectivity
Xshell and Xftp fail to connect to the virtual machine Ubuntu
How to configure NTP to join the NTP pool project in CentOS
How to support TL-WDN7200H wireless USB network card in CentOS8?
How to set or modify the time zone in CentOS 8
Ubuntu 18.04 uses elastic network card to configure multiple external network IP