Configuring DHCPv6 Relay

You can configure the device to run a DHCPv6 relay agent, which forwards DHCPv6 packets between clients and servers. This feature is useful when clients and servers are not on the same physical subnet. Relay agents receive DHCPv6 messages and then generate a new DHCPv6 message to send out on another interface. The relay agent sets the gateway address (giaddr field of the DHCPv6 packet) and forwards it to the DHCPv6 server.

This section contains payload examples and CLIs to demonstrate how to use the NX-API REST API to configure DHCPv6 relay 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 DHCPv6 Relay

Configuring DHCPv6 Relay
POST http://<IP_Address>/api/mo/sys/dhcp.json
{
"dhcpEntity": {
  "children": [
    {
      "dhcpInst": {
        "attributes": {
          "v6RelayEnabled": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <v6RelayEnabled>true</v6RelayEnabled>
    </inst-items>
  </dhcp-items>
</System>


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ipv6 dhcp relay

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
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
v6RelayEnabledscalar:Bool
DHCPv6 EnabledSELECTION: 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

Disabling DHCPv6 Relay

Disabling DHCPv6 Relay
POST http://<IP_Address>/api/mo/sys/dhcp.json
{
"dhcpEntity": {
  "children": [
    {
      "dhcpInst": {
        "attributes": {
          "v6RelayEnabled": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <v6RelayEnabled>false</v6RelayEnabled>
    </inst-items>
  </dhcp-items>
</System>


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

no ipv6 dhcp relay

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
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
v6RelayEnabledscalar:Bool
DHCPv6 EnabledSELECTION: 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

Configuring DHCPv6 - Option 79

Configuring DHCPv6 - Option 79
POST http://<mgmt0_IP>/api/mo/sys/dhcp.json
{
  "dhcpEntity": {
    "children": [
      {
        "dhcpInst": {
          "attributes": {
            "ipv6RelayOption79Enabled": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <ipv6RelayOption79Enabled>true</ipv6RelayOption79Enabled>
    </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.

ipv6 dhcp relay option79


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
ipv6RelayOption79Enabledscalar:Bool
IPv6 Relay Option79 EnabledSELECTION: 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 DHCPv6 - Option 79

Deleting DHCPv6 - Option 79
POST http://<mgmt0_IP>/api/mo/sys/dhcp.json
{
  "dhcpEntity": {
    "children": [
      {
        "dhcpInst": {
          "attributes": {
            "ipv6RelayOption79Enabled": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <dhcp-items>
    <inst-items>
      <ipv6RelayOption79Enabled>false</ipv6RelayOption79Enabled>
    </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 ipv6 dhcp relay option79


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
ipv6RelayOption79Enabledscalar:Bool
IPv6 Relay Option79 EnabledSELECTION: 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