Configuring IPv6 DHCP Guard Policies

The DHCPv6 Guard feature blocks DHCP reply and advertisement messages that originate from unauthorized DHCP servers and relay agents that forward DHCP packets from servers to clients. Client messages or messages sent by relay agents from clients to servers are not blocked. The filtering decision is determined by the device role assigned to the receiving switch port, trunk, or VLAN. This functionality helps to prevent traffic redirection or denial of service (DoS).

This section contains payload examples and CLIs to demonstrate how to use the NX-API REST API to configure IPv6 RA guard policies on Cisco Nexus 3000 and 9000 Series switches and to show how the REST APIs correspond to the CLI commands. For more information, 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 the Maximum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy

Configuring the Maximum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy
 http://<mgmt0_IP>/api/mo/sys/sisf.json
{
  "sisfEntity": {
    "children": [
      {
        "sisfInstDhcpGuard": {
          "attributes": {
            "PolicyName": "Pol1",
            "PreferenceMax": "123"
}}}]}}
{
    imdata:[]
}
<System>
  <sisf-items>
    <dhcpguard-items>
      <InstDhcpGuard-list>
        <PolicyName>Pol1</PolicyName>
        <PreferenceMax>123</PreferenceMax>
      </InstDhcpGuard-list>
    </dhcpguard-items>
  </sisf-items>
</System>


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.

ipv6 dhcp guard policy Pol1
 preference max 123

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
sisfEntity sys/sisf
sisfInstDhcpGuard sys/sisf/dhcpguard-{policyName}


sisfInstDhcpGuard Properties

The following table contains information about the sisfInstDhcpGuard 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
PolicyNamestring:Basic
Name of dhcp guard policyA sequence of characters
PreferenceMaxsisf:preferenceMax
(scalar:Uint16)
Configure maximum allowed advertised server preference
RANGE: [0 , 255]
DEFAULT: 255


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 Configuration of the Maximum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy

Deleting the Configuration of the Maximum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy
 http://<mgmt0_IP>/api/mo/sys/sisf.json
{
  "sisfEntity": {
    "children": [
      {
        "sisfInstDhcpGuard": {
          "attributes": {
            "PolicyName": "Pol1",
            "PreferenceMax": "255"
}}}]}}
{
    imdata:[]
}
<System>
  <sisf-items>
    <dhcpguard-items>
      <InstDhcpGuard-list>
        <PolicyName>Pol1</PolicyName>
        <PreferenceMax>255</PreferenceMax>
      </InstDhcpGuard-list>
    </dhcpguard-items>
  </sisf-items>
</System>


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.

ipv6 dhcp guard policy Pol1
 no preference max 123

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
sisfEntity sys/sisf
sisfInstDhcpGuard sys/sisf/dhcpguard-{policyName}


sisfInstDhcpGuard Properties

The following table contains information about the sisfInstDhcpGuard 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
PolicyNamestring:Basic
Name of dhcp guard policyA sequence of characters
PreferenceMaxsisf:preferenceMax
(scalar:Uint16)
Configure maximum allowed advertised server preference
RANGE: [0 , 255]
DEFAULT: 255


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 the Minimum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy

Configuring the Minimum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy
 http://<mgmt0_IP>/api/mo/sys/sisf.json
{
        "sisfEntity": {
          "children": [
            {
              "sisfInstDhcpGuard": {
                "attributes": {
                  "PolicyName": "POL1",
                  "PreferenceMin": "123"
}}}]}}
{
    imdata:[]
}
<System>
  <sisf-items>
    <dhcpguard-items>
      <InstDhcpGuard-list>
        <PolicyName>POL1</PolicyName>
        <PreferenceMin>123</PreferenceMin>
      </InstDhcpGuard-list>
    </dhcpguard-items>
  </sisf-items>
</System>


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.

ipv6 dhcp guard policy Pol1
 preference min 123

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
sisfEntity sys/sisf
sisfInstDhcpGuard sys/sisf/dhcpguard-{policyName}


sisfInstDhcpGuard Properties

The following table contains information about the sisfInstDhcpGuard 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
PolicyNamestring:Basic
Name of dhcp guard policyA sequence of characters
PreferenceMinsisf:preferenceMin
(scalar:Uint16)
Configure minimum allowed advertised server preference
RANGE: [0 , 255]
DEFAULT: 0


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 Configuration of the Minimum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy

Deleting the Configuration of the Minimum Number for the Allowed Advertised Server Preference of an IPv6 DHCP Guard Policy
 http://<mgmt0_IP>/api/mo/sys/sisf.json
{
        "sisfEntity": {
          "children": [
            {
              "sisfInstDhcpGuard": {
                "attributes": {
                  "PolicyName": "POL1",
                  "PreferenceMin": "0"
}}}]}}
{
    imdata:[]
}
<System>
  <sisf-items>
    <dhcpguard-items>
      <InstDhcpGuard-list>
        <PolicyName>POL1</PolicyName>
        <PreferenceMin>0</PreferenceMin>
      </InstDhcpGuard-list>
    </dhcpguard-items>
  </sisf-items>
</System>


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.

ipv6 dhcp guard policy Pol1
 no preference min 123

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
sisfEntity sys/sisf
sisfInstDhcpGuard sys/sisf/dhcpguard-{policyName}


sisfInstDhcpGuard Properties

The following table contains information about the sisfInstDhcpGuard 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
PolicyNamestring:Basic
Name of dhcp guard policyA sequence of characters
PreferenceMinsisf:preferenceMin
(scalar:Uint16)
Configure minimum allowed advertised server preference
RANGE: [0 , 255]
DEFAULT: 0


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 Trusted Port (No Policing) for an IPv6 DHCP Guard Policy

Configuring Trusted Port (No Policing) for an IPv6 DHCP Guard Policy
 http://<mgmt0_IP>/api/mo/sys/sisf.json
{
  "sisfEntity": {
    "children": [
      {
        "sisfInstDhcpGuard": {
          "attributes": {
            "PolicyName": "Pol1",
            "TrustedPortEnabled": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <sisf-items>
    <dhcpguard-items>
      <InstDhcpGuard-list>
        <PolicyName>Pol1</PolicyName>
        <TrustedPortEnabled>true</TrustedPortEnabled>
      </InstDhcpGuard-list>
    </dhcpguard-items>
  </sisf-items>
</System>


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.

ipv6 dhcp guard policy Pol1
 trusted-port

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
sisfEntity sys/sisf
sisfInstDhcpGuard sys/sisf/dhcpguard-{policyName}


sisfInstDhcpGuard Properties

The following table contains information about the sisfInstDhcpGuard 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
PolicyNamestring:Basic
Name of dhcp guard policyA sequence of characters
TrustedPortEnabledscalar:Bool
Setup trusted portSELECTION: true or false


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 Trusted Port (No Policing) Configuration for an IPv6 DHCP Guard Policy

Deleting the Trusted Port (No Policing) Configuration for an IPv6 DHCP Guard Policy
 http://<mgmt0_IP>/api/mo/sys/sisf.json
{
  "sisfEntity": {
    "children": [
      {
        "sisfInstDhcpGuard": {
          "attributes": {
            "PolicyName": "Pol1",
            "TrustedPortEnabled": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <sisf-items>
    <dhcpguard-items>
      <InstDhcpGuard-list>
        <PolicyName>Pol1</PolicyName>
        <TrustedPortEnabled>false</TrustedPortEnabled>
      </InstDhcpGuard-list>
    </dhcpguard-items>
  </sisf-items>
</System>


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.

ipv6 dhcp guard policy Pol1
 no trusted-port

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
sisfEntity sys/sisf
sisfInstDhcpGuard sys/sisf/dhcpguard-{policyName}


sisfInstDhcpGuard Properties

The following table contains information about the sisfInstDhcpGuard 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
PolicyNamestring:Basic
Name of dhcp guard policyA sequence of characters
TrustedPortEnabledscalar:Bool
Setup trusted portSELECTION: true or false


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

Attaching an IPv6 DHCP Guard Policy to an Ethernet Interface

Attaching an IPv6 DHCP Guard Policy to an Ethernet Interface 
POST http://<mgmt0_IP>/api/mo/sys/sisf.json
{
  "sisfEntity": {
    "children": [
      {
        "sisfFhsIf": {
          "attributes": {
              "dhcpGuardPolicyName": "POL1",
              "id": "eth1/16",  
}}}]}}
{
    "imdata": []
}
<System>
  <sisf-items>
    <fhsif-items>
      <FhsIf-list>
        <id>eth1/16</id>
        <dhcpGuardPolicyName>POL1</dhcpGuardPolicyName> 
      </FhsIf-list>
    </fhsif-items>
  </sisf-items>
</System>


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 eth 1/16
 ipv6 dhcp guard attach-policy POL1

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
sisfEntity sys/sisf
sisfFhsIf sys/sisf/fhsif-{[id]}


sisfFhsIf Properties

The following table contains information about the sisfFhsIf 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
dhcpGuardPolicyNamestring:Basic
Attach a dhcp guard policy of FHS featureA 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


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 an IPv6 DHCP Guard Policy from an Ethernet Interface

Removing an IPv6 DHCP Guard Policy from an Ethernet Interface 
POST http://<mgmt0_IP>/api/mo/sys/sisf.json
{
  "sisfEntity": {
    "children": [
      {
        "sisfFhsIf": {
          "attributes": {
              "dhcpGuardPolicyName": "",
              "id": "eth1/16",  
}}}]}}
{
    "imdata": []
}
<System>
  <sisf-items>
    <fhsif-items>
      <FhsIf-list>
        <id>eth1/16</id>
        <dhcpGuardPolicyName></dhcpGuardPolicyName>
      </FhsIf-list>
    </fhsif-items>
  </sisf-items>
</System>


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 eth 1/16
 no ipv6 dhcp guard attach-policy POL1

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
sisfEntity sys/sisf
sisfFhsIf sys/sisf/fhsif-{[id]}


sisfFhsIf Properties

The following table contains information about the sisfFhsIf 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
dhcpGuardPolicyNamestring:Basic
Attach a dhcp guard policy of FHS featureA 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


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

Attaching an IPv6 DHCP Guard Policy to a Switchport Interface

Attaching an IPv6 DHCP Guard Policy to a Switchport Interface
http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/3",
                  "layer": "Layer2",
                  "userCfgdFlags": "admin_layer"
                }
              }
            }
          ]
        }
      },
      {
        "sisfEntity": {
          "children": [
            {
              "sisfFhsIf": {
                "attributes": {
                  "dhcpGuardPolicyName": "POL1",  
                  "id": "eth1/3"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/3</id>
        <layer>Layer2</layer>
        <userCfgdFlags>admin_layer</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <sisf-items>
    <FhsIf-items>
      <FhsIf-list>
        <id>eth1/3</id>
        <dhcpGuardPolicyName>POL1</dhcpGuardPolicyName>  
      </FhsIf-list>
    </FhsIf-items>
  </sisf-items>
</System>


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 ethernet 1/3
 switchport
  ipv6 dhcp guard attach-policy POL1

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
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
sisfEntity sys/sisf
sisfFhsIf sys/sisf/fhsif-{[id]}


l1PhysIf Properties

The following table contains information about the l1PhysIf 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
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


sisfFhsIf Properties

The following table contains information about the sisfFhsIf 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
dhcpGuardPolicyNamestring:Basic
Attach a dhcp guard policy of FHS featureA 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


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 an IPv6 DHCP Guard Policy from a Switchport Interface

Removing an IPv6 DHCP Guard Policy from a Switchport Interface
 http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/3",
                  "layer": "Layer2",
                  "userCfgdFlags": "admin_layer"
                }
              }
            }
          ]
        }
      },
      {
        "sisfEntity": {
          "children": [
            {
              "sisfFhsIf": {
                "attributes": {
                  "dhcpGuardPolicyName": "", 
                  "id": "eth1/3"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/3</id>
        <layer>Layer2</layer>
        <userCfgdFlags>admin_layer</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <sisf-items>
    <FhsIf-items>
      <FhsIf-list>
        <id>eth1/3</id>
        <dhcpGuardPolicyName></dhcpGuardPolicyName> 
      </FhsIf-list>
    </FhsIf-items>
  </sisf-items>
</System>


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 ethernet 1/3
 switchport
  no ipv6 dhcp guard attach-policy POL1

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
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
sisfEntity sys/sisf
sisfFhsIf sys/sisf/fhsif-{[id]}


l1PhysIf Properties

The following table contains information about the l1PhysIf 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
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


sisfFhsIf Properties

The following table contains information about the sisfFhsIf 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
dhcpGuardPolicyNamestring:Basic
Attach a dhcp guard policy of FHS featureA 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


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

Attaching an IPv6 DHCP Guard Policy to a VLAN Configuration

Attaching an IPv6 DHCP Guard Policy to a VLAN Configuration
POST http://<mgmt0_IP>/api/mo/sys.json

{
  "topSystem": {
    "children": [
      {
        "bdEntity": {
          "children": [
            {
              "l2VlanConfig": {
                "attributes": {
                  "accEncap": "vlan-127"
                }
              }
            }
          ]
        }
      },
      {
        "sisfEntity": {
          "children": [
            {
              "sisfFhsVlan": {
                "attributes": {
                  "dhcpGuardPolicyName": "POL1",
                  "vlanID": "127"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    'imdata': []
}
<System>
  <bd-items>
    <vlanconfig-items>
      <VlanConfig-list>
        <accEncap>vlan-127</accEncap>
      </VlanConfig-list>
    </vlanconfig-items>
  </bd-items>
  <sisf-items>
    <fhsvlan-items>
      <FhsVlan-list>
        <vlanID>127</vlanID>
        <dhcpGuardPolicyName>POL1</dhcpGuardPolicyName>
      </FhsVlan-list>
    </fhsvlan-items>
  </sisf-items>
</System>


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 config 127
 ipv6 dhcp guard attach-policy POL1

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
bdEntity sys/bd
l2VlanConfig sys/bd/vlanconfig-{[accEncap]}
sisfEntity sys/sisf
sisfFhsVlan sys/sisf/fhsvlan-{vlanID}


l2VlanConfig Properties

The following table contains information about the l2VlanConfig 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
accEncapbase:Encap
Access EncapsulationSELECTION: unknown, vlan-%d or vxlan-%d


sisfFhsVlan Properties

The following table contains information about the sisfFhsVlan 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
dhcpGuardPolicyNamestring:Basic
Attach a dhcp guard policy of FHS featureA sequence of characters
vlanIDsisf:VlanID
(scalar:Uint16)
Vlan Number
RANGE: [1 , 4096]


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 an IPv6 DHCP Guard Policy from a VLAN Configuration

Removing an IPv6 DHCP Guard Policy from a VLAN Configuration 
 http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "bdEntity": {
          "children": [
            {
              "l2VlanConfig": {
                "attributes": {
                  "accEncap": "vlan-127"
                }
              }
            }
          ]
        }
      },
      {
        "sisfEntity": {
          "children": [
            {
              "sisfFhsVlan": {
                "attributes": {
                  "dhcpGuardPolicyName": "",
                  "vlanID": "127"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <bd-items>
    <vlanconfig-items>
      <VlanConfig-list>
        <accEncap>vlan-127</accEncap>
      </VlanConfig-list>
    </vlanconfig-items>
  </bd-items>
  <sisf-items>
    <fhsvlan-items>
      <FhsVlan-list>
        <vlanID>127</vlanID>
        <dhcpGuardPolicyName></dhcpGuardPolicyName>
      </FhsVlan-list>
    </fhsvlan-items>
  </sisf-items>
</System>


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 configuration 127
 no ipv6 dhcp guard attach-policy POL1

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
bdEntity sys/bd
l2VlanConfig sys/bd/vlanconfig-{[accEncap]}
sisfEntity sys/sisf
sisfFhsVlan sys/sisf/fhsvlan-{vlanID}


l2VlanConfig Properties

The following table contains information about the l2VlanConfig 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
accEncapbase:Encap
Access EncapsulationSELECTION: unknown, vlan-%d or vxlan-%d


sisfFhsVlan Properties

The following table contains information about the sisfFhsVlan 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
dhcpGuardPolicyNamestring:Basic
Attach a dhcp guard policy of FHS featureA sequence of characters
vlanIDsisf:VlanID
(scalar:Uint16)
Vlan Number
RANGE: [1 , 4096]


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