Simplifying openstack instances networking

23
Simplifying OpenStack Instances Networking By Mohamed ELMesseiry Senior Advisor Consultant DELL EMC | Service Provider & Telecom Practice www.messeiry.com

Transcript of Simplifying openstack instances networking

Page 1: Simplifying openstack instances networking

Simplifying OpenStack Instances Networking

By Mohamed ELMesseirySenior Advisor Consultant

DELL EMC | Service Provider & Telecom Practice

www.messeiry.com

Page 2: Simplifying openstack instances networking

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.

Page 3: Simplifying openstack instances networking

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

Page 4: Simplifying openstack instances networking

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

Page 5: Simplifying openstack instances networking

to START we have to go to the END

Page 6: Simplifying openstack instances networking

End Result - Blue Tenant

External/Provider Networks Internal Tenant Networks

Page 7: Simplifying openstack instances networking

End Result – Red Tenant

Page 8: Simplifying openstack instances networking

Create the Tenant Network

Page 9: Simplifying openstack instances networking

Create the Instances

Page 10: Simplifying openstack instances networking

Instance Operations

Page 11: Simplifying openstack instances networking

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.

Page 12: Simplifying openstack instances networking

The Concept of Floating IP

Page 13: Simplifying openstack instances networking

How to Implement in LAB

Page 14: Simplifying openstack instances networking
Page 15: Simplifying openstack instances networking

The internals

Page 16: Simplifying openstack instances networking

WOW how can I verify such a thing

Page 17: Simplifying openstack instances networking

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

Page 18: Simplifying openstack instances networking

Teach OVS and Create External Network

Page 19: Simplifying openstack instances networking

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.

Page 20: Simplifying openstack instances networking

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

Page 21: Simplifying openstack instances networking

The router

Page 22: Simplifying openstack instances networking

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

Page 23: Simplifying openstack instances networking

Thank Enjoy Open Stacking