In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how centos7 can not surf the Internet after modifying the network card. What is introduced in this article is very detailed and has a certain reference value. Interested friends must finish reading it!
Ping www.baidu.com unknown domain name
Modify host ip address
Right-click attribute
Select attribute
This option was originally obtained automatically and may change later, so choose a fixed ip. This ip can be obtained by entering ipconfig in the cmd window of the win10 host:
It is said on the Internet that the ip in the virtual machine should be consistent with the physical host, but there is really no consistency here.
Virtual machine network configuration
Open the virtual network editor.
The ip address entered in the first place should be the same as the win10 host configuration above. Enter 0 in the fourth field, otherwise it conflicts with the mask. Enter 1 and 2 in the fourth field of the subnet gateway (DNS).
Select DHCP. Finally.
Configure the ifcfg-ens33\ eth0 network card
At first, my network card was ens33 (centos7 is the network card that begins with ens and centos6 is the beginning of eth). Because of the problem with vcs license, I changed my name to eth0. Be careful! If you use the eth0 network card, be sure to make the ens33 network card mv as other files, because the system will traverse these files when the system starts, resulting in that if you configure ipaddr0 in ens33, you will give priority to using this ipaddr0; and finally see metaphysical phenomena such as ipaddr=ipaddr0 of eth0 in ifconfig.
There is no need to manually add any ipaddr, mask, gateway addresses here! (I added it, but I didn't use it in the end)
If ipaddr is not entered, the system will be assigned by default, ipaddr=169.254.199.128, which is assigned by DHCP.
Ping, this ipaddr, can receive data indicating that ip can be used.
Ping, the subnet gateway (DNS), can receive data, indicating that DNS can be used.
However, after configuring the virtual machine, the DNS is often ping and needs to be restarted / reboot.
The reason is that the file of / etc/resolv.conf has not been updated, and it is still the previous DNS. The following figure shows the file after reboot, and you can see that dns has been updated. Ping, this dns is passed.
Ping www.baidu.com
Ok, you can surf the Internet!
These are all the contents of the article "what to do if you can't surf the Internet after centos7 modifies the network card". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.