Ping www.baidu.com unknown domain name Modify the host ip address Right click properties Select Attributes This option was originally obtained automatically and may change later, so choose a fixed IP. This IP is obtained by entering ipconfig in the cmd window of the win10 host: It is said on the Internet that the IP address in the virtual machine must be consistent with that of the physical host, but mine is indeed not consistent. Virtual machine network configuration Open the Virtual Network Editor. The IP address filled in the first place should be consistent with the win10 host configuration above. The fourth field is filled with 0, otherwise it conflicts with the mask. The fourth field of subnet gateway (DNS) can be filled with 1 or 2. Select DHCP. Finally confirmed. Configure ifcfg-ens33 \ eth0 network card At first, my network card was ens33 (centos7's network card starts with ens, and centos6's network card starts with eth). Due to vcs license issues, I changed its name to eth0. Notice! If you use the eth0 network card, be sure to mv the ens33 network card to other files, because these files will be traversed when the system starts. As a result, if ipaddr0 is configured in ens33, this ipaddr0 will be used first; finally, you will see the metaphysical phenomenon of eth0's ipaddr=ipaddr0 in ifconfig. There is no need to manually add any ipaddr, mask, or gateway addresses here! ! ! (I added it, but it was not used in the end) If ipaddr is not filled in, the system will assign ipaddr=169.254.199.128 by default, which is assigned by DHCP. Ping this ipaddr, and you can receive data, indicating that the ip is usable Ping the subnet gateway (DNS), and you can receive data, indicating that DNS is available. However, after configuring the virtual machine, the DNS often cannot be pinged and needs to be restarted/rebooted. The reason is that the /etc/resolv.conf file has not been updated and is still the previous DNS. The picture below shows the file after restart. You can see that the DNS has been updated. Ping this dns passed. ping www.baidu.com Ok, you can go online now! Of course, you don't have to restart, but there will be more steps, which I will not go into here. This is the end of this article about how to solve the problem of centos7 being unable to access the Internet after modifying the network card. For more relevant content about centos7 being unable to access the Internet, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: HTML code to add icons to transparent input box
>>: HTML+CSS to achieve simple navigation bar function
Table of contents 1. One-way value transfer betwe...
1. Download the installation script - composer-se...
The position property The position property speci...
swarm three virtual machines 132,133,134 1. Initi...
1. Software Download MySQL download and installat...
Demand scenario: The boss asked me to use the cra...
Table of contents 1. Global beforeEach 1. Global ...
1. docker ps -a view the running image process [r...
Table of contents 1. Basic event handling 2. Send...
This article introduces how to create an index on...
Preface If someone asks you "What are the ch...
A root routing component (the root routing compon...
1. Install MySQL (1) Unzip the downloaded MySQL c...
At first, I wanted to modify the browser scroll b...
1. Experimental description In the virtual machin...