当前位置:网站首页>Openstack network
Openstack network
2022-06-12 12:52:00 【Sleepy snail】
Network module Neutron
Two kinds of ip, Five topologies , Three networks
The abstract way of two-layer switch :Linux bridge perhaps Open vSwitch
Linux bridge Virtual network equipment working on the second layer , The function is similar to that of a physical switch ( The following figure br0)

Open vSwitch It can also realize the abstraction of layer-2 network , But the function is more than that
Virtual router It is an abstraction of network devices , The implementation principle is consistent with that of a real router , Forwarding packets according to the routing table , It also supports NAT Address translation and floating ip Address settings
The layer-2 network isolates the tenant network through the virtual LAN
The three-layer network is isolated by namespace
Namespace Each namespace has its own independent network stack , Including routing table 、 Firewall rules 、 Network interface, etc , Network addresses of different namespaces are allowed to overlap
float ip The virtual router will be enabled SNAT function ,SNAT Is to share a IP Access lnternel
But enabled NAT After function , Only virtual machines can access external networks , But it prevents the external network from accessing the virtual machine , Can pass NAT Address mapping realizes external network access to internal virtual machines through target address translation , To configure NAT Address mapping requires configuring the corresponding external network address pool on the external interface of the virtual router , The addresses in these address pools are floating ip Address , If the virtual machine does not require external network access , Floating can be unbound ip
Local The Internet
No physical network card is bound , The same local The virtual machines of the network are connected to the same virtual switch , Instances can communicate , Different local Cannot communicate with . The figure below vm1 and vm2 Can communicate ,vm3 Cannot be associated with vm1 perhaps vm2 signal communication

Flat The Internet
Every flat The network is exclusive ip Address , All virtual machines in this network share a private ip Network segment
vm1 and vm2 Connect Linux bridge1, The two can communicate with each other and through ens2 Visit the Internet

One Flat The Internet
The tenant's network is restricted to virtual switches 1、2、3 in

vlan The Internet
There is 4096 Limitations of virtual LANs ,
vxlan The Internet
Tunnel technology is used , The number of tenants from 4096 To 16777216 individual , Tenant internal communication can span any ip The Internet
New network : Create at the administrator public Build new... In the project private
New route : Connect the above two networks , New routes are enabled by default SNAT function
New instance : binding private, Opening an instance cannot ping Tongbaidu
When creating an external network , The specified external network gateway address is 172.16.1.1, Then the gateway needs to exist
perform
ifconfig br-ex 172.16.1.1 netmask 255.255.255.0 up![]()
The host machine br-ex Used to connect to OpenStack virtual network , Virtual network access to the Internet must pass through the real network card of the host computer , The host machine in br-ex There are three ways to forward traffic with a real network card
traditional method : Add the physical network card to br-ex bridge , Cancel the physical network card configuration ip Address , To configure br-ex( You don't succeed )
2、 Enable the routing function of the host , Forward data by routing , At the same time, configure the loop route of the host
3、 Configure the NAT function , Forward data through routing and address translation , No packet return routing is required , There is no need to modify the existing network segment ( success )
Use the third method , Add one nat The rules , In order to prevent the rule from disappearing after restart , Can be written to iptables In profile , Be careful enp0s3 You need to use your own physical network card
iptables -t nat -A POSTROUTING -s 172.16.1.0/24 -o enp0s3 -m comment --comment "000 nat" -j MASQUERADE
Bind float ip Address

The virtual router created by default starts by default after connecting to the external network SNAT function , If you visit NAT The network behind the device , Need configuration NAT Mapping or target address translation implementation , That is, you need to configure the float ip Address


Add security group rule
Some scattered knowledge :
1、 If you do not want the virtual machine of the network to access other networks through the network , You can check disable gateway
2、DNS The address setting is usually true DNS Server address
3、 After connecting the two interfaces, the router will forward data between the networks where the two interfaces are located
边栏推荐
- 一个ES设置操作引发的“血案”
- When to use binary search
- Mui login database improvement and Ajax asynchronous processing [mui+flask+mongodb+hbuilderx]
- 提升管道效率:你需要知道如何识别CI/CD管道中的主要障碍
- In depth anatomy of C language - key words & supplementary contents
- C语言进阶篇——浮点型在内存中的存储
- Buu question brushing record - 7
- ITK multi-stage registration
- About paiwen
- Tuples, arrays, and as const of typescript
猜你喜欢

Array -- seven array topics with double pointer technique

Bitmap, bloom filter and hash sharding

Iterator, generator generator details

嵌入式系统概述3-嵌入式系统的开发流程和学习基础、方法

Time series database - incluxdb2 docker installation

深度学习的多个 loss 是如何平衡的?

442 authors, 100 pages! It took Google 2 years to release the new benchmark big bench | open source

Embedded system hardware composition - embedded system hardware architecture

Safety KNN

Advanced C language -- storage of deep anatomical data in memory (with exercise)
随机推荐
Jacobian matrix IK of manipulator
深度剖析指针的进阶——C语言的进阶篇
C语言进阶篇——万字详解指针和qsort函数
Structure matérielle du système embarqué - introduction du Conseil de développement embarqué basé sur arm
中科物栖CEO张磊:“芯片+OS”范式在万物互联时代的机遇与挑战|量子位·视点分享回顾...
R语言ggplot2可视化:使用ggrepel包在线图(line plot)的尾端那个数据点添加数值标签(number label)
Introduction and test of MySQL partition table
ITK 多阶段配准
Source of routing information
检测vector是否有交集
R语言可视化分面图、假设检验、多变量分组t检验、可视化多变量分组分面条形图(faceting bar plot)并添加显著性水平、添加抖动数据点(jitter points)
安全KNN
Soft test network engineer notes
【数据库】navicat --oracle数据库创建
Buu question brushing record - 6
Share PDF HD version, series
Known as the next generation monitoring system! See how awesome it is
[you code, I fix] whitesource was officially renamed mend
Advanced C language -- storage of deep anatomical data in memory (with exercise)
ITK Examples/RegistrationITKv4/DeformableRegistration