Configuring DHCP Snooping

For information about DHCP Snooping, see the Cisco Nexus 9000 Series NX-OS Security Configuration Guide:

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

Configuring DHCP Option82 Suboption Circuit Id String (on a Port-Channel Interface)

Configuring DHCP Option82 Suboption Circuit Id String (on a Port-Channel Interface)
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "dhcpEntity": {
          "children": [
            {
              "dhcpInst": {
                "children": [
                  {
                    "dhcpClientIf": {
                      "attributes": {
                        "circuitId": "SampleString_123",
                        "id": "po123"
                      }
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "pcAggrIf": {
                "attributes": {
                  "id": "po123"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <clientif-items>
        <ClientIf-list>
          <id>po123</id>
          <circuitId>SampleString_123</circuitId>
        </ClientIf-list>
      </clientif-items>
    </inst-items>
  </dhcp-items>
  <intf-items>
    <aggr-items>
      <AggrIf-list>
        <id>po123</id>
      </AggrIf-list>
    </aggr-items>
  </intf-items>
</System>

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

You can enable or disable the insertion and removal of Option 82 information for DHCP packets forwarded without the use of the DHCP relay agent. By default, the device does not include Option 82 information in DHCP packets.


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.

interface port-channel 123
  ip dhcp option82 suboption circuit-id SampleString_123


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
dhcpEntity sys/dhcp
dhcpInst sys/dhcp/inst
dhcpClientIf sys/dhcp/inst/clientif-[po123]
interfaceEntity sys/intf
pcAggrIf sys/intf/aggr-[po123]


dhcpClientIf Properties

The following table contains information about the dhcpClientIf 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
circuitIddhcp:StringBasicDhcp
(string:Basic)
Option82 suboption Circuit Id Information to Per PortA sequence of characters
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100


pcAggrIf Properties

The following table contains information about the pcAggrIf 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
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100


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

Configuring an IP DHCP Snooping Suboption

Configuring an IP DHCP Snooping Suboption
POST http://<mgmt0_IP>/api/mo/sys/dhcp.json
{
  "dhcpEntity": {
    "children": [
      {
        "dhcpInst": {
          "attributes": {
            "snoopSubOptionCircuitIdFormatString": "test"
}}}]}}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <snoopSubOptionCircuitIdFormatString>test</snoopSubOptionCircuitIdFormatString>
    </inst-items>
  </dhcp-items>
</System>

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


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.

ip dhcp snooping sub-option circuit-id format-type string format test


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.


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
portsecurityPortSecurity sys/portsec
portsecurityPortSecurityIf sys/portsec/if-[po123]
interfaceEntity sys/intf
pcAggrIf sys/intf/aggr-[po123]


dhcpInst Properties

The following table contains information about the dhcpInst 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
snoopSubOptionCircuitIdFormatStringdhcp:StringBasicDhcp
(string:Basic)
Snoop Sub-Option Circuit-id Format StringA sequence of characters


Related Documentation


dhcpInst Properties

The following table contains information about the dhcpInst 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
snoopSubOptionCircuitIdFormatStringdhcp:StringBasicDhcp
(string:Basic)
Snoop Sub-Option Circuit-id Format StringA sequence of characters


Related Documentation


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
dhcpEntity sys/dhcp
dhcpInst sys/dhcp/inst


dhcpInst Properties

The following table contains information about the dhcpInst 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
snoopSubOptionCircuitIdFormatStringdhcp:StringBasicDhcp
(string:Basic)
Snoop Sub-Option Circuit-id Format StringA sequence of characters


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 IP DHCP Snooping Suboption

 Deleting an IP DHCP Snooping Suboption
POST http://<mgmt0_IP>/api/mo/sys/dhcp.json
{
  "dhcpEntity": {
    "children": [
      {
        "dhcpInst": {
          "attributes": {
            "snoopSubOptionCircuitIdFormatString": ""
}}}]}}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <snoopSubOptionCircuitIdFormatString></snoopSubOptionCircuitIdFormatString>
    </inst-items>
  </dhcp-items>
</System>

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


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.

no ip dhcp snooping sub-option circuit-id format-type string format test


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
dhcpEntity sys/dhcp
dhcpInst sys/dhcp/inst


dhcpInst Properties

The following table contains information about the dhcpInst 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
snoopSubOptionCircuitIdFormatStringdhcp:StringBasicDhcp
(string:Basic)
Snoop Sub-Option Circuit-id Format StringA sequence of characters


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