In our OpenStack learning, the network component neutron is undoubtedly very difficult for many people to understand, can be said to understand deeply
The neutron component, you basically completed the OpenStack 60% learning, storage aspects as long as the distribution is not involved, the rest of the basic is relatively simple
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8C/2A/wKioL1hkfNax-VLLAAPyr5atlEM580.png "title=" 156. PNG "alt=" Wkiol1hkfnax-vllaapyr5atlem580.png "/>
I believe many people will be startled when they first see this kind of diagram, yes, this is the data flow involved in the OpenStack neutron component, which involves a lot of knowledge.
Several conceptual networks in the OpenStack network model:
Management Network: Manage networks and connect all nodes. External Network: External networks, where virtual machines connect to the external network data network: a virtual machine network that provides communication between internal data lines.
Here the construction process is skipped, you can refer to the previous written version of the L build process, this environment is as follows, a control node and a compute node
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8C/2A/wKioL1hkffKToSySAACJQK_92G8629.png "title=" 1.png " alt= "Wkiol1hkffktosysaacjqk_92g8629.png"/>
Above is the control node, three card
eno1777736 10.10.80.133 as an external network
eno33554960 10.10.10.130 as a management network
eno50332184 as a virtual machine network
The supported network types have flat VLAN Vxlan GRE and these are specifically implemented by Linux Bridge and Openvswitch
Here we use the Linux Bridge to implement the flat network as an example, the other basically similar, more content can refer to the official documentation, it is interesting in the latest version N, the official has provided the ansible to deploy OpenStack instructions
Flat network, as the name implies is a flat network, requires the host's physical network card directly with the Linux Bridge connection, each flat network will monopolize a physical network card, the key parameters are configured as follows
[Email protected] ~]# Vim/etc/neutron/plugins/ml2/ml2_conf.initenant_network_types = flat [Ml2_type_flat] Flat_ Networks = Martin_flat #这个名字自定义 [[email protected] ~]# Vim/etc/neutron/plugins/ml2/linuxbridge_agent.ini Physical_ Interface_mappings = martin_flat:eno50332184 #名字保持与上面一样, followed by flat NIC name
We open dashboard to create the first flat network
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8C/2A/wKioL1hkgHTzm65lAADL4OHA-SM535.png "title=" 1.png " alt= "Wkiol1hkghtzm65laadl4oha-sm535.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8C/2E/wKiom1hkgJSzs7_4AADqnb1tT6s447.png "title=" 1.png " alt= "Wkiom1hkgjszs7_4aadqnb1tt6s447.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8C/2E/wKiom1hkgLuhvselAAA-LZWVx18731.png "title=" 1.png " alt= "Wkiom1hkgluhvselaaa-lzwvx18731.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/2E/wKiom1hkgNjC9StPAADijP9Tpu8076.png "title=" 1.png " alt= "Wkiom1hkgnjc9stpaadijp9tpu8076.png"/>
Next, observe what happens to these operations on the server.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/2E/wKiom1hkgSSDp7q5AABjKZAOXYc091.png "title=" 1.png " alt= "Wkiom1hkgssdp7q5aabjkzaoxyc091.png"/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8C/2B/wKioL1hkgULTFmnIAABx_1ro5OQ268.png "title=" 2.png " alt= "Wkiol1hkgultfmniaabx_1ro5oq268.png"/>
Next we create the first virtual machine and associate it to the flat network.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8C/2E/wKiom1hkgaSy5LQ-AACCxoyhAfs664.png "title=" 1.png " alt= "Wkiom1hkgasy5lq-aaccxoyhafs664.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8C/2E/wKiom1hkgbDhGlLmAABdMtaP3x4079.png "title=" 2.png " alt= "Wkiom1hkgbdhgllmaabdmtap3x4079.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8C/2B/wKioL1hkgbvwf4uCAAA98-_cRxY901.png "title=" 3.png " alt= "Wkiol1hkgbvwf4ucaaa98-_crxy901.png"/>
Observing the change of the compute nodes
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8C/2B/wKioL1hkggbzE4fjAABQzD3DAS8838.png "title=" 1.png " alt= "Wkiol1hkggbze4fjaabqzd3das8838.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/2E/wKiom1hkghKBBz5iAACTzg0zUNQ575.png "title=" 2.png " alt= "Wkiom1hkghkbbz5iaactzg0zunq575.png"/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8C/2B/wKioL1hkginwT16mAAAeCR3nUKg594.png "title=" 3.png " alt= "Wkiol1hkginwt16maaaecr3nukg594.png"/>
DHCP functionality
Neutron the component that provides the DHCP service is the DHCP agent, which runs on the network node, and by default it is implemented by the DNSMASQ DHCP function
Configuration file in
[Email protected] ~]# Vim/etc/neutron/dhcp_agent.ini
Interface_driver = Neutron.agent.linux.interface.BridgeInterfaceDriver
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8C/2E/wKiom1hkgqmgPZBkAABX9OIWR7c755.png "title=" 1.png " alt= "Wkiom1hkgqmgpzbkaabx9oiwr7c755.png"/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8C/2B/wKioL1hkgrfSrjHlAAAoon7uFjU031.png "title=" 2.png " alt= "Wkiol1hkgrfsrjhlaaaoon7ufju031.png"/>
ns-26782a82-61 and tap26782a82-61 are pair of Vethpair, they will 9225f654-522b-478e-80bc-06bf2948cd08 connected to the bridge brq9225f654-52 above
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8C/2B/wKioL1hkgsLBoZ-HAACH4K3ABdE060.png "title=" 3.png " alt= "Wkiol1hkgslboz-haach4k3abde060.png"/>
These are just the basics of OpenStack neutron network components, the content is too much, involving a lot of knowledge points such as Liunx Bridge tap device Virtual to namespace openvswitch Virtual Switch virtual router Iptables High-availability DVR and so on, including I have a lot of things to learn, but you do not have to fear, from the simplest learning, learned one, others you can imitate should also learn
Finally, we will look at the Vxlan network built through Openvswith, two virtual machine communication process, interested can go into the
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8C/2F/wKiom1hkhJqi3kCaAABhK8gYTHk423.png "title=" 1.png " alt= "Wkiom1hkhjqi3kcaaabhk8gythk423.png"/>
Openvswitch Flow Table Structure
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8C/2B/wKioL1hkhMmgOF4BAAB482pgT1E538.png "title=" 1.png " alt= "Wkiol1hkhmmgof4baab482pgt1e538.png"/>
This article from "Thick tak" blog, declined reprint!
Introduction to OpenStack M version neutron networking components Basics