< Home

Configuring the DHCPv6 server function

This section provides a sample of configuring the DHCPv6 server function using the rpc method.

Table 1 Configuring the DHCPv6 server function

Operation

XPATH

rpc

  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool

  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/link-address

  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/domain/domain-name

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-maanagement: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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic