Configuring and Disabling 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, Release 7.x.
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
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
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