Simplifying openstack instances networking

Post on 22-Jan-2018

142 views 2 download

Transcript of Simplifying openstack instances networking

Simplifying OpenStack Instances Networking

By Mohamed ELMesseirySenior Advisor Consultant

DELL EMC | Service Provider & Telecom Practice

www.messeiry.com

OpenStack Networks

• Networks are the same in every cloud systems.

• In openstack there are some concepts and naming's

• Openstack offer flexibility to use any network type you want.

• Even acceleration is possible.

• The power comes from the APIs provided by openstack.

• You can use SDN controllers to automate and manage networks in openstack.

The problem!

• You install openstack (devstack, packstack, vanilla, redhat, …..)

• You launch couple of instances

• You try to do some networking and connections

• You fail ??

• You think of changing your career !!

• Why ?? I did everything required !!

• You read, re-do and it works partialy

• In this session I will try to cover what you need to be aware of to configure networks (Provider, External, Internal, Tenants,…)

• I will try to make it easy and simple

What we need

• Create tenants

• Create different subnets in each tenant

• Create external network

• Connect subnet to another subnet

• Connect subnet to external network

• Connect instances all kind of networks you have (tenant network, multiple tenant network, external)

• Sounds easy lets dive in

to START we have to go to the END

End Result - Blue Tenant

External/Provider Networks Internal Tenant Networks

End Result – Red Tenant

Create the Tenant Network

Create the Instances

Instance Operations

Floating IP

• Private IP AddressA private IP address is assigned to an instance's network-interface by the DHCP server. The address is visible from within the instance by using a command like “ip a”. The address is typically part of a private network and is used for communication between instances in the same broadcast domain via virtual switch (L2 agent on each compute node). It can also be accessible from instances in other private networks via virtual router (L3 agent).

• Floating IP AddressA floating IP address is a service provided by Neutron. It's not using any DHCP service or being set statically within the guest. As a matter of fact the guest's operating system has no idea that it was assigned a floating IP address. The delivery of packets to the interface with the assigned floating address is the responsibility of Neutron's L3 agent. Instances with an assigned floating IP address can be accessed from the public network by the floating IP.

A floating IP address and a private IP address can be used at the same time on a single network-interface. The private IP address is likely to be used for accessing the instance by other instances in private networks while the floating IP address would be used for accessing the instance from public networks.

The Concept of Floating IP

How to Implement in LAB

The internals

WOW how can I verify such a thing

Now how should I Create all that

• Simply you don’t.

• Once you create a network of type external it gets hooked to the external bridge you specified and all works as per design.

• But first thing first

Teach OVS and Create External Network

What is datanet or extnet you just created

• It’s the logical name of your external network, its something you mention when create the ovs configuration.

Testing the Scenarios

External Networks

datanet 10.0.3.0/24

extnet 10.0.2.0/24

Tenants Ranges

Red Tenant

10.40.40.0/24

10.50.50.0/24

BlueTenants

10.40.40.0/24

10.80.80.0/24

ssh

Blue tenant Network-A

Directly attached to external datanet

Pinging its own floating ip from extnet

Pinging a machine on RedTenant through

its floating IP on extnet

The router

Recap for the lab

• Coffee is the most important ingredient here.

• Use virtual box, create 2 NAT networks, 1 host-only for access to the vm

• use packstack to install all-in-one with options or answer file

• Create additional interface configuration and map it to ovs by creating the required bridge and add interface to it

• Change the neutron ovs configuration plugin to reflect the required

• Restart neutron

• Create networks

• Create routers, if the router to connect external network (floating) set the router gateway

• Create instances

• Celebrate

packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-

interfaces=br-ex:enp0s3 --os-neutron-ml2-type-drivers=vxlan,flat,vlan

Thank Enjoy Open Stacking