vPC
Site1

Step 1 - Create vPC Peering YAML File

With the devices added to the fabric, you can now create the vPC peering between site1-l1 and site1-l2, using vPC fabric peering. You will create a new file named vpc.nac.yml. This file will contain all of the necessary vPC configurations to establish the vPC peering for the leaf switches. The vPC settings such as peer-link VLAN and peer-keepalive VRF to use are defined under the vPC section of the global section of the data model. The actual vPC peers are defined under the vpc_peers of the topology section.


touch ~/workspace/ndlab/nac/host_vars/site1-fabric/vpc.nac.yml
code-server -r ~/workspace/ndlab/nac/host_vars/site1-fabric/vpc.nac.yml



    
---

vxlan:
  topology:
    vpc_peers:
      - peer1: site1-l1
        peer2: site1-l2
        fabric_peering: true


Step 2 - Execute Ansible Playbook

Make sure you are in your root Ansible directory.


cd ~/workspace/ndlab/nac

From the root Ansible project directory execute the following command:


ansible-playbook -i hosts.site1.yml vxlan.yml --tags cr_manage_vpc_peers

Upon a successful run of the playbook your output should look as follows:

  <... SNIP ...>

  PLAY RECAP **********************************************************************************************************************************************************
  site1-fabric               : ok=224  changed=33   unreachable=0    failed=0    skipped=750  rescued=0    ignored=0


  PLAYBOOK RECAP ******************************************************************************************************************************************************
  Playbook run took 0 days, 0 hours, 1 minutes, 33 seconds


  TASKS RECAP *********************************************************************************************************************************************************
  Tuesday 27 January 2026  03:24:07 +0000 (0:00:00.558)       0:01:33.171 *******
  ===============================================================================
  cisco.nac_dc_vxlan.create : Manage vPC Peering in Nexus Dashboard -------------------------------------------------------------------------------------------- 2.18s
  cisco.nac_dc_vxlan.common : Get POAP Data From POAP Enabled Devices ------------------------------------------------------------------------------------------ 2.16s
  cisco.nac_dc_vxlan.common : Display Flag Values -------------------------------------------------------------------------------------------------------------- 2.15s
  cisco.nac_dc_vxlan.connectivity_check : Get Cisco Nexus Dashboard Fabric Controller Version ------------------------------------------------------------------ 1.78s
  cisco.nac_dc_vxlan.common : Get Multisite Fabric Associations in Nexus Dashboard ----------------------------------------------------------------------------- 1.40s
  cisco.nac_dc_vxlan.common : Build Fabric Creation Parameters From Template ----------------------------------------------------------------------------------- 1.07s
  cisco.nac_dc_vxlan.validate : Copy Service Model Data to Host ------------------------------------------------------------------------------------------------ 0.92s
  cisco.nac_dc_vxlan.common : Retrieve NDFC Device Username and Password from Group Vars and update inv_config ------------------------------------------------- 0.89s
  cisco.nac_dc_vxlan.common : Retrieve NDFC Device Username and Password from Group Vars and update inv_config ------------------------------------------------- 0.88s
  cisco.nac_dc_vxlan.connectivity_check : Verify Authorization to Nexus Dashboard ------------------------------------------------------------------------------ 0.83s
  cisco.nac_dc_vxlan.common : Build Fabric Switch Inventory List From Template --------------------------------------------------------------------------------- 0.80s
  cisco.nac_dc_vxlan.common : Build Policy List From Template -------------------------------------------------------------------------------------------------- 0.76s
  cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------ 0.75s
  cisco.nac_dc_vxlan.common : Build Networks Attach List From Template ----------------------------------------------------------------------------------------- 0.73s
  cisco.nac_dc_vxlan.common : Build vPC interface -------------------------------------------------------------------------------------------------------------- 0.72s
  cisco.nac_dc_vxlan.common : Build Fabric Links --------------------------------------------------------------------------------------------------------------- 0.71s
  cisco.nac_dc_vxlan.common : Build sub_interface -------------------------------------------------------------------------------------------------------------- 0.70s
  cisco.nac_dc_vxlan.common : Build Edge Connections ----------------------------------------------------------------------------------------------------------- 0.69s
  cisco.nac_dc_vxlan.common : Build Loopback Interfaces List From Template ------------------------------------------------------------------------------------- 0.69s
  cisco.nac_dc_vxlan.common : Build Interface Po --------------------------------------------------------------------------------------------------------------- 0.69s

  ROLES RECAP *********************************************************************************************************************************************************
  Tuesday 27 January 2026  03:24:07 +0000 (0:00:00.560)       0:01:33.172 *******
  ===============================================================================
  common ----------------------------------------------------------------- 71.03s
  validate ---------------------------------------------------------------- 6.29s
  create ------------------------------------------------------------------ 5.94s
  connectivity_check ------------------------------------------------------ 4.06s
  common_global ----------------------------------------------------------- 0.05s
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  total ------------------------------------------------------------------ 87.38s

Step 3 - Return to ND & Verify vPC Peering is Pending

The vPC peering should now be pre-staged between leaf1 and leaf2. Return to ND and verify.

In ND, you should still be on the Switches tab, if not:

  1. Click Inventory in the top navigation bar
  2. Click Switches in the sub-navigation bar
  3. Verify the site1-l1 and site1-l2 leaf switches are display Pending in the Configuration sync status




Step 4 - Return to VSCode & Close All Open Tabs

Navigate back to your VSCode application.

  1. Right-Click on any open tab
  2. Select "Close All" from the drop-down menu


Continue to the next section to define the interfaces for the leaf switches in your fabric.