Configuring PVLAN on a VLAN

Configuring the VLAN as a Community PVLAN

Configuring the VLAN as a Community PVLAN
POST http://<mgmt0_IP>/api/mo/sys.json

{
  "topSystem": {
    "children": [
      {
        "pvlanPrivateVlan": {
          "children": [
            {
              "pvlanVlan": {
                "attributes": {
                  "id": "vlan-10",
                  "pvlanType": "community"
                }
              }
            }
          ]
        }
      },
      {
        "bdEntity": {
          "children": [
            {
              "l2BD": {
                "attributes": {
                  "fabEncap": "vlan-10"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <pvlan-items>
    <vlan-items>
      <Vlan-list>
        <id>vlan-10</id>
        <pvlanType>community</pvlanType>
      </Vlan-list>
    </vlan-items>
  </pvlan-items>
  <bd-items>
    <bd-items>
      <BD-list>
        <fabEncap>vlan-10</fabEncap>
      </BD-list>
    </bd-items>
  </bd-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

vlan 10
  private-vlan community

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
pvlanPrivateVlan sys/pvlan
pvlanVlan sys/pvlan/vlan-{[id]}
bdEntity sys/bd
l2BD sys/bd/bd-{[fabEncap]}


pvlanVlan Properties

The following table contains information about the pvlanVlan properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
idbase:Encap
VLAN ID in a PVLANSELECTION: unknown, vlan-%d or vxlan-%d
pvlanTypel2:PvlanTypes
(scalar:Enum8)
Type of VLAN in a PVLAN: Primary, Community or IsolatedSELECTION:
1 - isolated
2 - community
3 - primary
4 - nonOperational
DEFAULT: nonOperational


l2BD Properties

The following table contains information about the l2BD properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
fabEncapbase:Encap
The Layer 2 bridge-domain Fabric encapsulation (VNID).SELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the VLAN as a Community PVLAN

Deleting the VLAN as a Community PVLAN
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "pvlanPrivateVlan": {
          "children": [
            {
              "pvlanVlan": {
                "attributes": {
                  "id": "vlan-10",
                  "status": "deleted"
                }
              }
            }
          ]
        }
      },
      {
        "bdEntity": {
          "children": [
            {
              "l2BD": {
                "attributes": {
                  "fabEncap": "vlan-10"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <pvlan-items>
    <vlan-items>
      <Vlan-list nc:operation="delete">
        <id>vlan-10</id>
      </Vlan-list>
    </vlan-items>
  </pvlan-items>
  <bd-items>
    <bd-items>
      <BD-list>
        <fabEncap>vlan-10</fabEncap>
      </BD-list>
    </bd-items>
  </bd-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

vlan 10
  no private-vlan community

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
pvlanPrivateVlan sys/pvlan
pvlanVlan sys/pvlan/vlan-{[id]}
bdEntity sys/bd
l2BD sys/bd/bd-{[fabEncap]}


pvlanVlan Properties

The following table contains information about the pvlanVlan properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
idbase:Encap
VLAN ID in a PVLANSELECTION: unknown, vlan-%d or vxlan-%d
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


l2BD Properties

The following table contains information about the l2BD properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
fabEncapbase:Encap
The Layer 2 bridge-domain Fabric encapsulation (VNID).SELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Adding an Association Between PVLANs

Adding an Association Between PVLANs
POST http://<mgmt0_IP>/api/mo/sys.json

{
  "topSystem": {
    "children": [
      {
        "pvlanPrivateVlan": {
          "children": [
            {
              "pvlanVlan": {
                "attributes": {
                  "association": "1129",
                  "id": "vlan-10"
                }
              }
            }
          ]
        }
      },
      {
        "bdEntity": {
          "children": [
            {
              "l2BD": {
                "attributes": {
                  "fabEncap": "vlan-10"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <pvlan-items>
    <vlan-items>
      <Vlan-list>
        <id>vlan-10</id>
        <association>1129</association>
      </Vlan-list>
    </vlan-items>
  </pvlan-items>
  <bd-items>
    <bd-items>
      <BD-list>
        <fabEncap>vlan-10</fabEncap>
      </BD-list>
    </bd-items>
  </bd-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

vlan 10
  private-vlan association add 1129

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
pvlanPrivateVlan sys/pvlan
pvlanVlan sys/pvlan/vlan-{[id]}
bdEntity sys/bd
l2BD sys/bd/bd-{[fabEncap]}


pvlanVlan Properties

The following table contains information about the pvlanVlan properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
associationl2:VlanBitmap
(base:BitArray)
Association of Primay VLAN to Secondary VLANs in a PVLAN
ARRAY SIZE: 4096
idbase:Encap
VLAN ID in a PVLANSELECTION: unknown, vlan-%d or vxlan-%d


l2BD Properties

The following table contains information about the l2BD properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
fabEncapbase:Encap
The Layer 2 bridge-domain Fabric encapsulation (VNID).SELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Removing a VLAN from a PVLAN List

Removing a VLAN from a PVLAN List 
POST http://<mgmt0_IP>/api/mo/sys.json

{
  "topSystem": {
    "children": [
      {
        "pvlanPrivateVlan": {
          "children": [
            {
              "pvlanVlan": {
                "attributes": {
                  "association": "",
                  "id": "vlan-10"
                }
              }
            }
          ]
        }
      },
      {
        "bdEntity": {
          "children": [
            {
              "l2BD": {
                "attributes": {
                  "fabEncap": "vlan-10"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <pvlan-items>
    <vlan-items>
      <Vlan-list>
        <id>vlan-10</id>
        <association></association>
      </Vlan-list>
    </vlan-items>
  </pvlan-items>
  <bd-items>
    <bd-items>
      <BD-list>
        <fabEncap>vlan-10</fabEncap>
      </BD-list>
    </bd-items>
  </bd-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

vlan 10
  private-vlan association remove 1129

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
pvlanPrivateVlan sys/pvlan
pvlanVlan sys/pvlan/vlan-{[id]}
bdEntity sys/bd
l2BD sys/bd/bd-{[fabEncap]}


pvlanVlan Properties

The following table contains information about the pvlanVlan properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
associationl2:VlanBitmap
(base:BitArray)
Association of Primay VLAN to Secondary VLANs in a PVLAN
ARRAY SIZE: 4096
idbase:Encap
VLAN ID in a PVLANSELECTION: unknown, vlan-%d or vxlan-%d


l2BD Properties

The following table contains information about the l2BD properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
fabEncapbase:Encap
The Layer 2 bridge-domain Fabric encapsulation (VNID).SELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting an Association Between PVLANs

Deleting an Association Between PVLANs 
POST http://<mgmt0_IP>/api/mo/sys.json

{
  "topSystem": {
    "children": [
      {
        "pvlanPrivateVlan": {
          "children": [
            {
              "pvlanVlan": {
                "attributes": {
                  "association": "",
                  "id": "vlan-10"
                }
              }
            }
          ]
        }
      },
      {
        "bdEntity": {
          "children": [
            {
              "l2BD": {
                "attributes": {
                  "fabEncap": "vlan-10"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <pvlan-items>
    <vlan-items>
      <Vlan-list>
        <id>vlan-10</id>
        <association></association>
      </Vlan-list>
    </vlan-items>
  </pvlan-items>
  <bd-items>
    <bd-items>
      <BD-list>
        <fabEncap>vlan-10</fabEncap>
      </BD-list>
    </bd-items>
  </bd-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

vlan 10
  no private-vlan association 1129

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
pvlanPrivateVlan sys/pvlan
pvlanVlan sys/pvlan/vlan-{[id]}
bdEntity sys/bd
l2BD sys/bd/bd-{[fabEncap]}


pvlanVlan Properties

The following table contains information about the pvlanVlan properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
associationl2:VlanBitmap
(base:BitArray)
Association of Primay VLAN to Secondary VLANs in a PVLAN
ARRAY SIZE: 4096
idbase:Encap
VLAN ID in a PVLANSELECTION: unknown, vlan-%d or vxlan-%d


l2BD Properties

The following table contains information about the l2BD properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
fabEncapbase:Encap
The Layer 2 bridge-domain Fabric encapsulation (VNID).SELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html