Ad Home

Cisco ACI Basic Scripting XML

Share:
NOTE: COPY ALL AND PASTE AS XML 

<!-- Create Interface Policy Group -->

<infraInfra>
  <infraFuncP>
   <infraAccPortGrp name="interface-policy-group-name">     <!--Creates the policy group with the specified name-->
        <infraRsMonIfInfraPol tnMonInfraPolName=""/>        <!--Associates monitoring policy with this interface policy group-->
        <infraRsLldpIfPol tnLldpIfPolName=""/>              <!--Associates LLDP policy with this interface policy group-->
        <infraRsStpIfPol tnStpIfPolName=""/>                <!--Associates STP policy with this interface policy group-->
        <infraRsCdpIfPol tnCdpIfPolName=""/>                <!--Associates CDP policy with this interface policy group-->
        <infraRsAttEntP tDn="uni/infra/attentp-AEP-name"/>  <!--Associates specified Attachable Entity Profile with this interface policy group-->
    </infraAccPortGrp>
  </infraFuncP>
</infraInfra>


<!-- Create Interface Profile -->

<infraInfra>
<infraAccPortP name="int-profile-name">     <!--Creates interface profile with the specified name-->
      <infraHPortS name="port-range-name" type="range"> <!--Creates an interface selector with the specified name-->
         <infraPortBlk name="block0" fromPort="port-number" toPort="port-number" /> <!--Creates port blocks with the specified range-->
         <infraRsAccBaseGrp tDn="uni/infra/funcprof/accportgrp-int-policy-group" /> <!--Associates this profile with the specified interface policy group-->
      </infraHPortS>
   </infraAccPortP>
</infraInfra>


<!-- Create Application Profile and End Point Group -->

<fvTenant name="tenant-name" >          <!--Modifies existing tenant-->
  <fvAp name="app-profile-name" >       <!--Creates new application profile under the tenant-->
    <fvAEPg name="epg-name" >           <!--Creates new EPG under the app profile-->
      <fvRsCons prio="unspecified" tnVzBrCPName="contract-name"/>       <!--Consumes contract from this EPG-->
      <fvRsProv matchT="AtleastOne" prio="unspecified" tnVzBrCPName="contract-name"/>    <!--Provides contract from this EPG-->
      <fvRsDomAtt encap="Port-encap-VLAN" instrImedcy="lazy|immediate" resImedcy="lazy|immediate|pre-provision" tDn="domain-name"/>  <!--Associates EPG with domain, specifies on-demand or immediate deployment immediacy and on-demand, immediate or pre-provision resolution immediacy. Also specify static port-encap if required.-->
      <fvRsProv  tnVzBrCPName="provided-contract" />    <!--Specifies a contract provided by this EPG-->
            <vzProvLbl isComplement="no" name="label-name" tag="colour"/>   <!--Assigns a label to this provided contract (optional)-->
      <fvRsCons  tnVzBrCPName="consumed-contract" />    <!--Specifies a contract consumed by this EPG-->
            <vzConsLbl name="label-name"  tag="colour"/>    <!--Assigns a label to this consumed contract (optional)-->
      <fvRsBd  tnFvBDName="bridge-domain"/>     <!--Specifies the bridge domain within which this EPG is contained-->
      <fvRsPathAtt encap="vlan-10" instrImedcy="lazy" status="" tDn="topology/pod-1/paths-17/pathep-[eth1/1]"/>     <!--Specifies a static path binding to be associated with this EPG (optional)-->
      <fvRsNodeAtt encap="vlan-10" instrImedcy="lazy" mode="{tagged|untagged|native}" tDn="topology/pod-1/node-17"/>        <!--Specifies a static leaf binding to be associated with this EPG (optional)-->
      <vzProvLbl isComplement="no" name="label-name"  tag="colour"/>    <!--Specifies an EPG label on the provider side-->
      <vzConsLbl name="label-name"  tag="colour"/>      <!--Specifies an EPG label on the consumer side-->
    </fvAEPg>
  </fvAp>
</fvTenant>


<!-- Create Bridge Domain (layer 3) -->

<fvTenant name="tenant-name" >                                          <!--Choose existing tenant-->
  <fvBD name="bd-name" >                                                <!--Create and name BD-->
    <fvSubnet ip="gateway-address" scope="private|public|shared" />     <!--Choose gateway address and scope-->
    <fvRsCtx  tnFvCtxName="private-net-name"/>                          <!--Link to VRF-->
    <fvRsBDToOut tnL3extOutName="associated-L3-Out"/>                   <!--Link to L3out-->
  </fvBD>
</fvTenant>

<!--OPTIONAL - Creates a bridge domain and enables ARP flooding and unknown unicast flooding. Also sets multi-destination flooding to 'encap-flood' (flood within EPG / encap)-->
  <fvBD name="bd-name" epMoveDetectMode="" limitIpLearnToSubnets="no" arpFlood="yes" unicastRoute="yes" unkMacUcastAct="proxy" multiDstPktAct="bd-flood">
  </fvBD>


<!-- Create Bridge Domain (layer 2) --> 

  <fvTenant name="tenant-name" >                                          <!--Choose existing tenant-->
  <fvBD name="bd-name" >                                                <!--Create and name BD-->
    <fvRsCtx  tnFvCtxName="private-net-name"/>                          <!--Link to VRF-->
  </fvBD>
</fvTenant>

<!--OPTIONAL - Creates a bridge domain and enables ARP flooding and unknown unicast flooding. Also sets multi-destination flooding to 'encap-flood' (flood within EPG / encap)-->
  <fvBD name="bd-name" epMoveDetectMode="" limitIpLearnToSubnets="no" arpFlood="yes" unicastRoute="no" unkMacUcastAct="flood" multiDstPktAct="bd-flood">
  </fvBD>

No hay comentarios

COMENTA CON TU PERFIL DEFACEBOK

Ad Home