DHCPv6 Management
Data Model
The data model files matching DHCPv6 relay agent and DHCPv6 server are huawei-dhcp.yang and huawei-address-management.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-dhcp:dhcp-config/dhcpv4-config/enable |
Enables DHCP. |
The value is of the Boolean type:
|
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/source-interfaces/source-interface |
Configures the IPv6 address of a specified interface as the source IPv6 address of DHCPv6 client-sourced packets forwarded by the DHCPv6 relay agent in the system view. |
- |
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/dhcp-relays/dhcp-relay/source-interface-name |
Specifies the interface name. Configures the IPv6 address of a specified interface as the source IPv6 address of DHCPv6 client-sourced packets forwarded by the DHCPv6 relay agent in the interface view. |
- |
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/dhcp-relays/dhcp-relay/server-format/server-ip/server-ip |
Enables the DHCPv6 relay function and specifies the IPv6 address of the relayed DHCPv6 server. |
The value is a 32-digit hexadecimal number, in the X:X:X:X:X:X:X:X format. |
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/dhcp-relays/dhcp-relay/server-format/output-interface-name/output-interface-name |
Enables the DHCPv6 relay function and specifies the IPv6 address of the next-hop DHCPv6 relay agent. |
The value is a 32-digit hexadecimal number, in the X:X:X:X:X:X:X:X format. |
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/dhcp-relays/dhcp-relay/pd-route |
Indicates whether the function of forwarding routing information about DHCPv6 PD terminals through a DHCPv6 relay agent is enabled. |
The value is of the Boolean type:
|
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/pd-route-autosaves/pd-route-autosave/file-name |
Saves routing information forwarded through a relay agent to a specified file. |
The value is a string of 1 to 51 characters without spaces. A combination of digits, letters, underscores (_), and dots (.) is allowed. |
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/global-servers/global-server/database |
Enables the DHCPv6 data save function. The object includes:
|
|
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/global-option79-enable/option79-enable/insert-enable |
Indicates whether the function of inserting the Option79 field into DHCPv6 messages in the global view. |
The value is of the Boolean type:
|
N/A |
/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/dhcp-relays/dhcp-relay/option79-insert-enable |
Indicates whether the function of inserting the Option79 field into DHCPv6 messages in the interface view. |
The value is of the Boolean type:
|
N/A |
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool |
Creates an IPv6 address pool. |
The value is a string of 1 to 31 case-sensitive characters without spaces. The value can contain digits, letters, underscores (_), and dots (.). |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/link-address |
Specifies the network prefix and prefix length in an IPv6 address pool. The DHCPv6 server determines the clients on network segments to which the server assigns network configuration parameters from an address pool based on the configured network prefixes. |
The total length of the value is 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X. The prefix length is an integer that ranges from 16 to 128. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/information-refresh-time |
Configures the time for updating configuration parameters assigned to clients in stateless DHCPv6 mode from an IPv6 address pool. |
The value is an integer that ranges from 600 to 4294967295, in seconds. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/capwap-ac-ip |
Configures the AC's IPv6 address configured in an IPv6 address pool. |
The total length of the value is 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/domain/domain-name |
Configures the domain name suffix assigned to a DHCPv6 client from an IPv6 address pool. |
The value is a string of 1 to 63 case-insensitive characters without spaces. The value can contain digits, letters, underscores (_), and dots (.). |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/sip-server-ip |
Configures the SIP server IPv6 address assigned to a DHCPv6 client from an IPv6 address pool. |
The total length of the value is 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/sip-domain-name |
Configures the SIP domain name suffix assigned to a DHCPv6 client from an IPv6 address pool. |
The value is a string of 1 to 63 case-insensitive characters without spaces. The value can contain digits, letters, underscores (_), and dots (.). |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/nis-server-ip |
Configures the NIS server IPv6 address assigned to a DHCPv6 client from an IPv6 address pool. |
The total length of the value is 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/nis-domain-name |
Configures the NIS domain name suffix assigned to a DHCPv6 client from an IPv6 address pool. |
The value is a string of 1 to 63 case-insensitive characters without spaces. The value can contain digits, letters, underscores (_), and dots (.). |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/nisp-server-ip |
Configures the NISP server IPv6 address assigned to a DHCPv6 client from an IPv6 address pool. |
The total length of the value is 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/nisp-domain-name |
Configures the NISP domain name suffix assigned to a DHCPv6 client from an IPv6 address pool. |
The value is a string of 1 to 63 case-insensitive characters without spaces. The value can contain digits, letters, underscores (_), and dots (.). |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/sntp-server-ip |
Configures the SNTP server IPv6 address assigned to a DHCPv6 client from an IPv6 address pool. |
The total length of the value is 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/vendor-specific-options/vendor-specific-option/vendor-id |
Configures the vendor-defined option in an IPv6 address pool. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/vendor-specific-options/vendor-specific-option/sub-option |
Configures the vendor-defined DHCPv6 sub-option in an IPv6 address pool. The object includes:
|
|
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/pd-prefixes/pd-prefix |
Configures a delegated prefix in an IPv6 address pool. The object includes:
|
|
N/A |
/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/logging/log-type |
Enables the log function. |
The value can be:
|
N/A |
Configuring the DHCPv6 Relay Function
This section provides a sample of configuring the DHCPv6 relay function using the rpc method.
Operation |
XPATH |
---|---|
rpc |
|
Data Requirements
Item |
Data |
---|---|
Whether DHCP is enabled |
true |
Name of the interface where DHCPv6 relay is enabled |
VLANIF4000 |
IPv6 address of the proxy DHCPv6 server |
FC00::1 |
Name of the source interface |
Loopback2 |
Request Example
Ensure that VLANIF4000 and its IPv6 address have been configured and the IPv6 address of LoopBack2 has been configured before configuring this example.
<rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <if:name>Vlanif4000</if:name> <if:type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:propVirtual</if:type> <ip:ipv6 xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip"> <ip:enabled>true</ip:enabled> </ip:ipv6> </if:interface> <if:interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace"> <if:name>LoopBack2</if:name> <if:type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:softwareLoopback</if:type> </if:interface> </if:interfaces> <hw-dhcp:dhcp-config xmlns:hw-dhcp="urn:huawei:params:xml:ns:yang:huawei-dhcp"> <hw-dhcp:dhcpv4-config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <hw-dhcp:enable>true</hw-dhcp:enable> </hw-dhcp:dhcpv4-config> <hw-dhcp:dhcpv6-config> <hw-dhcp:dhcp-relay-configuration xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace"> <hw-dhcp:dhcp-relays> <hw-dhcp:dhcp-relay> <hw-dhcp:interface-name>Vlanif4000</hw-dhcp:interface-name> <hw-dhcp:server-ip>FC00::1</hw-dhcp:server-ip> <hw-dhcp:source-interface-name>LoopBack2</hw-dhcp:source-interface-name> </hw-dhcp:dhcp-relay> </hw-dhcp:dhcp-relays> </hw-dhcp:dhcp-relay-configuration> </hw-dhcp:dhcpv6-config> </hw-dhcp:dhcp-config> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-relay-configuration/dhcp-relays/dhcp-relay[interface-name='Vlanif4000']/server-ip[.='10.1.2.5']</error-path> <error-message>parse rpc config error.(Value "10.1.2.5" does not satisfy the constraint "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?" (range, length, or pattern).).</error-message> </rpc-error> </rpc-reply>
Configuring the DHCPv6 server function
This section provides a sample of configuring the DHCPv6 server function using the rpc method.
Operation |
XPATH |
---|---|
rpc |
|
Data Requirements
Item |
Data |
---|---|
IPv6 address pool name |
pool1 |
Network prefix configured in the IPv6 address pool (The server determines the clients on network segments to which the server assigns network parameters from the IPv6 address pool based on the network prefix.) |
FC00:2::/64 |
Domain name suffix assigned to a DHCPv6 client from an IPv6 address pool |
huawei.com |
Request Example
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-address-management:address-management xmlns:hw-address-management="urn:huawei:params:xml:ns:yang:huawei-address-management"> <hw-address-management:ipv6> <hw-address-management:ip-pools> <hw-address-management:ip-pool xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace"> <hw-address-management:vsys>pub</hw-address-management:vsys> <hw-address-management:name>pool1</hw-address-management:name> <hw-address-management:link-address>fc00:2::/64 </hw-address-management:link-address> <hw-address-management:domain> <hw-address-management:domain-name> <hw-address-management:name>huawei.com</hw-address-management:name> </hw-address-management:domain-name> </hw-address-management:domain> </hw-address-management:ip-pool> </hw-address-management:ip-pools> </hw-address-management:ipv6> </hw-address-management:address-management> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="17"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-address-management:address-management/ipv6/ip-pools/ip-pool[vsys='pub'][name='pool1']/link-address[.='fc00:2::']</error-path> <error-message>parse rpc config error.(Value "fc00:2::" does not satisfy the constraint "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))" (range, length, or pattern).).</error-message> </rpc-error> </rpc-reply>