In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "OPENSTACK open source virtualization KVM example analysis of network settings", the content is easy to understand, clear, hope to help you solve your doubts, the following let Xiaobian lead you to study and learn "OPENSTACK open source virtualization KVM in the example analysis of network settings" this article.
Bridge construction
If the kvm virtual machine is installed in the local area network, in order to facilitate connection, maintenance and management, we recommend using Bridge mode (in addition, NAT mode) for the network mode of the kvm virtual machine, so that the kvm virtual machine and the host are on the same network segment, and other hosts in the local area network are directly connected.
1. View host Nic information
Ip an or ifconfig a
Generally, the name of the physical network card starts with eth0, eth2 or ens, and so on. The name on my computer is ens33.
Copy the ens33 Nic configuration file to the br0 file
Cd / etc/sysconfig/network-scripts/
Cp ifcfg-ens33 ifcfg-br0
two。 Host physical network card configuration
Vim ifcfg-ens33
Bridge network card configuration
Vim ifcfg-br0
Restart the service
[root@localhost network-scripts] # service network restart
[root@localhost network-scripts] # brctl show
If you check the figure above, the bridge has been created successfully.
Finally, the network card type is set in the virtual machine
Assign an IP of the same network segment, so that the inner-outer-network can access each other.
PS:
After installing KVM, you will find that there is a virtual network interface called virbr0 in the network interface:
This is generated after the system is installed and the libvirt service is enabled, libvirt generates a virtual network switch (virbr0) on the server (host), and all the virtual machines (guests) on the host are connected by this virbr0. By default, virbr0 uses NAT mode (using IP Masquerade), so in this case guest can only access the outside through host.
Virbr0 is a Bridge created by KVM by default, and its function is to provide NAT access to the external network for the virtual machine network card connected to it.
Virbr0 assigns an IP 192.168.122.1 by default and provides DHCP services for other virtual network cards connected to it.
Most of the time, virtual machines use bridge (bridge) to connect directly to the local area network, so this virbr0 is not necessary. (note: don't get confused, bridge and virbr0 bridge here are irrelevant)
You can delete virbr0 without affecting KVM's network.
The above is all the contents of the article "sample Analysis of Network Settings in OPENSTACK Open Source Virtualization KVM". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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
Getting StartedInstall the Go toolsTest your installationUninstalling GoGetting helpYour download sh
© 2024 shulou.com SLNews company. All rights reserved.