Professional Documents
Culture Documents
Aci 3456
Aci 3456
Aci 3456
Domenico Dastoli
Technical Marketing Engineer INSBU
ddastoli@cisco.com
Cisco Spark
Questions?
Use Cisco Spark to communicate
with the speaker after the session
How
1. Find this session in the Cisco Live Mobile App
2. Click “Join the Discussion”
3. Install Spark or go directly to the space
4. Enter messages/questions in the space
cs.co/ciscolivebot#BRKACI-3456
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
ACI connects Virtual and Physical World
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Agenda
• ACI, Virtualisation and VMM Domains
• ACI and OpenStack
• Options to Install OpenStack and ACI plugin
• Operate OpenStack: ML2 mode and GBP mode
• External Network connectivity
• Demo
• Q&A
Virtualisation and VMM Domains
ACI Anywhere - Vision
Any Workload, Any Location, Any Cloud
ACI Anywhere
IP IP
WAN WAN
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Cisco ACI – The basics
Logical Network Provisioning of Stateless Hardware
Web App DB
APIC
ACI Fabric
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Hypervisor Interaction with ACI
Two modes of Operation
APIC APIC
WEB DB
VLAN 10 VLAN 10 VLAN 100 APP DB
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Hypervisor Integration with ACI
Relationship (VMM Domain) is
formed between APIC and Virtual
APIC Machine Manager (VMM)
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Hypervisor Integration with ACI
VMM Domains & VLAN Encapsulation
16M Virtual Networks VLAN ID only gives 4K EPGs (12 bits)
APIC
Scale by creating pockets of 4K EPGs
Place VM anywhere
EP EP EP
EP
EP
EP EP
EP EP EP EP
EP EP
EP
EP
EP VLAN 16
EP EP
VLAN 5
OpenStack Controller
OpFlex for OVS
APIC Unified Plugin
• Open Source OpFlex agent extends ACI into the host
APIC • OpFlex Proxy exposes new open API in ACI fabric
OpFlex Proxy
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Why Cisco ACI and OpenStack?
Distributed, Scalable Hardware-Accelerated
Virtual Networking Performance
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
What is the ACI Unified Plugin for OpenStack?
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Neutron ML2
The Modular Layer 2 (ml2) plugin is a framework allowing OpenStack Networking to simultaneously utilize
the variety of layer 2 networking technologies.
Drivers within ml2 implement separately extensible sets of network types and of mechanisms for
accessing networks of those types.
TypeDriver
TypeDriver
TypeDriver
TypeDriver
Population
Microsoft
SR-IOV
Hyper-V
vSwitch
Layer 2
Nexus
VXLAN
information established by the TypeDriver and ensuring that it is
OpFlex
Bridge
Cisco
Cisco
VLAN
APIC
Open
Linux
GRE
properly applied given the specific networking mechanisms that have
been enabled.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
ACI ML2 Mechanism Driver
When running the ACI integration, The following
Type and Mechanism Drivers will be used:
Linux Bridge
TypeDriver
TypeDriver
TypeDriver
TypeDriver
Population
apic_aim
Microsoft
Hyper-V
SR-IOV
vSwitch
Layer 2
OpFlex
VXLAN
Nexus
VLAN
Cisco
Cisco
Open
GRE
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
APIC ML2 options
• APIC AIM Mechanism driver enables the user to deploy OpenStack projects in:
• Neutron standard ML2 mode
• Group Based Policy (GBP) mode
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
ML2 vs GBP mode
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
ML2 – APIC Mapping
• With the ML2 Neutron Object APIC Object
Standard Neutron
Project Tenant
model, the
following mapping Network EPG + BD
happens.
Subnet Subnet
• All the operations
are done on Router Contract
OpenStack through
Horizon, CLI or Security Group + Rule N/A
Iptables rules maintained per host
Heat
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
ACI Tenant Creation with ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
GBP – APIC Mapping
• With the GBP Model GBP Object APIC Object
the following mapping
Project Tenant
happens.
L3 Policy VRF
• GBP offers much more
granularity and L2 Policy Bridge Domain + Subnet
flexibility compare to
standard neutron. Policy Group Endpoint Group
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 31
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
ACI Tenant Creation with GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
GBP Policy Mapping
VRF
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
GBP Policy Mapping
GBP L3 Policy
VRF
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
GBP Policy Mapping
VRF
GBP L2
Policy
EPG Bridge Domain
DHCP
subnet
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
GBP Policy Mapping
VRF
GBP
dhcp EPG EPG Policy Groups
server
WEB DB
EPG
APP
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
GBP Policy Mapping
VRF
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
ML2 vs GBP model – what is best?
• GBP:
• Application Centric
• Security groups are created as ACI contracts AND OVS rules. So they are
visible on ACI and will be enforced both in HW (ACI leaf) and SW (OVS).
• Introduces new REST APIs: if any existing templates, you will need to adapt
• ML2:
• Network Centric
• Standard way of creating neutron networks
• REST API will not change: any heat or CLI template will keep working
• Security Groups not visible in ACI: they are implemented by OS as OVS rules
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
What are the components and how do they work?
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 44
[heat-admin@overcloud-controller-0 ~]$ sudo yum list | grep @aci-repo
aci-integration-module.noarch 0.6.0-162.el7 @aci-repo
agent-ovs.x86_64 1:1.5.0-63.el7.centos @aci-repo
apicapi.noarch 1.1.0-170.el7 @aci-repo
neutron-opflex-agent.noarch 2:6.1.0-26.el7 @aci-repo
openstack-dashboard-gbp.noarch 6.0.0-53.el7 @aci-repo
What’s installed on openstack-heat-gbp.noarch 6.0.0-53.el7
openstack-neutron-gbp.noarch 6.2.0-53.el7
@aci-repo
@aci-repo
[heat-admin@overcloud-controller-0 ~]$
the controller and
compute node? controller
compute
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
A new component:
A key ACI Integration Module
component: The AIM daemon is running on the
Controller nodes and is responsible to
configure ACI through REST API call
based on the OpenStack policy model
AIM Daemon defined.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 46
Architecture: APIC Integration Manager
Description
Group-Based OpenStack
• AIM continuously synchronizes with APIC using
Policy Controller APIC Integration Daemon (AID).
AID
processes Neutron API
• Group-Based Policies are mapped into Neutron API
APIC Unified Plugin
and then AIM. Neutron APIs are mapped to AIM
APIC Integration Database (AIM) directly.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 47
The AIM Daemon at work: the workflow
Application Network Profile
EPG EPG
3 EPG DB
C1 WEB C2 APP
ACI
5
Fabric
2 Push Policy
Automatically Push
Network Profiles to
APIC and keep it
sync
NEUTRON NOVA
4 Web App Web App DB Web Web DB
OpenStack Tenant
Instantiate VMs
HYPERVISOR HYPERVISOR HYPERVISOR
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 48
Neutron Opflex Agent
The Neutron Opflex Agent runs on both
the compute and the controller. It is
Neutron Opflex responsible to communicate with the
neutron server.
Agent
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 49
Agent OVS
The Agent OVS runs on the compute
and controller nodes. It is responsible to
communicate with the OVS and the leaf
node to register to ACI fabric.
Agent OVS
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 50
OpFlex Architecture
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
What is the Endpoint file?
VM IP address
VM name
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 52
Closer look to the enhancement with the ACI plugin
Distributed, Scalable Hardware-Accelerated
Virtual Networking Performance
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
Routing and Policy Enforcement is done on the host
Tenant Networks DESCRIPTION
• Traditionally in OS VMs
Nova get the meatadata
Compute
OpenStack Controller Host
information from the
VM
service running on
Service
Meta-data Neutron Server
File
Compute Node
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
About the OpenStack Infrastructure network
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 61
Required connectivity for hosts
• Typically there will be a number of
networks required for OpenStack:
• Internal API Network (VLAN)
• Storage Network (VLAN)
• Storage Management Network (VLAN)
• Provisioning Network (Native VLAN)
• External Network (VLAN)
Note:
Controller node requires connectivity to the
APIC controller. External Network can be used
for this purpose.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 62
Physical connectivity with ACI
OpenStack node will need:
• At least two NICs per server configured as bond interface (for
redundancy)
• One NIC for provisioning network
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 63
ACI Configuration for OpenStack Node connectivity
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 65
ACI OpenStack Infrastructure tenant
Tenant: OpenStack_Infra
VRF: Main_VRF
BD_MGMT BD_OpenStack_Infra
L3 unicast enabled L3 Unicast Enabled
Default GW IP defined Limit IP Learning to Subnet: Disabled
- Two BDs:
- BD_MGMT provides OOB connectivity (in this design this provides connectivity both
Internet and APIC)
- BD_OSP is only switching but we keep L3 enabled to learn IP from the hosts
- EPGs have static bindings to the interfaces of the host
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 66
EPG Static binding
bond0
OpenStack nodes will have NIC interfaces statically bound to ACI End Point Group.
On ACI side an individual interface will be configured for Provisioning network. The bond interfaces of
the host will be connected to a VPC pair on ACI leaf switches.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 67
OpenStack Infrastructure Tenant
• Define the EPG and the specific static binding for
each network required:
• ExternalNet
• InternalAPI
• StorageMgmt
• StorageNet
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
OpenStack Tenant Network (VM datapath)
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 70
OpenStack Tenant Network
• Neutron provides each tenant with their own networks using either VLAN
segregation (where each tenant network is a network VLAN), or tunneling
(through VXLAN). Network traffic is isolated within each tenant network. Each
tenant network has an IP subnet associated with it, and network namespaces
means that multiple tenant networks can use the same address range without
causing conflicts.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 71
OpenStack Tenant Network with ACI with VLAN
• In VLAN encapsulation mode:
• The user will define a pool of VLAN (VMM Domain Pool)
• Each OpenStack project network will automatically pick one VLAN from the pool
• The ACI Access policy of the Leaf ports will allow all the VLANs defined in the VLAN
pool
Compute-1 Compute-2
bond0 bond0
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 73
OpenStack Tenant Network with ACI with VXLAN
• In VXLAN encapsulation mode:
• The ACI Access policy of the Leaf ports will allow the ACI Infra VLAN.
• Each OpenStack project network will automatically pick one VXLAN
• The VXLAN will be encapsulated into a tunnel using the ACI infra VLAN
bond0
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 74
What if you want to provision VLAN to 3rd party?
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 75
Hierarchical port binding (HPB)
ACI Leaf
Switch Hierarchical Port Binding allows to
create different network types:
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 76
SR-IOV support with ACI
OpenStack Controller
Group-Based Policy ML2
Another use case for HPB is SR-
IOV enabled hosts:
• GBP or ML2 options
• GBP – Reintroduces security
policies via groups / rulesets in
the fabric
• Can mix opflex and SR-IOV on
VLANs
the same physnet
NIC NIC
SRIOV SRIOV
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 78
IPv6 Dual Stack
• Many OpenStack customers are interested
connecting VMs to both IPv4 and IPv6
networks
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 79
Installation of OpenStack
OpenStack Support
• Cisco is committed to provide support to the main OpenStack distributions:
• Other distributions is supported with specific agreements with the 3rd party
vendor, i.e.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 81
Installation of OpenStack and ACI Plugin
• On Cisco.com:
• https://www.cisco.com/c/en/us/support/cloud-systems-management/application-policy-
infrastructure-controller-apic/tsd-products-support-series-
home.html#OpenStack_Installation_Guides
• Manual installation:
• Prone to errors and discouraged. Moving forward we will limit the support for production
environments while documentation will be always provided.
• RHEL OSP Director – full support for automated installation and upgrade
• Canonical Juju Charms – full support for automated installation and upgrade
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 82
Operate OpenStack
ML2 model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 84
ML2 – APIC Mapping
• With the ML2 Neutron Object APIC Object
Standard Neutron
Project Tenant
model, the
following mapping Network EPG + BD
happens.
Subnet Subnet
• All the operations
are done on Router Contract
OpenStack through
Horizon, CLI or Security Group + Rule N/A
Heat Iptables rules maintained per host
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 85
Create a new OpenStack project:
[stack@dom-undercloud ~]$ openstack project create --description "tenant Cisco Live Europe
Barcelona" CiscoLive
+-------------+------------------------------------+
| Field | Value |
+-------------+------------------------------------+
| description | tenant Cisco Live Europe Barcelona |
| enabled | True |
| id | 97390b780c7545d393d9314d34e69cfa |
| name | CiscoLive |
+-------------+------------------------------------+
[stack@dom-undercloud ~]$ openstack role add --project CiscoLive --user admin admin
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | cd3c4088da8d40778e93efc2d8d8ce6c |
| name | admin |
+-----------+----------------------------------+
[stack@dom-undercloud ~]$
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 86
Create a new OpenStack network:
[stack@dom-undercloud ~]$ openstack network create net101
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| dns_domain | None |
| id | 96c4644f-a63a-4b15-b36f-b00dfe71bc38 |
| is_default | None |
| name | net101 |
| port_security_enabled | True |
| project_id | 97390b780c7545d393d9314d34e69cfa |
| provider:network_type | opflex |
| provider:physical_network | physnet1 |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | 3 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
+---------------------------+--------------------------------------+
[stack@dom-undercloud ~]$
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 87
Attach a subnet to the network
[stack@dom-undercloud ~]$ openstack subnet create --network net101 --gateway 192.168.200.254 --subnet-range
192.168.200.0/24 subnet101
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 192.168.200.1-192.168.200.253 |
| cidr | 192.168.200.0/24 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.200.254 |
| host_routes | |
| id | 96c4644f-a63a-4b15-b36f-b00dfe71bc38 |
| ip_version | 4 |
| name | subnet101 |
| network_id | f816ceaa-af05-47ce-83b9-f06dc5ed9f5b |
| project_id | 97390b780c7545d393d9314d34e69cfa |
| revision_number | 2 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
+-------------------+--------------------------------------+
[stack@dom-undercloud ~]$
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 89
What happens on ACI
• A new Tenant is created and a new EPG
and unicast disabled BD is created
• Unicast routing will stay disabled until a
router is created in OS
• The BD is attached to a generic unrouted
VRF created in common tenant
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 90
Add a router and attach the subnet to it
[stack@dom-undercloud ~]$ openstack router create CLrouter
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | None |
| availability_zones | None |
| description | |
| distributed | False |
| external_gateway_info | None |
| flavor_id | None |
| ha | False |
| id | 0cbf9e21-f6f9-40c2-9c98-6f04a0ff6268 |
| name | CLrouter |
| project_id | 97390b780c7545d393d9314d34e69cfa |
| revision_number | None |
| routes | |
| status | ACTIVE |
+-------------------------+--------------------------------------+
[stack@dom-undercloud ~]$ openstack router add subnet CLrouter subnet101
[stack@dom-undercloud ~]$
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 91
Security Groups with ML2 model
• In ML2 policy mode the router created corresponds to a permit any contract
in ACI.
• Security groups are defined in OpenStack and controlled there.
• They will be reflected in policy defined in OVS rules.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 92
GBP model
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 94
GBP – APIC Mapping
• With the GBP Model GBP Object APIC Object
the following mapping
Project Tenant
happens.
L3 Policy VRF
• GBP offers much more
granularity and L2 Policy Bridge Domain
flexibility compare to Policy Group Endpoint Group
standard neutron.
Policy Ruleset Contract
• GBP comes with CLI,
Heat and Horizon
plugins
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 95
Create a new GBP VRF:
This pool is where I’ll be taking my tenant
subnets from during network creation.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 96
Create a new GBP L2 Policy (Bridge Domain):
The subnet is
carved out from the
VRF /16 defined
before
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 97
Create GBP groups (ACI EPGs):
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 98
In order to allow communication, I need to create policy
actions, classifiers, rules and rulesets within GBP.
GBP ACI
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 99
First, create a Policy Action to define the behaviour:
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 100
Then define a Policy Classifier:
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 101
Next, define a Policy Rule, referencing the classifier
created in the last step:
[stack@dom-undercloud ~]$ gbp policy-rule-create ping-policy-rule --classifier icmp-traffic --actions allow
Created a new policy_rule:
+--------------------------+------------------------------------------------------------------------------------------+
| Field | Value |
+--------------------------+------------------------------------------------------------------------------------------+
| apic:distinguished_names | {"Forward-FilterEntries": ["uni/tn-common/flt-pr_3ecd614d-717b-483c-8e5c-c5f335d40a88/e |
| | -os-entry-0"], "Reverse-FilterEntries": ["uni/tn-common/flt-reverse-pr_3ecd614d-717b- |
| | 483c-8e5c-c5f335d40a88/e-os-entry-1", "uni/tn-common/flt-reverse-pr_3ecd614d-717b-483c- |
| | 8e5c-c5f335d40a88/e-os-entry-2", "uni/tn-common/flt-reverse-pr_3ecd614d-717b-483c-8e5c- |
| | c5f335d40a88/e-os-entry-3", "uni/tn-common/flt-reverse-pr_3ecd614d-717b-483c-8e5c- |
| | c5f335d40a88/e-os-entry-4"]} |
| description | |
| enabled | True |
| id | 3ecd614d-717b-483c-8e5c-c5f335d40a88 |
| name | ping-policy-rule |
| policy_actions | 2070e9ff-4de9-46ea-a81e-772906982adf |
| policy_classifier_id | 88c8e3c0-d9c5-4e6b-9992-a56b539e0b98 |
| project_id | 5b8945dba07a43e0b32efea4f1bc3fdf |
| shared | False |
| status | BUILD |
| status_details | |
| tenant_id | 5b8945dba07a43e0b32efea4f1bc3fdf |
+--------------------------+------------------------------------------------------------------------------------------+
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 102
Now define a Policy Ruleset to tie everything together:
[stack@dom-undercloud ~]$ gbp policy-rule-set-create icmp-policy-rule-set --policy-rules ping-policy-rule
Created a new policy_rule_set:
+------------------------+--------------------------------------+
| Field | Value |
+------------------------+--------------------------------------+
| child_policy_rule_sets | |
| description | |
| id | 29c3654d-6c9f-446b-8461-62eea3f6c050 |
| name | icmp-policy-rule-set |
| parent_id | |
| policy_rules | 9be64bdb-1d86-4577-bd3f-0bad2e9c0758 |
| shared | False |
| tenant_id | 5ab060d7c812478b904203d7901c1356 |
+------------------------+--------------------------------------+
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 103
Let’s now apply these rules to our EPGs:
[stack@dom-undercloud ~]$ gbp group-update epg101 --provided-policy-rule-sets "icmp-policy-rule-set=true"
Updated policy_target_group: epg101
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 104
We can now ping between the two networks!
ACI Fabric
Contract
epg101 EPG Epg102 EPG
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 105
External Network
External Connectivity
• Connectivity for a tenant can be either shared or dedicated.
• A shared external network is visible by all OpenStack projects.
• A dedicated connectivity for the OpenStack project.
Dediacated Dediacated
Shared L3 out
L3 out L3 out
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 107
Physical Layout
APIC
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 108
How to create the L3out on ACI
• Although the OpenStack plugin could create automatically an L3out on ACI, the
best practice is to create it manually
• Defining manually an L3out supports all the L3out features:
• VPC
• Dynamic routing protocols
• Route engineering
• Etc.
• The L3out can be created with XML templates or in any ways you are familiar
with.
• Once the L3out is available, ACI AIM plugin on OpenStack can import it and
start controlling the L3out.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 109
Dedicated Tenant External Network
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 110
Creation of the L3out Dedicated
• A dedicated L3out must be created in the
OpenStack created tenant.
• In the L3out creation, it must be specified:
• Interfaces and their IP information
• Dynamic routing if any
• External EPG
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 111
Query ACI for external networks
• Through the ACI Integration Module (AIM) controller, it is possible to query ACI
for the existing and available external networks.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 112
Import External Networks from ACI to OpenStack
[heat-admin@overcloud-controller-0 ~]$ aimctl manager external-network-get
prj_97390b780c7545d393d9314d34e69cfa externalNet extEpg
+-------------------------+--------------------------------------------------------------------------+
| Property | Value |
|-------------------------+--------------------------------------------------------------------------|
| tenant_name | prj_97390b780c7545d393d9314d34e69cfa |
| l3out_name | externalNet |
| name | extEpg |
| monitored | True |
| consumed_contract_names | [] |
| provided_contract_names | [] |
| dn | uni/tn-prj_97390b780c7545d393d9314d34e69cfa/out-externalNet/instP-extEpg |
+-------------------------+--------------------------------------------------------------------------+
+---------------+-----------------------------------------+
| Property | Value |
|---------------+-----------------------------------------|
| resource_type | ExternalNetwork |
| resource_root | tn-prj_97390b780c7545d393d9314d34e69cfa |
| sync_status | synced |
| health_score | 100 |
| id | 3e368bc8-e83d-4c8a-b269-6c7873464def |
+---------------+-----------------------------------------+
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 113
Create OpenStack External Network
[stack@dom-undercloud ~]$ neutron net-create external-net-CL --router:external --apic:distinguished_names type=dict
ExternalNetwork=uni/tn-prj_97390b780c7545d393d9314d34e69cfa/out-externalNet/instP-extEpg
+----------------------------+----------------------------------------------------------------------------------------+
| Field | Value |
+----------------------------+----------------------------------------------------------------------------------------+
| admin_state_up | True |
| apic:distinguished_names | {"ExternalNetwork": "uni/tn-prj_97390b780c7545d393d9314d34e69cfa/out-externalNet |
| | /instP-extEpg", "BridgeDomain": "uni/tn-prj_97390b780c7545d393d9314d34e69cfa/BD-EXT- |
| | externalNet", "VRF": "uni/tn-prj_97390b780c7545d393d9314d34e69cfa/ctx-DefaultVRF", |
| | "EndpointGroup": "uni/tn-prj_97390b780c7545d393d9314d34e69cfa/ap-OpenStack/epg-EXT- |
| | externalNet"} |
| apic:nat_type | distributed |
| apic:synchronization_state | synced |
| id | f085fe67-42e1-4b3c-8951-e5d9932222ca |
| is_default | False |
| name | external-net-CL |
| port_security_enabled | True
Creating neutron external network |
| provider:network_type | opflex bound to the L3out imported with |
| provider:physical_network | physnet1 the aimctl manager. |
| provider:segmentation_id | |
| revision_number | 4 |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
+----------------------------+----------------------------------------------------------------------------------------+
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 114
External SNAT or Floating IP Pool Definition
[stack@dom-undercloud ~]$ neutron subnet-create external-net-CL 10.104.21.0/24 --name ext-subnet --disable-dhcp
--gateway 10.104.21.1 --apic:snat_host_pool True
Created a new subnet:
+----------------------------+--------------------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------------------+
| allocation_pools | {"start": "10.104.21.2", "end": "10.104.21.254"} |
| apic:distinguished_names | {} |
| apic:snat_host_pool | True |
| apic:synchronization_state | N/A |
| cidr | 10.104.21.0/24 |
| dns_nameservers | | Creating neutron external
| enable_dhcp | False | network SNAT pool and
| gateway_ip | 10.104.21.1 |
| host_routes | |
attaching the router to the
| id | 5344832d-dd03-40d7-a4d2-3f04c86fbb9d | external net.
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet |
| network_id | f085fe67-42e1-4b3c-8951-e5d9932222ca |
| revision_number | 2 |
| service_types | |
| subnetpool_id | |
| tenant_id | 97390b780c7545d393d9314d34e69cfa |
+----------------------------+--------------------------------------------------+
[stack@dom-undercloud ~]$ openstack router set --external-gateway external-net-CL CLrouter
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 115
SNAT Pool
Each Hypervisor will be assigned with one IP from the pool and the VMs will be NATted with the IP of the
hypervisor.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 116
The External network in ACI
3. The NATted IP
in ACI is
represented by
the external EPG 2. OVS applies
NAT rules
4. Traffic is sent
to external router 1. VM traffic
through ACI reaches OVS
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 117
Shared Tenant External Network
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 118
Create L3 out on ACI – Shared
• The shared external network must be
defined in the Common tenant in ACI
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 119
Same as before, you use the aimctl manager to import the external network
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 120
External Network
[stack@dom-undercloud ~]$ neutron net-create external-net-CL --router:external --shared --apic:distinguished_names
type=dict ExternalNetwork=uni/tn-common/out-l3out1/instP-extEpg
+----------------------------+----------------------------------------------------------------------------------------+
| Field | Value |
+----------------------------+----------------------------------------------------------------------------------------+
| admin_state_up | True |
| apic:distinguished_names | {"ExternalNetwork": "uni/tn-common/out-l3out1/instP-extEpg", "BridgeDomain": "uni/tn- |
| | common/BD-osp11_s2_EXT-l3out1", "VRF": "uni/tn-common/ctx-external_vrf", |
| | "EndpointGroup": "uni/tn-common/ap-osp11_s2_OpenStack/epg-EXT-l3out1"} |
| apic:external_cidrs | 0.0.0.0/0 |
| apic:nat_type | distributed |
| apic:synchronization_state | synced |
| availability_zone_hints | |
| availability_zones | |
| id | b90bfad9-4ed3-477f-996a-4222ae0768dd |
| is_default | False |
| name | external-net-CL Creating neutron external network |
| port_security_enabled | True |
| project_id | 11fa0c41388f4d3fbf3f2f6d6184f687
bound to the L3out imported with |
| provider:network_type | opflex the aimctl manager. |
| provider:physical_network | physnet1 |
| provider:segmentation_id | |
| revision_number | 4 |
| router:external | True |
| shared | True |
| status | ACTIVE |
| subnets | |
+----------------------------+----------------------------------------------------------------------------------------+
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 121
External SNAT or Floating pool definition
[stack@dom-undercloud ~]$ neutron subnet-create external-net-CL 10.104.21.0/24 --name ext-subnet --disable-dhcp
--gateway 10.104.21.1 --apic:snat_host_pool True
Created a new subnet:
+----------------------------+--------------------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------------------+
| allocation_pools | {"start": "10.104.21.2", "end": "10.104.21.254"} |
| apic:distinguished_names | {} |
| apic:snat_host_pool | True | Creating neutron external
| apic:synchronization_state | N/A | network SNAT pool and
| cidr | 10.104.21.0/24 |
| dns_nameservers | |
attaching the router to the
| enable_dhcp | False | exterlan net. Same way as
| gateway_ip | 10.104.21.1 | before with dedicated
| host_routes | |
| id | 5344832d-dd03-40d7-a4d2-3f04c86fbb9d | network.
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet |
| network_id | f085fe67-42e1-4b3c-8951-e5d9932222ca |
| revision_number | 2 |
| service_types | |
| subnetpool_id | |
| tenant_id | 97390b780c7545d393d9314d34e69cfa |
+----------------------------+--------------------------------------------------+
[stack@dom-undercloud ~]$ openstack router set --external-gateway external-net-CL CLrouter
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 122
SNAT Pool
Same as before, each Hypervisor will be assigned with one IP from the pool and the VMs will be NATted
with the IP of the hypervisor. This time the SNAT IP will appear in the Common Tenant in ACI.
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 123
Using Floating IP
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 124
Floating IP in ACI
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 125
Demo
Demo Time!
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 127
controller compute1
compute2 ESXi Bare Metal
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 128
APIC
APIC
APIC
EPG Orange-OS
EPG green-OS
controller compute1
compute2 ESXi Bare Metal
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 129
APIC
APIC
APIC
EPG Orange-OS
controller compute1
compute2 ESXi Bare Metal
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 130
APIC
APIC
APIC
EPG Orange-OS
controller compute1
compute2 ESXi Bare Metal
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 131
APIC
Contract allow-ICMP APIC
Allow ICMP APIC
EPG Orange-OS
Contract allow-SSH
Allow TCP:22
controller compute1
compute2 ESXi Bare Metal
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 132
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 133
Are we there yet?
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 134
ACI connects Virtual and Physical World
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 135
Q&A
For Your
Reference
Documentation
• APIC OpenStack Plugin Installation Guides:
• http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/1-
x/openstack/b_ACI_with_OpenStack_OpFlex_Architectural_Overview.html
• http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/1-
x/openstack/b_ACI_with_OpenStack_OpFlex_Deployment_Guide_for_Red_Hat.html
• http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/1-
x/openstack/b_ACI_with_OpenStack_OpFlex_Deployment_Guide_for_Ubuntu.html
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 137
For Your
Reference
Documentation (Cont.)
• APIC GBP Plugin Datasheet:
• http://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/openstack-at-
cisco/datasheet-c78-734181.html
• APIC OpenStack Plugin Datasheet:
• http://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/openstack-at-
cisco/datasheet-c78-732353.html
• GBP WhitePaper:
• http://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-
centric-infrastructure/white-paper-c11-733126.html
• GBP wiki:
• https://wiki.openstack.org/wiki/GroupBasedPolicy
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 138
Cisco Spark
Questions?
Use Cisco Spark to communicate
with the speaker after the session
How
1. Find this session in the Cisco Live Mobile App
2. Click “Join the Discussion”
3. Install Spark or go directly to the space
4. Enter messages/questions in the space
cs.co/ciscolivebot#BRKACI-3456
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Please complete your Online Complete Your Online
Session Evaluations after each
session
Session Evaluation
• Complete 4 Session Evaluations
& the Overall Conference
Evaluation (available from
Thursday) to receive your Cisco
Live T-shirt
• All surveys can be completed via
the Cisco Live Mobile App or the
Communication Stations
Don’t forget: Cisco Live sessions will be available
for viewing on-demand after the event at
www.ciscolive.com/global/on-demand-library/.
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Tech Circle
• Meet the Engineer 1:1 meetings
• Related sessions
BRKACI-3456 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 141
Thank you