Courtesy
Bytes around me :-)
Preface
Sharing Private network is a common use case in Cloud Environment. Normally RBAC will help you to achieve. Since Newton release, this feature is Available. But the question is which SDN you are using in your Environment. If you are using Opencontrail 3.2 as SDN, you cannot go with RBAC.
Assumptions
- Openstack Release Ocata
- Opencontrail 3.2
- We have Network called
Project-Network-01inProject-01 - We have Network Called
Project-Network-02inProject-02 - Both VDC are in Same Datacenter
Solution
Each network we created in Contrail, will have a route target. So, the Idea in High Level is to Import Route target between each Network.
while you are going to Contrail, you can find Two route targets for the project Project-01 and the nework Project-Network-01,
- Login to Contrail GUI
- Click on the
GearIcon, left Top - Click
Introspect
In Right pane,
- Chose IP Address (Chose any one of the Controller IP)
- Chose
bgb_peerfromModule - Chose
ShowRoutingInstanceReqfromRequest - In the
SearchStringEnter Project name and Network NameProject-01:Project-Network-01

You can see multiple route targets under export_target tab. For example, you will see the below
target:64814:8002398
Copy the Last 4 Digits of the route target and Open a Duplicate copy of your Session in another Tab
- Chose IP Address (Chose any one of the Controller IP)
- Chose
bgb_peerfromModule - Chose
ShowRtGroupReqfromRequest - In the
SearchStringEnter Digits we copied8002398
Go to XSL Grid tab and search for snat , if you are not find anything related to snat you are good to Go.
Import Route Target
- Go to the Home page of Contrail GUI
- Click on the
SpannerIcon, left Top - Click
Networking

Now all your Projects in the Environment will be Listed. Chose the Project-02 which is our Destination project to import the RT
Checkthe Network you want to Share withProject-01and Click on theGearIcon on right Side and selectEdit- Click
Import Route Target(s) - Click the
+sign to Add another row - In the
ASNpart enter this64814and inTargetPart Enter this8002398

Security Group
- Create a New Security Group in
Project-02 - Allow the
Project-Network-01Subnet inProject-02