In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shares with you the content of an example analysis of the virtual machine bridging mode of the Centos 7 system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The host ping is not accessible to the ip of virtual machine centos7 systems for the following reasons:
1. The host corresponds to the centos7ip segment (the key is to correspond to the gateway and dns server one by one. For more information, please see below)
2. If there is still no connection after the corresponding, you can turn off the host and cenos7 firewall. The default firewall for centos7 is firewall, which is different from centos6.
Related commands:
Systemctl stop firewalld.service # stop firewallsystemctl disable firewalld.service # disable firewall boot
3. If all the above settings still fail, you can enter arp-an in the cmd of the host to check whether the mac ip bound by the gateway is the same as if you set the ip in the virtual machine. Modify the ip address in the virtual machine to ping.
Configuration of connecting external network in virtual machine centos7
First, set the connection mode of the virtual machine to bridge
Open the virtual machine, click "Edit"-"Virtual Network Editor" and click "change Settings" to see the bridge mode, in which there are multiple bridge mode options, here you can choose between Ethernet-based or wireless LAN. The ip address of the virtual machine should correspond to the ip segment of the Ethernet or wireless network you choose (that is, the first three parts of the ip address should be the same).
Click "Virtual Machine"-"Settings" and select "Bridge Mode" in "Network Adapter".
2. Enter the centos7 system of the virtual machine and modify the ip of centos7
1 、 cd / etc/sysconfig/network-scripts/
2. Ifcfg-ens33 appears here in ls, which may be different from machine to machine.
3 、 vi ifcfg-ens33
Host: ip:192.168.111.46 Gateway: 192.168.111.1
4. Wq save exit
5. Systemctl restart network.service restarts network
6. At this time, you can test whether the host can ping the virtual machine and whether the virtual machine can ping the extranet.
3. If the above cannot be connected to the Internet, then configure dns.
1. Nmcli connection show displays the currently connected network
If it is not shown, no network connection is currently established. You need to activate ens33 and up.
2. Modify the DNS server corresponding to the current network connection. The network connection can be identified by name or UUID.
Nmcli con mod ens33 ipv4.dns "114.114.114.114 8.8.8.8" here 114.114.114.114 and 8.8.8.8 are widely used in China, but if it is an enterprise LAN dns, it may be different. You can open the "Network sharing Center" in the host computer.
Click on the connected Ethernet or wireless network, and open "details". There will be "IPv4 DNS server" to copy it and replace it in the above command.
114.114.114.114 and 8.8.8.8
3. Make the dns configuration effective nmcli con up ens33
4. Systemctl restart network.service restarts network
At this point, you can connect to the external network.
Thank you for reading! This is the end of the article on "sample Analysis of Centos 7 Virtual Machine bridging Mode". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.