Configuring CDP and LLDP in Leaf and Spine Switches Using the REST API

All associated leaf and spine switches in the Cisco ACI fabric must support Cisco APIC release 4.2(1) at a minimum. In the following task, you create a separate CDP and LLDP policy dedicated for management interfaces, and then you add the policy to the leaf switch policy group as a node level policy

Procedure

  1. Specify the leaf switch selector name and node block range and associate it with the appropriate leaf switch policy group.

    Example

    <polUni>
    <infraInfra>
    <infraNodeP name="test" status="">
        <infraLeafS name="test" type="range">
            <infraNodeBlk name="test" from_="101" to_="101"/>
            <infraRsAccNodePGrp tDn="uni/infra/funcprof/accnodepgrp-test" status="" />
        </infraLeafS>
    </infraNodeP>
    
  2. Specify the spine switch selector name and node block range and associate it with the appropriate spine switch policy group. Example

    <infraSpineP name="test" status="">
      <infraSpineS name="test" type="range" >
          <infraNodeBlk name="test" from_="103" to_="103" />
          <infraRsSpineAccNodePGrp tDn="uni/infra/funcprof/spaccnodepgrp-test" />
      </infraSpineS>
    
  3. Configure the leaf switch policy group with the CDP and LLDP policies. Example

    <infraFuncP>
                 <infraAccNodePGrp name="test">
            <infraRsLeafPGrpToCdpIfPol tnCdpIfPolName="mgmt" status=""/>
            <infraRsLeafPGrpToLldpIfPol tnLldpIfPolName="mgmt" status=""/>
        </infraAccNodePGrp>
    
  4. Configure the spine switch policy group with the CDP and LLDP policies. Example

    <infraSpineAccNodePGrp name="test">
             <infraRsSpinePGrpToCdpIfPol tnCdpIfPolName="mgmt" status=""/>
             <infraRsSpinePGrpToLldpIfPol tnLldpIfPolName="mgmt" status=""/>
        </infraSpineAccNodePGrp>
        </infraFuncP>
    
  5. Specify the attributes for the CDP and LLDP policies that are configured. Example

    <lldpIfPol name="mgmt" adminRxSt="disabled" adminTxSt="enabled" />
       <cdpIfPol name="mgmt" adminSt="enabled" />
    </infraInfra>
</polUni>
  1. Enable DCBX on the default fabric level policy. Example
    <lldpInstPol  dn="uni/fabric/lldpInstP-default" holdTime="120" initDelayTime="2" name="default" nameAlias="" optTlvSel="dcbx" userdom="all"/>
  1. Enable DCBX IEEE 802.1 on the default interface level policy. Example
    <lldpIfPol adminRxSt="enabled" adminTxSt="enabled"  dn="uni/infra/lldpIfP-default" name="default"  portDCBXPVer="IEEE" userdom=":all:common:"/>
  1. Enable the ETS Recommendation, ETS Configuration, and PFC Configuration additional lldp TLVs. Example

    Post : https:///api/mo/uni.xml

    Body: 

        <lldpInstPol  descr="" dn="uni/fabric/lldpInstP-default" holdTime="120" initDelayTime="2" name="default"  optTlvSel="link-aggregation,max-framesize,vlan-name"      userdom="all"/>