際際滷

際際滷Share a Scribd company logo
[OpenStack]
OpenStack Networking with Neutron
蟾讌
yeswldms@gmail.com
What is Network NameSpace?


ろ語 蟯 ろ  isolation 螻
螳螳 Network Device, IP address, IP routing tables, /proc/net directory, port numbers
What is VLAN Tagging?


2螻豸 れ豺 螳    企 VLAN 語 れ朱 VID 覲伎  覦
 伎 蟯覲企ゼ tagging
 ろろ  螳 Compute Node  るジ 語ろ伎るり 碁曙
What is GRE?
 GRE port in OVS
OVS lays finishing of GRE packet encapsulation on networking stack.
 ろろ  るジ Compute Node  るジ 語ろ伎るり 碁曙
Network Guide
 Network Connectivity Physical Hosts
Management Network
OpenStack Components 螳 企 旧
Data Network
VM Data 螳 旧, IP  
API Network
OpenStack API, Netwoking API 螳 旧 螻
External Network
VM 碁郁屋
Lab Test
Controller
node
eth0
Network
node
eth0
Compute
node x
eth0
eth1 eth2 eth1
Management Network + API Network : 10.0.0.0/24(NAT)
Data Network : 10.0.1.0/24External Network : 192.168.1.0/24
GW : 192.168.1.254
Network Topology (demo)
ext-net
external network
192.168.1.0/24
demo-net tena
nt1, internal net
work
192.168.100.0/24
demo-net2 ten
ant2, Internal n
etwork
192.168.101.0/24
External Network
192.168.1.0/24
Tenant 1 Tenant 2
Lab Test  Too Much Detail
 VLAN & GRE
Compute Node
Network Node
test1 test2 test3 test4
qbr x qbr x
eth 0 eth 0
vnet0 vnet1
br-int
br-tun
qvb x qvb x qvb x qvb x
qvo x qvo x qvo x qvo x
br-int
br-
tun
eth 1 eth 1
br-tun
br-int
br-ex
vlan
tag: 1
Data Network
10.0.1.0/24
eth 0
Configured by L2 Agent
vlan
tag: 2
br-int
br-
tun
Configured by L2 Agent
OVS Represents the
actual bridge interface
in the Network Stack
Packet Conversion
(VLAN translation)
br-ex
phy-br-ex
int-br-ex
patch
-tun
patch
-int
patch
-tun
patch
-int
gre x gre x
dnsmasq
tap x
vla
qg x
qr x
ntag: 1
qg y
qr y
vla
tag: 2
dnsmasq
tap y
n
Configured by L3 Agent
NAT with iptables
Configured by DHCP Agent
Assigned to each subnet
Configured by DHCP Agent
Assigned to each subnet
qrouter x qrouter y
qdhcp x qdhcp y
tunneling
Configured by Nova Compute
WAN
Configured by neutron ovs plugin agent
GRE Capsulation
Packet Conversion
(GRE mode Tunnel Interface)
Configured by neutron ovs plugin agent
Just vice versa.
- qbr Quantum BRidge
- qvb Quantum Virtual Bridge side
- qvo Quantum Virtual OVS side
eth 0 eth 0
Neutron OVS SG Chain
vnet2 vnet3
qbr x qbr x
Lab Test  Too Much Detail
 VLAN & GRE  Compute Node
Compute Node
test1 test2 test3 test4
qbr x qbr x
eth 0 eth 0
vnet0 vnet1
br-int
br-tun
qvb x qvb x qvb x qvb x
qvo x qvo x qvo x qvo x
br-int
br-
tun
eth 1
vlan
tag: 1
Data Network
10.0.1.0/24
vlan
tag: 2
Packet Conversion
(VLAN translation)
patch
-tun
patch
-int
gre x
tunneling
Configured by Nova Compute
Configured by neutron ovs plugin agent
Packet Conversion
(GRE mode Tunnel Interface)
instance
TAB device
Linux bridge
veth pair
GRE Patch Port
Physical NIC
GRE port
Virtual ETHernet pair, 螳 ろ語襦 覿襴, Linux
Bridge 郁屋, Hypervisor螳 br-int bridge 郁屋
覓朱Μ NIC
Vnet0 Hypervisor企  instance vNIC
 郁屋
螳 L2 れ豺 蠍磯,  覓朱Μ/螳 NIC 郁屋
OVS
Generic Routing Encapsulation, GRE tunneling
port
Open vSwitch, 螳 れ豺 蠍磯 
eth 0 eth 0
Neutron OVS SG Chain
vnet2 vnet3
qbr x qbr x
Configured by L2 Agent
Gre 磯襷 , VLAN螻朱 磯 瑚 譟伎伎
(TBC)
Lab Test  Too Much Detail
 VLAN & GRE  Compute Node
Compute Node
test1 test2 test3 test4
qbr x qbr x
eth 0 eth 0
vnet0 vnet1
br-int
br-tun
qvb x qvb x qvb x qvb x
qvo x qvo x qvo x qvo x
br-int
br-
tun
eth 1
vlan
tag: 1
Data Network
10.0.1.0/24
vlan
tag: 2
Packet Conversion
(VLAN translation)
patch
-tun
patch
-int
gre x
tunneling
Configured by Nova Compute
Configured by neutron ovs plugin agent
Packet Conversion
(GRE mode Tunnel Interface)
eth 0 eth 0
Neutron OVS SG Chain
vnet2 vnet3
qbr x qbr x
Configured by L2 Agent
Neutron OVS SG chain
: managed Neutron Security Groups
語ろ伎れ inbound/outbound 碁曙 貉碁,
Security Groups - iptables, Linux Bridge
: OpenStack SG襯 蠍  iptables rules襯 
:  OVS iptables rule 讌 
: TAB Device Linux Bridge襯 蟇一蟆, iptables
襯 襦  覦覯朱 覲伎 螳
Linux Bridge
: 覦覯 觚襴酔
: firewall rules 誤
br-int(OVS)
: 牛觚襴酔
: 覦覯 觚襴酔 焔(qvo XXX)
: VLAN 蟆曙 碁曙 tagging/untagging 
br-tun(OVS)
: 磯觚襴酔
: br-int(牛觚襴酔)襦覿一 VLAN 蟾 碁曙
GRE 磯襦 覯
: rules  vlan id tunneling id 碁 襷牛
Lab Test  Too Much Detail
 VLAN & GRE  Network Node
Network Node
eth 1
br-tun
br-int
br-ex
Data Network
10.0.1.0/24
eth 0
br-int
br-
tun
Configured by L2 Agent
br-ex
phy-br-ex
int-br-ex
patch
-tun
patch
-int
gre x
dnsmasq
tap x
vla
qg x
qr x
ntag: 1
qg y
qr y
vla
tag: 2
dnsmasq
tap y
n
Configured by L3 Agent
NAT with iptables
Configured by DHCP Agent
Assigned to each subnet
Configured by DHCP Agent
Assigned to each subnet
qrouter x qrouter y
qdhcp x qdhcp y
tunneling
WAN
Configured by neutron ovs plugin agent
Just vice versa.
dnsmasq
Internal Port
veth pair
GRE Patch Port
Physical NIC
GRE port
Virtual ETHernet pair,
螳 ろ語襦 覿襴,
Linux Bridge 郁屋,
Hypervisor螳 br-int bridge 郁屋
覓朱Μ NIC
OVS bridges internal ports
OVS
???  蠍磯レ 覘螻,
br-int 覦 br-tun螻 るジ?
Generic Routing Encapsulation,
GRE tunneling port
Open vSwitch, 螳 れ豺 蠍磯 
Port 覿伎 DHCP 觜 螻
Network Namespace,
qrouter ~
: connection to the outside(NAT)
qdhcp ~
: dhcp service
namespace
Lab Test  Too Much Detail
Network Node
eth 1
br-tun
br-int
br-ex
Data Network
10.0.1.0/24
eth 0
br-int
br-
tun
Configured by L2 Agent
br-ex
phy-br-ex
int-br-ex
patch
-tun
patch
-int
gre x
dnsmasq
tap x
vla
qg x
qr x
ntag: 1
qg y
qr y
vla
tag: 2
dnsmasq
tap y
n
Configured by L3 Agent
NAT with iptables
Configured by DHCP Agent
Assigned to each subnet
Configured by DHCP Agent
Assigned to each subnet
qrouter x qrouter y
qdhcp x qdhcp y
tunneling
WAN
Configured by neutron ovs plugin agent
Just vice versa.
qDHCP namespace
: DHCP 覯 ろ語 namespace dnsmasq襦 
: Network namespace 語ろ語 覲螳 ろ語 ろ
(interfaces, routing tables, iptables rules) 螳讌   襴
貉る 蠍磯
: dnsmasq
qRouter namespace
: Neutron router 殊壱螻 觚血伎  殊壱
企, iptables れ network namespace
: 殊壱 蠍磯レ 
: Netfilter nat table - namespace企 殊壱一 譟伎
語ろ伎るれ floaing ip襯 豈讌
External traffic
: 碁襦 碁曙 れろ伎れ qg誤壱伎るゼ 蟆曙
br-ex襯 蟆曙
: int-br-ex port(br-int) phy-br-ex port(br-ex)襯 牛 qg襯 蟇
豺讌 螻 覦襦 螳
Lab Test  Too Much Detail
 VLAN & GRE  Network Node
NAT to host address
: 襷 br-ex蟆 public cloud襯 麹蠍  蟆危語 企るゼ れる(NAT襯 螻苦朱)
蠏碁覃 ろ語 碁 危朱ゼ 牛 external碁曙    螻 NAT襭一 燕  .
Direct network connction
: 覦襦 floating ip れ企碁 碁 ろ語 蟇磯朱
# ip addr add 172.24.4.225/28 dev br-ex
# ovs-vsctl add-port br-ex eth2
Lab Test  Too Much Detail
Controller Node
> used demo tenant
> External Network : ext-net
> Private Network : demo-net, demo-net2
> Instance : test1, test2, test3, test4
Lab Test  Too Much Detail
Compute Node - Bridges & Ports
Lab Test  Too Much Detail
Network Node - Bridges & Ports
Lab Test  Too Much Detail
Network Node  Network Namespace(qRouter, qDHCP)
Compute Node  br-tun(磯觚襴酔 table)
Lab Test  Too Much Detail
Network Node  qDHCP namespace interface
Lab Test  Too Much Detail
Network Node  qRouter namespace interface
Lab Test  Too Much Detail
 VLAN & GRE  Network Node
Network Node - qRouter namespace iptables
伎.

More Related Content

150416 OpenStack Networking with Neutron Jieun, Kim

  • 1. [OpenStack] OpenStack Networking with Neutron 蟾讌 yeswldms@gmail.com
  • 2. What is Network NameSpace? ろ語 蟯 ろ isolation 螻 螳螳 Network Device, IP address, IP routing tables, /proc/net directory, port numbers
  • 3. What is VLAN Tagging? 2螻豸 れ豺 螳 企 VLAN 語 れ朱 VID 覲伎 覦 伎 蟯覲企ゼ tagging ろろ 螳 Compute Node るジ 語ろ伎るり 碁曙
  • 4. What is GRE? GRE port in OVS OVS lays finishing of GRE packet encapsulation on networking stack. ろろ るジ Compute Node るジ 語ろ伎るり 碁曙
  • 5. Network Guide Network Connectivity Physical Hosts Management Network OpenStack Components 螳 企 旧 Data Network VM Data 螳 旧, IP API Network OpenStack API, Netwoking API 螳 旧 螻 External Network VM 碁郁屋
  • 6. Lab Test Controller node eth0 Network node eth0 Compute node x eth0 eth1 eth2 eth1 Management Network + API Network : 10.0.0.0/24(NAT) Data Network : 10.0.1.0/24External Network : 192.168.1.0/24 GW : 192.168.1.254
  • 7. Network Topology (demo) ext-net external network 192.168.1.0/24 demo-net tena nt1, internal net work 192.168.100.0/24 demo-net2 ten ant2, Internal n etwork 192.168.101.0/24 External Network 192.168.1.0/24 Tenant 1 Tenant 2
  • 8. Lab Test Too Much Detail VLAN & GRE Compute Node Network Node test1 test2 test3 test4 qbr x qbr x eth 0 eth 0 vnet0 vnet1 br-int br-tun qvb x qvb x qvb x qvb x qvo x qvo x qvo x qvo x br-int br- tun eth 1 eth 1 br-tun br-int br-ex vlan tag: 1 Data Network 10.0.1.0/24 eth 0 Configured by L2 Agent vlan tag: 2 br-int br- tun Configured by L2 Agent OVS Represents the actual bridge interface in the Network Stack Packet Conversion (VLAN translation) br-ex phy-br-ex int-br-ex patch -tun patch -int patch -tun patch -int gre x gre x dnsmasq tap x vla qg x qr x ntag: 1 qg y qr y vla tag: 2 dnsmasq tap y n Configured by L3 Agent NAT with iptables Configured by DHCP Agent Assigned to each subnet Configured by DHCP Agent Assigned to each subnet qrouter x qrouter y qdhcp x qdhcp y tunneling Configured by Nova Compute WAN Configured by neutron ovs plugin agent GRE Capsulation Packet Conversion (GRE mode Tunnel Interface) Configured by neutron ovs plugin agent Just vice versa. - qbr Quantum BRidge - qvb Quantum Virtual Bridge side - qvo Quantum Virtual OVS side eth 0 eth 0 Neutron OVS SG Chain vnet2 vnet3 qbr x qbr x
  • 9. Lab Test Too Much Detail VLAN & GRE Compute Node Compute Node test1 test2 test3 test4 qbr x qbr x eth 0 eth 0 vnet0 vnet1 br-int br-tun qvb x qvb x qvb x qvb x qvo x qvo x qvo x qvo x br-int br- tun eth 1 vlan tag: 1 Data Network 10.0.1.0/24 vlan tag: 2 Packet Conversion (VLAN translation) patch -tun patch -int gre x tunneling Configured by Nova Compute Configured by neutron ovs plugin agent Packet Conversion (GRE mode Tunnel Interface) instance TAB device Linux bridge veth pair GRE Patch Port Physical NIC GRE port Virtual ETHernet pair, 螳 ろ語襦 覿襴, Linux Bridge 郁屋, Hypervisor螳 br-int bridge 郁屋 覓朱Μ NIC Vnet0 Hypervisor企 instance vNIC 郁屋 螳 L2 れ豺 蠍磯, 覓朱Μ/螳 NIC 郁屋 OVS Generic Routing Encapsulation, GRE tunneling port Open vSwitch, 螳 れ豺 蠍磯 eth 0 eth 0 Neutron OVS SG Chain vnet2 vnet3 qbr x qbr x Configured by L2 Agent Gre 磯襷 , VLAN螻朱 磯 瑚 譟伎伎 (TBC)
  • 10. Lab Test Too Much Detail VLAN & GRE Compute Node Compute Node test1 test2 test3 test4 qbr x qbr x eth 0 eth 0 vnet0 vnet1 br-int br-tun qvb x qvb x qvb x qvb x qvo x qvo x qvo x qvo x br-int br- tun eth 1 vlan tag: 1 Data Network 10.0.1.0/24 vlan tag: 2 Packet Conversion (VLAN translation) patch -tun patch -int gre x tunneling Configured by Nova Compute Configured by neutron ovs plugin agent Packet Conversion (GRE mode Tunnel Interface) eth 0 eth 0 Neutron OVS SG Chain vnet2 vnet3 qbr x qbr x Configured by L2 Agent Neutron OVS SG chain : managed Neutron Security Groups 語ろ伎れ inbound/outbound 碁曙 貉碁, Security Groups - iptables, Linux Bridge : OpenStack SG襯 蠍 iptables rules襯 : OVS iptables rule 讌 : TAB Device Linux Bridge襯 蟇一蟆, iptables 襯 襦 覦覯朱 覲伎 螳 Linux Bridge : 覦覯 觚襴酔 : firewall rules 誤 br-int(OVS) : 牛觚襴酔 : 覦覯 觚襴酔 焔(qvo XXX) : VLAN 蟆曙 碁曙 tagging/untagging br-tun(OVS) : 磯觚襴酔 : br-int(牛觚襴酔)襦覿一 VLAN 蟾 碁曙 GRE 磯襦 覯 : rules vlan id tunneling id 碁 襷牛
  • 11. Lab Test Too Much Detail VLAN & GRE Network Node Network Node eth 1 br-tun br-int br-ex Data Network 10.0.1.0/24 eth 0 br-int br- tun Configured by L2 Agent br-ex phy-br-ex int-br-ex patch -tun patch -int gre x dnsmasq tap x vla qg x qr x ntag: 1 qg y qr y vla tag: 2 dnsmasq tap y n Configured by L3 Agent NAT with iptables Configured by DHCP Agent Assigned to each subnet Configured by DHCP Agent Assigned to each subnet qrouter x qrouter y qdhcp x qdhcp y tunneling WAN Configured by neutron ovs plugin agent Just vice versa. dnsmasq Internal Port veth pair GRE Patch Port Physical NIC GRE port Virtual ETHernet pair, 螳 ろ語襦 覿襴, Linux Bridge 郁屋, Hypervisor螳 br-int bridge 郁屋 覓朱Μ NIC OVS bridges internal ports OVS ??? 蠍磯レ 覘螻, br-int 覦 br-tun螻 るジ? Generic Routing Encapsulation, GRE tunneling port Open vSwitch, 螳 れ豺 蠍磯 Port 覿伎 DHCP 觜 螻 Network Namespace, qrouter ~ : connection to the outside(NAT) qdhcp ~ : dhcp service namespace
  • 12. Lab Test Too Much Detail Network Node eth 1 br-tun br-int br-ex Data Network 10.0.1.0/24 eth 0 br-int br- tun Configured by L2 Agent br-ex phy-br-ex int-br-ex patch -tun patch -int gre x dnsmasq tap x vla qg x qr x ntag: 1 qg y qr y vla tag: 2 dnsmasq tap y n Configured by L3 Agent NAT with iptables Configured by DHCP Agent Assigned to each subnet Configured by DHCP Agent Assigned to each subnet qrouter x qrouter y qdhcp x qdhcp y tunneling WAN Configured by neutron ovs plugin agent Just vice versa. qDHCP namespace : DHCP 覯 ろ語 namespace dnsmasq襦 : Network namespace 語ろ語 覲螳 ろ語 ろ (interfaces, routing tables, iptables rules) 螳讌 襴 貉る 蠍磯 : dnsmasq qRouter namespace : Neutron router 殊壱螻 觚血伎 殊壱 企, iptables れ network namespace : 殊壱 蠍磯レ : Netfilter nat table - namespace企 殊壱一 譟伎 語ろ伎るれ floaing ip襯 豈讌 External traffic : 碁襦 碁曙 れろ伎れ qg誤壱伎るゼ 蟆曙 br-ex襯 蟆曙 : int-br-ex port(br-int) phy-br-ex port(br-ex)襯 牛 qg襯 蟇 豺讌 螻 覦襦 螳
  • 13. Lab Test Too Much Detail VLAN & GRE Network Node NAT to host address : 襷 br-ex蟆 public cloud襯 麹蠍 蟆危語 企るゼ れる(NAT襯 螻苦朱) 蠏碁覃 ろ語 碁 危朱ゼ 牛 external碁曙 螻 NAT襭一 燕 . Direct network connction : 覦襦 floating ip れ企碁 碁 ろ語 蟇磯朱 # ip addr add 172.24.4.225/28 dev br-ex # ovs-vsctl add-port br-ex eth2
  • 14. Lab Test Too Much Detail Controller Node > used demo tenant > External Network : ext-net > Private Network : demo-net, demo-net2 > Instance : test1, test2, test3, test4
  • 15. Lab Test Too Much Detail Compute Node - Bridges & Ports
  • 16. Lab Test Too Much Detail Network Node - Bridges & Ports
  • 17. Lab Test Too Much Detail Network Node Network Namespace(qRouter, qDHCP) Compute Node br-tun(磯觚襴酔 table)
  • 18. Lab Test Too Much Detail Network Node qDHCP namespace interface
  • 19. Lab Test Too Much Detail Network Node qRouter namespace interface
  • 20. Lab Test Too Much Detail VLAN & GRE Network Node Network Node - qRouter namespace iptables
  • 21. 伎.