Creating a Tenant, VRF, and Bridge Domain

This procedure shows you how to use the Cisco APIC REST API to create tenants, VRFs, and bridge domains. This procedure performs the same operation as the GUI procedure of the same name in the Cisco APIC Layer 2 Networking Configuration Guide.

Note Before creating the tenant configuration, you must create a VLAN domain using the vlan-domain command and assign the ports to it.

Procedure

Step 1

Create a tenant.

Example:

POST https://<apic-ip-address>/api/node/mo/uni.xml

<polUni>
  <fvTenant name="ExampleCorp">
  </fvTenant>
</polUni>

When the POST succeeds, the object that you created appears in the response.

Step 2

Create a VRF (fvCtx) and bridge domain (fvBD).

Note The Gateway Address can be an IPv4 or an IPv6 address. For more details about IPv6 gateway addresses, see the related KB article, KB: Creating a Tenant, VRF, and Bridge Domain with IPv6 Neighbor Discovery.

Example:

POST https://<apic-ip-address>/api/mo/uni/tn-ExampleCorp.xml

<fvTenant name="ExampleCorp">
   <fvCtx name="pvn1"/>
   <fvBD name="bd1">
      <fvRsCtx tnFvCtxName="pvn1"/>
      <fvSubnet ip="10.10.100.1/24"/>
   </fvBD>      
</fvTenant>

Note If you have a public subnet when you configure the routed outside, you must associate the bridge domain with the outside configuration.