Deploy
VXLAN as Code

Step 1 - Execute Ansible Playbook

Up to this point, all of the switch, Interface, VRF, and Network configurations have been pushed to NDFC. However, their Config Status shows as Pending since you have yet to actually deploy this configuration. In this step, you will deploy the fabric configuration from the NDFC controller to the devices in the fabric.

Make sure you are in your root Ansible directory


cd ~/workspace/ndfclab/nac

From the root Ansible project directory execute the following command:


ansible-playbook -i hosts.stage.yml vxlan.yml -t role_deploy

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

    PLAY RECAP ***********************************************************************************************************************************************************
    fabric-stage                      : ok=194  changed=26   unreachable=0    failed=0    skipped=391  rescued=0    ignored=0   


    PLAYBOOK RECAP *******************************************************************************************************************************************************
    Playbook run took 0 days, 0 hours, 3 minutes, 25 seconds


    TASKS RECAP **********************************************************************************************************************************************************
    Tuesday 07 May 2025  17:49:24 +0000 (0:00:00.183)       0:03:25.962 *********** 
    =============================================================================== 
    cisco.nac_dc_vxlan.deploy : Deploy for Fabric fabric-stage -------------------------------------------------------------------------------------------------- 137.03s
    cisco.nac_dc_vxlan.deploy : Config-Save for Fabric fabric-stage ---------------------------------------------------------------------------------------------- 12.68s
    cisco.nac_dc_vxlan.connectivity_check : Get Cisco NDFC Version ------------------------------------------------------------------------------------------------ 1.75s
    cisco.nac_dc_vxlan.common : Get POAP Data From POAP Enabled Devices ------------------------------------------------------------------------------------------- 0.87s
    cisco.nac_dc_vxlan.common : Build Fabric Creation Parameters From Template ------------------------------------------------------------------------------------ 0.84s
    cisco.nac_dc_vxlan.validate : Copy Service Model Data to Host ------------------------------------------------------------------------------------------------- 0.82s
    cisco.nac_dc_vxlan.common : Retrieve NDFC Device Username and Password from Group Vars and update inv_config -------------------------------------------------- 0.72s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------- 0.70s
    cisco.nac_dc_vxlan.connectivity_check : Verify Authorization to NDFC 10.15.0.26 on Port 443 ------------------------------------------------------------------- 0.70s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------- 0.70s
    cisco.nac_dc_vxlan.common : Build Policy List From Template --------------------------------------------------------------------------------------------------- 0.70s
    cisco.nac_dc_vxlan.common : Build VRFs Attach List From Template ---------------------------------------------------------------------------------------------- 0.68s
    cisco.nac_dc_vxlan.common : Build Networks Attach List From Template ------------------------------------------------------------------------------------------ 0.68s
    cisco.nac_dc_vxlan.common : Build Loopback Interfaces List From Template -------------------------------------------------------------------------------------- 0.67s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------- 0.67s
    cisco.nac_dc_vxlan.common : Build VPC interface --------------------------------------------------------------------------------------------------------------- 0.67s
    cisco.nac_dc_vxlan.common : Build Edge Connections ------------------------------------------------------------------------------------------------------------ 0.66s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------- 0.66s
    cisco.nac_dc_vxlan.common : Build Fabric Links ---------------------------------------------------------------------------------------------------------------- 0.66s
    cisco.nac_dc_vxlan.common : Build Interface Po ---------------------------------------------------------------------------------------------------------------- 0.66s

    ROLES RECAP **********************************************************************************************************************************************************
    Tuesday 07 May 2025  17:49:24 +0000 (0:00:00.184)       0:03:25.963 *********** 
    =============================================================================== 
    deploy ---------------------------------------------------------------- 151.01s
    common ----------------------------------------------------------------- 42.97s
    validate ---------------------------------------------------------------- 6.01s
    connectivity_check ------------------------------------------------------ 3.88s
    common_global ----------------------------------------------------------- 0.05s
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    total ----------------------------------------------------------------- 203.93s

Step 2 - Return to NDFC & Verify Deployment

Return to your NDFC browser window and verify the deployment of the fabric configuration.

  1. Click the Switches tab in the top navigation bar

  2. Verify you see you switches in the Config Status as In-Sync. If not, please click the refresh button to the right of the Actions button



  3. Click Interfaces
  4. There will be many interfaces, but you should now be able to confirm interface configurations to your switches



  5. Click the VRFs tab in the top navigation bar
  6. Verify you see the VRF NaC-VRF01 now with a Deployed status
  7. Double-click NaC-VRF01 to review the VRF details



  8. Click VRF Attachments
  9. Confirm NaC-VRF01 is now Deployed and Attached to your switches



  10. Click Networks
  11. Confirm NaC-Net01 and NaC-Net02 is associated to NaC-VRF01 and Deployed to your switches
  12. Click the close button



  13. Click the Networks tab in the top navigation bar
  14. Verify you see the Networks NaC-Net01 and NaC-Net02 now Deployed.
  15. Double-click NaC-Net01 to review the Network details



  16. Click Network Attachments
  17. Confirm NaC-Net01 is now Deployed and Attached to your switches



  18. Click VRFs
  19. Confirm NaC-VRF01 is associated to NaC-Net01 and Deployed to your switches
  20. Click the close button



  21. Click the Overview tab in the top navigation bar
  22. Verify your overall fabric deployment status


Congratulations!
You have automated the build of a functional VXLAN EVPN fabric in a staging environment!

In the next section, you will extend connectivity between your VXLAN EVPN fabric and an external environment.


Continue to the next section to checkout how to remove things from your VXLAN EVPN fabric.