- Cisco ACI Cookbook
- Stuart Fordham
- 609字
- 2021-07-09 20:38:55
How to do it...
- We need to create another tenant for this recipe. Repeat the previous recipes from this chapter using the following settings:
- Name: TenantB
- Bridge Domain Name: TenantB-BD
- VRF Name: TenantB_VRF
- Subnet: 10.0.1.1/24
- Application Profile Name: TenantB_AP1
- EPG Name: TenantB_EPG1
- This has created another tenant, but at the moment, the two will be unable to communicate. We need to edit the subnets we have created and set them to Shared between VRFs. Navigate to Tenants | TenantA | Networking | Bridge Domains | TenantA-BD | Subnets | 10.0.0.1/24, and tick the Shared Between VRFs checkbox. Click on SUBMIT and apply the changes. Repeat the process for the TenantB 10.0.1/24 subnet.
- We are going to create a very basic contract. TenantA will be the provider and TenantB will be the consumer. We start by selecting the Security Policies option from the left-hand side menu for TenantA:

- From here, we select Create Contract from the Actions dropdown.

- We need to give the contract a name and click on the plus sign to create a new subject of the contract:

- In the new window, we need to specify the subject. We assign it a name:

- The next step is to create a filter chain. Filter chains are where we classify our traffic (according to which attributes between layer 2 and layer 4 we decide upon). Clicking on the plus sign next to Filters gives us a list of filters that exist within the common tenant.

Clicking on the plus sign above the word Tenant will allow us to create a custom one.

- Click on the plus sign next to Entries to create an entry for HTTP:

Name the entry and set the EtherType to IP, the IP Protocol to tcp, and the destination port range to http.
- Click on UPDATE.
- Click on SUBMIT.
- Back on the Create Contract Subject window, click on UPDATE.

- Click on OK.
- Click on SUBMIT.

- Once we click on SUBMIT, we can see the contract listed in the security policies.

- The next step is to attach it to the EPG. We do this from the Contracts option under the tenant application profile: TenantA | Application profiles | TenantA_EPG1 | Contracts.

- We click on Actions and then on Add Provided Contract and select the contract we previously created.

We can add contract labels and subject labels.

These labels are optional and are used to increase granularity during policy enforcement.
- Once we hit SUBMIT, our contract is connected to our EPG.

- We need to do the same with TenantB, this time setting it as a consumed contract:

If you try and add the previously created contract, you will not find it in the drop-down list.

This is because the scope is set to VRF. We need the scope to be set to Global so that other tenants can see it.
- Return to TenantA, and navigate to Security Policies | Contracts | TenantA_Contract. Click on the Policy tab on the right-hand side.

- Change the scope to Global, and click on SUBMIT at the bottom right-hand corner. Click on SUBMIT CHANGES.
- We need to export the contract now. From TenantA | Security Policies, right-click on Contracts and select Export Contract.
- Set the name for the export, select the contract created earlier, and select TenantB.

- Click on SUBMIT.
- We should now be able to see the exported contract being imported into TenantB.

- Navigate to Contracts, right-click on it, and select Add Consumed Contract Interface.

- Select TenantB/TenantA_Export.

- Click on SUBMIT.
- We can now see the contract listed.

推薦閱讀
- LabVIEW虛擬儀器從入門到測控應用130例
- Hands-On Artificial Intelligence on Amazon Web Services
- Blockchain Quick Start Guide
- 模型制作
- 大數據挑戰與NoSQL數據庫技術
- CorelDRAW X4中文版平面設計50例
- 大數據技術與應用
- 網絡安全與防護
- Word 2007,Excel 2007辦公應用融會貫通
- Extending Ansible
- R Machine Learning Projects
- 水晶石影視動畫精粹:After Effects & Nuke 影視后期合成
- Machine Learning Algorithms(Second Edition)
- 大數據:引爆新的價值點
- 基于Proteus的PIC單片機C語言程序設計與仿真