OpenStack的网络

网络类型有local,flat,vlan,vxlan。这些不同网络类型的实现借助于network driver,比如Linux Bridge和Open vSwitch。环境搭建需要多个网卡,控制节点或网络节点需要一个打通外网(集群外)的网卡。

local

local网络不支持跨节点,所有网络内的虚拟机通过bridge联通。bridge不会通过网卡对外通讯。

Linux Bridge – local

flat

flat网络和物理网卡一对一绑定。不存在一个物理网卡能支持多个flat网络的情况。flat可以跨节点。

每一个flat 网络都有一个dhcp服务,实际上是在网络控制节点上的一个独有的dnsmasq进程,每个进程独占一个网络namespace, 以便为某个flat网络单独服务。通过veth pair和flat bridge相连,打通两个namespace。

创建flat网络实例,openstack会根据该flat网络的设置分配一个port 包括ip和mac,并被dhcp获取,nova会给vm VIF虚拟网卡分配这个mac。获取ip的过程是这样的,dhcp进程通过虚拟网卡对监听到实例启动,vm会发广播到整个flat网络,dhcp的虚拟网卡会监听到,dhcp根据自己的host文件和mac查询到对应信息,然后分配ip子网掩码和地址租用期限。不同计算节点上的实例可以互相通信,每个节点上的bridge名称是一样的,每个flat网络绑定独占一个网卡。

Linux Bridge – flat

vlan

一个物理网卡可以支持多个vlan。vlan可以是夸节点的,每个节点的bridge名字相同。bridge通过vlan网口eth1.100与物理网卡联通。不同vlan可以通过路由router互通,可以是物理路由器,接到交换机之外,上面配置需要打通的所有vlan的网关。也可以是虚拟路由,首先建立一个虚拟网络,可以是flat类型的,通过物理网卡联通外网,存在于单独的network namespace,由veth pair打通和vlan bridge的通信。网关配置在路由到bridge的tap上。

和路由相连的所谓的外部网络,绑定一个控制节点的网卡,以后所有对外通信都通过这个网络,网络和网络之间用veth pair打通。

Linux Bridge – vlan

通过路由和相连接的外网可以设置某个vm的floating ip,floating IP 是配置在 router 提供网关的外网 interface 上的,而非 instance 中。所以路由保存有floating ip和网内ip的映射,是一种静态NAT。floating ip方便外网直接访问内网vm。

如果没有floating ip,向外的流量,路由会把内网ip转为自己的外网ip,当流量返回时,路由会找到相应的内网ip,这就是所谓的source NAT。

路由默认网关是外网网关,所有内网虚拟机访问除了内网的流量都会走向这个默认的网关。floating IP 配置到 router 的外网 interface qg-b8b32a88-03 上。

其他的比如dhcp和flat网络差不多。

Linux Bridge – vlan 路由 外网 两个内网的逻辑关系图

vxlan

由通道技术实现的虚拟网络。是基于三层网络协议实现的的二层协议。核心是vtep,一种虚拟网卡。基本思路,由vtep封装二层协议包打上vxlan标签,并用ip+udp封装,通过原始ip和终点ip打通通信。所以是一种基于网络之上的虚拟网络。

vxlan是一种虚拟二层网络,支持arp,不过在openstack中不需要广播,因为有代理会直接把ip mac的信息分享给虚拟机。

借助linux bridge 或 open vswitch可以实现vxlan。和vlan相比,vxlan适合更大规模的集群。其他的比如dhcp和router基本和vlan一样。

Linux Bridge vxlan

Security Group和FWaaS

这两种都是OpenStack的安全策略,都是通过iptables来实现的,前者是对特定虚拟机来设置的,后者是对整个定制网络的subnet指定的安全策略。可结合使用。

OpenStack LBaaS

OpenStack Loadbalance as a Service。方便搭建lb集群,默认HAProxy,可以选择其他。

需要一个lb server的虚拟机,这个lb server有一个VIP,是属于和集群(web server)相同网段的IP,在外围路由配置floating ip,这样集群外可通过floating ip访问lb。OpenStack界面支持lb的各种策略,第一次访问的策略,比如round robin,least connection,source ip。之后的session persistence策略比如source ip,http cookie,app cookie等。后两者是发送给客户端特定的cookie,比如srv,记录上次连接的server信息。

Open vSwitch

和Linux Bridge一样,Open vSwitch也可用来实现不同网络类型。不同的是,OVS有自己专有的网桥以及利用flow rule来隔离vlan,而不是Linux Bridge的veth1.100, eth1.101等vlan interface。
– br-int(integration),打通instance和其他虚拟网络设备
– br-ex(external),和网卡直连,打通和外网的通道
– br-tun(tunnel),只适用于基于tunnel技术的vxlan和GRE网络

OVS vlan


OVS vxlan

注:原创。图表来源于CloudMan

《OpenStack的网络》有470个想法

  1. Pingback: kaasajans

  2. Pingback: seloroh

  3. Pingback: ahealthynewu

  4. Pingback: gaianation

  5. Pingback: makersfinds

  6. Pingback: thestmc

  7. Pingback: marocindeed

  8. Pingback: spacesmacks

  9. Pingback: workschon

  10. Pingback: muadotho

  11. Pingback: skwpartners

  12. Pingback: transorgs

  13. Pingback: putcosales

  14. Pingback: saiyla

  15. Pingback: filigrania

  16. Pingback: lacarspotting

  17. Pingback: emrefirin

  18. Pingback: mirkurortov

  19. Pingback: avplanner

  20. Pingback: findamarket

  21. Pingback: insurplans

  22. Pingback: andylampert

  23. Pingback: fpsouthnashua

  24. Pingback: sugotogo

  25. Pingback: jamesjean

  26. Pingback: thegfxlab

  27. Pingback: johnsonwedding

  28. Pingback: caspigas

  29. Pingback: eolziwf

  30. Pingback: medicinesnorx

  31. Pingback: hairulafiz

  32. Pingback: booyahsmomma

  33. Pingback: bestpricemoving

  34. Pingback: deluxeautosales

  35. Pingback: cikgudollah

  36. Pingback: stevierock

  37. Pingback: tecavuz

  38. Pingback: seoservicesdelhi

  39. Pingback: syndesmo

  40. Pingback: larosaviola

  41. Pingback: submitwebsites

  42. Pingback: spiritartists

  43. Pingback: alyadance

  44. Pingback: dhinfra

  45. Pingback: margaretowen

  46. Pingback: ds-flow

  47. Pingback: luxiform

  48. Pingback: gearandrack

  49. Pingback: croftmanor

  50. Pingback: heuermann

  51. Pingback: alniam

  52. Pingback: scrompany

  53. Pingback: myschoolinfo

  54. Pingback: sifaligidalar

  55. Pingback: depotwines

  56. Pingback: bluegoldmarketing

  57. Pingback: tommydalton

  58. Pingback: sitetraq

  59. Pingback: snapitf

  60. Pingback: sellmineralrights

  61. Pingback: mygohotels

  62. Pingback: tokensci

  63. Pingback: fluteringtone

  64. Pingback: schreibstube

  65. Pingback: lefouineur

  66. Pingback: gestiondenegocios

  67. Pingback: imaginexmedia

  68. Pingback: drachenshop

  69. Pingback: valoriel

  70. Pingback: eidmubarakwishes

  71. Pingback: polofutar

  72. Pingback: moltenmama

  73. Pingback: edicoesabm

  74. Pingback: mseteit

  75. Pingback: bushkim

  76. Pingback: stevedekay

  77. Pingback: vastewine

  78. Pingback: execedits

  79. Pingback: scifiindia

  80. Pingback: theassetedge

  81. Pingback: wanakahomes

  82. Pingback: sommarbutik

  83. Pingback: jimhfl

  84. Pingback: salluzfoods

  85. Pingback: bionutronics

  86. Pingback: raspberrypihacks

  87. Pingback: lvalverde

  88. Pingback: buckleyk

  89. Pingback: theicecreambucket

  90. Pingback: mathewslodge

  91. Pingback: reneecascarina

  92. Pingback: peruconelmundo

  93. Pingback: thephelpsgroup

  94. Pingback: atmosphile

  95. Pingback: ceosoul

  96. Pingback: communityzap

  97. Pingback: highgearelectric

  98. Pingback: resiliens

  99. Pingback: gmchevydealer

  100. Pingback: dudukner

  101. Pingback: housebaba

  102. Pingback: vicksfabs

  103. Pingback: agapcanada

  104. Pingback: infoadicciones

  105. Pingback: ilovejay

  106. Pingback: philippeelkaim

  107. Pingback: cairnsparency

  108. Pingback: postaim

  109. Pingback: biskstudio

  110. Pingback: cefashion

  111. Pingback: latestime

  112. Pingback: ebaumsnation

  113. Pingback: sbtribalfarms

  114. Pingback: cedizmir

  115. Pingback: lucomania

  116. Pingback: sinkaltim

  117. Pingback: serioussam

  118. Pingback: mamnbeb

  119. Pingback: adlimeira

  120. Pingback: ilovemage

  121. Pingback: ecovinowines

  122. Pingback: nuttours

  123. Pingback: aselresorthotel

  124. Pingback: maidsquadtx

  125. Pingback: canseidesercool

  126. Pingback: lwthai

  127. Pingback: boominets

  128. Pingback: jinteex

  129. Pingback: saglikara

  130. Pingback: sodmgmodels

  131. Pingback: haydayhacktoolz

  132. Pingback: cialisonlinegp

  133. Pingback: giftbowtique

  134. Pingback: chzsun

  135. Pingback: coffeecertified

  136. Pingback: desnichons

  137. Pingback: seasonalshoptips

  138. Pingback: virukshamtrust

  139. Pingback: calimercado

  140. Pingback: kuwaitwebinfo

  141. Pingback: ntrfanz

  142. Pingback: mumofthreeboys

  143. Pingback: caltav

  144. Pingback: valtercasini

  145. Pingback: hetkookboek

  146. Pingback: keralatourslane

  147. Pingback: merrakech

  148. Pingback: ninjapopgrip

  149. Pingback: vanelus

  150. Pingback: genericcialisfe

  151. Pingback: andthegiraffe

  152. Pingback: cranfordhairco

  153. Pingback: imwrks

  154. Pingback: aldarakuae

  155. Pingback: zeneventsja

  156. Pingback: homembt

  157. Pingback: tidyweekender

  158. Pingback: rightcoastranch

  159. Pingback: classfaqs

  160. Pingback: sikaikhabar

  161. Pingback: portalsituspoker

  162. Pingback: hyperkast

  163. Pingback: greaterkakinada

  164. Pingback: pdftoget

  165. Pingback: lahoreview

  166. Pingback: aragonya

  167. Pingback: snywlt

  168. Pingback: carasello

  169. Pingback: lapioo

  170. Pingback: lsdmuzic

  171. Pingback: jiaqi100

  172. Pingback: stephensng

  173. Pingback: theallegromovement

  174. Pingback: hyo-kin

  175. Pingback: jhrollover

  176. Pingback: frderoubaix

  177. Pingback: eastendprints

  178. Pingback: netformation

  179. Pingback: gbsmelaka

  180. Pingback: autumnimports

  181. Pingback: vedspace

  182. Pingback: lespitchousvoyagent

  183. Pingback: dramaindoxxi

  184. Pingback: viagzaibis

  185. Pingback: spartzmedia

  186. Pingback: fifa55hot

  187. Pingback: myprimevideotv

  188. Pingback: africannuaire

  189. Pingback: proevalua

  190. Pingback: sinjambi

  191. Pingback: oleotek

  192. Pingback: toptenofworld

  193. Pingback: emiratesphonenumber

  194. Pingback: synchroltd

  195. Pingback: profmaison

  196. Pingback: victorytelemedicine

  197. Pingback: edcialistop

  198. Pingback: luxpetco

  199. Pingback: celestebarcelona

  200. Pingback: dcrespond

  201. Pingback: anniebowco

  202. Pingback: surveier

  203. Pingback: tucamiseta

  204. Pingback: protozoaweb

  205. Pingback: novaapk

  206. Pingback: katalog-nasa

  207. Pingback: surfray

  208. Pingback: tvamazontv

  209. Pingback: rechanma

  210. Pingback: bitencore

  211. Pingback: brownfont

  212. Pingback: aegismultimedia

  213. Pingback: mt-amazon

  214. Pingback: dorichon

  215. Pingback: fildupuis

  216. Pingback: manbirsandhu

  217. Pingback: patelshopping

  218. Pingback: silifkeli

  219. Pingback: pagiaphat

  220. Pingback: holdingsahara

  221. Pingback: raulpastor

  222. Pingback: lakshmiprecastinn

  223. Pingback: vndsnkr

  224. Pingback: neilizur

  225. Pingback: mafhum-tech

  226. Pingback: dewapokerplay

  227. Pingback: stargiochi

  228. Pingback: srsearthing

  229. Pingback: chicagonano

  230. Pingback: chloroquinepack

  231. Pingback: dubai-developer

  232. Pingback: kucing-kelabu

  233. Pingback: photonaix

  234. Pingback: nosuvia

  235. Pingback: intellectivetech

  236. Pingback: celebritysweatnelly

  237. Pingback: lysj8

  238. Pingback: smefaculty

  239. Pingback: ainhoaart

  240. Pingback: tvmyprime

  241. Pingback: ahuela

  242. Pingback: agencemdc

  243. Pingback: obxpubcrawl

  244. Pingback: jetskilakehavasu

  245. Pingback: nguyenthinhaudio

  246. Pingback: homestorymarket

  247. Pingback: m-nortoncomsetup

  248. Pingback: paoaowjaisai

  249. Pingback: uppicfree

  250. Pingback: cassademaria

  251. Pingback: khangsneakers

  252. Pingback: kit963

  253. Pingback: sockeye-camp

  254. Pingback: viagrapoi

  255. Pingback: capilarspain

  256. Pingback: legitkushsuppliers

  257. Pingback: mobilestatstracker

  258. Pingback: fieldenergyllc

  259. Pingback: newcarlights

  260. Pingback: cialischeaponlinegt

  261. Pingback: ouchaz

  262. Pingback: redbasement

  263. Pingback: srankhala

  264. Pingback: asoonkhoon

  265. Pingback: pubspaces

  266. Pingback: ugibilisim

  267. Pingback: antsevak

  268. Pingback: lczbic

  269. Pingback: jacobperlowhospice

  270. Pingback: stanthonyshyd

  271. Pingback: otohortumdunyasi

  272. Pingback: mnfvtc

  273. Pingback: smithlevi

  274. Pingback: kit963

  275. Pingback: odt-pbj

  276. Pingback: sadlifebox

  277. Pingback: federalspare

  278. Pingback: malatyaneykursu

  279. Pingback: vfokus

  280. Pingback: theallegromovement

  281. Pingback: vgrspain

  282. Pingback: livechatklub4d

  283. Pingback: rcnutricion

  284. Pingback: arananeu

  285. Pingback: blincville

  286. Pingback: lipitormed

  287. Pingback: cagdasck

  288. Pingback: coprintpromo

  289. Pingback: viagrahuupup

  290. Pingback: cialisgrn

  291. Pingback: purplesagedesigns

  292. Pingback: villahomeinteriors

  293. Pingback: sockeye-camp

  294. Pingback: thedreamboxshop

  295. Pingback: lindblomgd

  296. Pingback: owendemocrats

  297. Pingback: expologtech

  298. Pingback: indian-superstar

  299. Pingback: cineseriestv

  300. Pingback: stkhaberleri

  301. Pingback: tadalafilalt

  302. Pingback: konanatural

  303. Pingback: njbulk

  304. Pingback: thecreagent

  305. Pingback: getesionow

  306. Pingback: nevaktar

  307. Pingback: basignon

  308. Pingback: doctordomson

  309. Pingback: getvviagragets

  310. Pingback: roundclip

  311. Pingback: soccerprorc

  312. Pingback: columbiagorgebnb

  313. Pingback: lutaniccreations

  314. Pingback: belgiansaison

  315. Pingback: tomcatmining

  316. Pingback: grieftheunspoken

  317. Pingback: ticklast

  318. Pingback: mytableq

  319. Pingback: sfmlondon

  320. Pingback: mysummervilleford

  321. Pingback: blueskydigi

  322. Pingback: mercedescsi

  323. Pingback: greenglobestaffing

  324. Pingback: gcclcareers

  325. Pingback: harbenpumps

  326. Pingback: tosseldorf

  327. Pingback: lamaisondemma

  328. Pingback: udecoder

  329. Pingback: tenzingnorgaymtb

  330. Pingback: ecrgrup

  331. Pingback: siefertmurphy

  332. Pingback: winstonmalta

  333. Pingback: fargovn

  334. Pingback: bcapalt

  335. Pingback: talcottcenter

  336. Pingback: jmlcomputers

  337. Pingback: sardstudios

  338. Pingback: sedfab

  339. Pingback: freedomqdro

  340. Pingback: guiacinefila

  341. Pingback: hiteauto

  342. Pingback: fermomia

  343. Pingback: fredmarvin

  344. Pingback: triplenickles

  345. Pingback: tildesheim

  346. Pingback: ctfohempcbd

  347. Pingback: sinspi

  348. Pingback: motobc

  349. Pingback: estatesdelray

  350. Pingback: bucumarket

  351. Pingback: cambridgeauto

  352. Pingback: fibuilders

  353. Pingback: visionitgroup

  354. Pingback: drivingmama

  355. Pingback: transcapins

  356. Pingback: caldreamapp

  357. Pingback: calmission

  358. Pingback: tuinvlangdh

  359. Pingback: debagliano

  360. Pingback: designinator

  361. Pingback: comunidadmh

  362. Pingback: leblogfm

  363. Pingback: aptarismrm

  364. Pingback: dmealliance

  365. Pingback: eurorumo

  366. Pingback: danbloom

  367. Pingback: requeil

  368. Pingback: einspurauto

  369. Pingback: acukinetics

  370. Pingback: doodadsinc

  371. Pingback: ascarov

  372. Pingback: vetteleader

  373. Pingback: dapasten

  374. Pingback: autodealsva

  375. Pingback: hpalmyros

  376. Pingback: alicecassidy

  377. Pingback: thocbdc

  378. Pingback: gestdom

  379. Pingback: bibleclues

  380. Pingback: hapustahl

  381. Pingback: corkcityyoga

  382. Pingback: techieva

  383. Pingback: pedsbif

  384. Pingback: postrom

  385. Pingback: eccucourse

  386. Pingback: laeamerica

  387. Pingback: boekstuk

  388. Pingback: mehrhost

  389. Pingback: juragon

  390. Pingback: tsilifeline

  391. Pingback: sagerllp

  392. Pingback: wewebla

  393. Pingback: aviurban

  394. Pingback: eklandia

  395. Pingback: sisdrog

  396. Pingback: encweddings

  397. Pingback: motorloaf

  398. Pingback: selectakaza

  399. Pingback: toruseurope

  400. Pingback: ncgrassfed

  401. Pingback: surfmorocco

  402. Pingback: jasonlinphoto

  403. Pingback: aiawyoming

  404. Pingback: segurosblog

  405. Pingback: saunasmith

  406. Pingback: baugeraete

  407. Pingback: brassmedia

  408. Pingback: actiocloud

  409. Pingback: supracables

  410. Pingback: simairway

  411. Pingback: reinery

  412. Pingback: ibmwsc

  413. Pingback: osbornenash

  414. Pingback: weareguthrie

  415. Pingback: notairegranby

  416. Pingback: blusealdoors

  417. Pingback: granne

  418. Pingback: qubacafe

  419. Pingback: stephenemay

  420. Pingback: berkleypak

  421. Pingback: fethiyemap

  422. Pingback: nanopose

  423. Pingback: delmarballet

  424. Pingback: erisfilms

  425. Pingback: flirtwithmen

  426. Pingback: sensepeanut

  427. Pingback: frankboddy

  428. Pingback: saveorpave

  429. Pingback: peggymyer

  430. Pingback: pariswin

  431. Pingback: feastdesign

  432. Pingback: onedayonefilm

  433. Pingback: bifudo

  434. Pingback: midtnbiz

  435. Pingback: hollymackler

  436. Pingback: destinydeal

  437. Pingback: montananest

  438. Pingback: polargy

  439. Pingback: hostelprague

  440. Pingback: carloscurbelo

  441. Pingback: niubvnp

  442. Pingback: blitzbarpdx

  443. Pingback: radassure

  444. Pingback: peggymayer

  445. Pingback: joshwoodward

  446. Pingback: sugiftofhope

  447. Pingback: sarksofrasi

  448. Pingback: swissneth

  449. Pingback: chscbd

  450. Pingback: cedartownchat

  451. Pingback: zoppecircus

  452. Pingback: oetopia

  453. Pingback: toisondeoro

  454. Pingback: palcapital

  455. Pingback: uticajobs

  456. Pingback: adecorar

  457. Pingback: wilfredagroup

  458. Pingback: painmm

  459. Pingback: usephoenix

  460. Pingback: oasouth

  461. Pingback: cschneebeck

  462. Pingback: amettis

  463. Pingback: lumistor

  464. Pingback: samangus

  465. Pingback: dieselusa

  466. Pingback: raphaelcruz

  467. Pingback: loadiq

  468. Pingback: hydrometry

  469. Pingback: predaktor

  470. Pingback: houseoftablas

发表评论