No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
DHCPv6

DHCPv6

IPv6 Address Pool

NOTE:

After the IPv6 address pool function is configured, the DHCPv6 server function can be used only after it is enabled globally or on an interface. For details on how to enable the DHCPv6 server function globally or on an interface, see DHCPv6 Server.

Data Model

The data model file matching IPv6 address pool is huawei-address-management.yang.

Table 3-369 Data model of IPv6 address pool

Object

Description

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

Creates an IPv6 address pool.

/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/address-prefixes/address-prefix

Configures the network prefix of the IPv6 address pool.

/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/dns/dns-server/ip-address

Configures the DNS server IPv6 address allocated to clients in the IPv6 address pool.

/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/static-binding/address-binding

Configures a fixed IPv6 address allocated to a client in the IPv6 address pool.

/huawei-address-management:address-management/ipv6/ip-pools/ip-pool/excluded-addresses/excluded-address

Excludes IPv6 addresses not automatically allocated to clients in the IPv6 address pool.

Creating an IPv6 Address Pool

This section provides a sample of creating an IPv6 address pool using the merge method. You can also use the create method to create an IPv6 address pool.

Table 3-370 Creating an IPv6 address pool

Operation

XPATH

edit-config:merge

  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/address-prefixes/address-prefix
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/dns/dns-server/ip-address
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/static-binding/address-binding
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/excluded-addresses/excluded-address
Data Requirements
Table 3-371 Creating an IPv6 address pool

Item

Data

Description

IPv6 address pool name

pool1

Create the IPv6 address pool pool1 and set the network prefix of the IPv6 address pool to fc00:1::/64. In the IPv6 address pool, set the DNS server IPv6 address allocated to clients to 2000::1/64, allocate the fixed IPv6 address fc00:1::12 to the client with the DUID abcdef, and exclude IPv6 addresses fc00:1::1 to fc00:1::10 from IP addresses automatically allocated to clients.

Network prefix

fc00:1::/64

DNS server IPv6 address allocated to clients

2000::1/64

Fixed IPv6 address allocated to a client

DUID: abcdef

IPv6 address: fc00:1::12

IPv6 addresses not automatically allocated to clients

fc00:1::1 to fc00:1::10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<address-management xmlns="urn:huawei:params:xml:ns:yang:huawei-address-management">
<ipv6>
<ip-pools>
<ip-pool xc:operation="merge">
<vsys>public</vsys>
<name>pool1</name>
<address-prefixes>
 <address-prefix xc:operation="merge">
 <prefix-name>null</prefix-name>
 <ipv6-prefix>fc00:1::/64</ipv6-prefix>
 </address-prefix>
</address-prefixes>
<dns>
 <dns-server>
 <ip-address xc:operation="merge">2000::1</ip-address>
 </dns-server>
</dns>
<static-binding>
 <address-binding xc:operation="merge">
 <prefix-name>null</prefix-name>
 <ip-address>fc00:1::12</ip-address>
 <duid>abcdef</duid>
 </address-binding>
</static-binding>
<excluded-addresses>
 <excluded-address xc:operation="merge">
 <prefix-name>null</prefix-name>
 <start-ip-address>fc00:1::1</start-ip-address>
 <end-ip-address>fc00:1::1</end-ip-address>
 </excluded-address>
</excluded-addresses>
</ip-pool>
</ip-pools>
</ipv6>
</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="123">
 <ok/> 
</rpc-reply> 
Modifying the IPv6 Address Pool

This section provides a sample of modifying the IPv6 address pool using the replace method.

Table 3-372 Modifying the IPv6 address pool

Operation

XPATH

edit-config:merge

  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/address-prefixes/address-prefix
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/dns/dns-server/ip-address
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/static-binding/address-binding
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/excluded-addresses/excluded-address
Data Requirements
Table 3-373 Modifying the IPv6 address pool

Item

Data

Description

IPv6 address pool name

pool1

Change the network prefix of the IPv6 address pool pool1 to fc00:2::/64. In the IPv6 address pool, set the DNS server IPv6 address allocated to clients to 2000::1/64, allocate the fixed IPv6 address fc00:2::12 to the client with the DUID abcdef, and exclude IPv6 addresses fc00:2::1 to fc00:2::10 from IP addresses automatically allocated to clients.

Network prefix

fc00:2::/64

DNS server IPv6 address allocated to clients

2000::1/64

Fixed IPv6 address allocated to a client

DUID: abcdef

IPv6 address: fc00:2::12

IPv6 addresses not automatically allocated to clients

fc00:2::1 to fc00:2::10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<address-management xmlns="urn:huawei:params:xml:ns:yang:huawei-address-management">
<ipv6>
<ip-pools>
<ip-pool xc:operation="merge">
<vsys>public</vsys>
<name>pool1</name>
<address-prefixes>
 <address-prefix xc:operation="replace">
 <prefix-name>null</prefix-name>
 <ipv6-prefix>fc00:2::/64</ipv6-prefix>
 </address-prefix>
</address-prefixes>
<dns>
 <dns-server>
 <ip-address xc:operation="merge">2000::1</ip-address>
 </dns-server>
</dns>
<static-binding>
 <address-binding xc:operation="replace">
 <prefix-name>null</prefix-name>
 <ip-address>fc00:2::12</ip-address>
 <duid>abcdef</duid>
 </address-binding>
</static-binding>
<excluded-addresses>
 <excluded-address xc:operation="replace">
 <prefix-name>null</prefix-name>
 <start-ip-address>fc00:2::1</start-ip-address>
 <end-ip-address>fc00:2::1</end-ip-address>
 </excluded-address>
</excluded-addresses>
</ip-pool>
</ip-pools>
</ipv6>
</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="123">
 <ok/> 
</rpc-reply> 
Deleting the IPv6 Address Pool

This section provides a sample of deleting the IPv6 address pool using the remove method.

Table 3-374 Deleting the IPv6 address pool

Operation

XPATH

edit-config:merge

  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/address-prefixes/address-prefix
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/dns/dns-server/ip-address
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/static-binding/address-binding
  • /huawei-address-management:address-management/ipv6/ip-pools/ip-pool/excluded-addresses/excluded-address
Data Requirements
Table 3-375 Deleting the IPv6 address pool

Item

Data

Description

IPv6 address pool name

pool1

Delete the IPv6 address pool pool1 and its configuration.

Network prefix

fc00:1::/64

DNS server IPv6 address allocated to clients

2000::1/64

Fixed IPv6 address allocated to a client

DUID: abcdef

IPv6 address: fc00:1::12

IPv6 addresses not automatically allocated to clients

fc00:1::1 to fc00:1::10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<address-management xmlns="urn:huawei:params:xml:ns:yang:huawei-address-management">
<ipv6>
<ip-pools>
<ip-pool xc:operation="remove">
<vsys>public</vsys>
<name>pool1</name>
<address-prefixes>
 <address-prefix xc:operation="remove">
 <prefix-name>null</prefix-name>
 <ipv6-prefix>fc00:1::/64</ipv6-prefix>
 </address-prefix>
</address-prefixes>
<dns>
 <dns-server>
 <ip-address xc:operation="remove">2000::1</ip-address>
 </dns-server>
</dns>
<static-binding>
 <address-binding xc:operation="remove">
 <prefix-name>null</prefix-name>
 <ip-address>fc00:1::12</ip-address>
 <duid>abcdef</duid>
 </address-binding>
</static-binding>
<excluded-addresses>
 <excluded-address xc:operation="remove">
 <prefix-name>null</prefix-name>
 <start-ip-address>fc00:1::1</start-ip-address>
 <end-ip-address>fc00:1::1</end-ip-address>
 </excluded-address>
</excluded-addresses>
</ip-pool>
</ip-pools>
</ipv6>
</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="123">
 <ok/> 
</rpc-reply> 

DHCPv6 Server

NOTE:

Before enabling the DHCPv6 server function globally or on an interface, configure an IPv6 address pool. For details on how to configure an IPv6 address pool, see IPv6 Address Pool.

Data Model

The data model file matching DHCPv6 server is huawei-dhcp.yang.

Table 3-376 DHCPv6 server data model

Object

Description

/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/interface-servers/interface-server

Enables the DHCPv6 server function on an interface.

/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/global-servers/global-server

Enables the DHCPv6 server function globally.

Enabling the DHCPv6 Server Function

This section provides a sample of enabling the DHCPv6 server function using the merge method. You can also use the create method to enable the DHCPv6 server function.

Table 3-377 Enabling the DHCPv6 server function

Operation

XPATH

edit-config:merge

  • /huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/interface-servers/interface-server
  • /huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/global-servers/global-server
Data Requirements
Table 3-378 Enabling the DHCPv6 server function

Item

Data

Description

Whether the DHCP function is enabled globally

ture

Enable the DHCPv6 server function globally and on GE0/0/1. The IPv6 address pool pool1 is bound to GE0/0/1.

Whether the DHCPv6 server function is enabled globally

ture

Whether the IPv6 function is enabled on GE0/0/1

ture

IPv6 address pool bound to GE0/0/1

pool1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
<interface> 
<name>G0/0/1</name> 
<type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
<ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
 <enabled>true</enabled>
</ipv6>
</interface> 
</interfaces>
<dhcp-config xmlns="urn:huawei:params:xml:ns:yang:huawei-dhcp">
<dhcpv6-config>
<dhcp-server-configuration>
<global-servers>
<global-server xc:operation="merge">
<vsys>public</vsys>
<allow-hint>true</allow-hint>
<preference>10</preference>
<rapid-commit>true</rapid-commit>
<unicast>true</unicast>   
</global-server>
</global-servers>
<interface-servers>
<interface-server xc:operation="merge">
 <interface-name>G0/0/1</interface-name>
 <pool-name>pool1</pool-name>
</interface-server>
</interface-servers>
</dhcp-server-configuration>
</dhcpv6-config>
</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> 
Disabling the DHCPv6 Server Function

This section provides a sample of disabling the DHCPv6 server function using the remove method.

Table 3-379 Disabling the DHCPv6 server function

Operation

XPATH

edit-config:merge

  • /huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/interface-servers/interface-server
  • /huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-server-configuration/global-servers/global-server
Data Requirements
Table 3-380 Disabling the DHCPv6 server function

Item

Data

Description

Whether the DHCP function is enabled globally

ture

Disable the DHCPv6 server function globally and on GE0/0/1.

Whether the DHCPv6 server function is enabled globally

false

Whether the IPv6 function is enabled on GE0/0/1

ture

IPv6 address pool bound to GE0/0/1

pool1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
<interface> 
<name>G0/0/1</name> 
<type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
<ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
 <enabled>true</enabled>
</ipv6>
</interface> 
</interfaces>
<dhcp-config xmlns="urn:huawei:params:xml:ns:yang:huawei-dhcp">
<dhcpv6-config>
<dhcp-server-configuration>
<global-servers>
<global-server xc:operation="remove">
<vsys>public</vsys>
<allow-hint>false</allow-hint>
<preference>10</preference>
<rapid-commit>false</rapid-commit>
<unicast>false</unicast>   
</global-server>
</global-servers>
<interface-servers>
<interface-server xc:operation="remove">
 <interface-name>G0/0/1</interface-name>
 <pool-name>pool1</pool-name>
</interface-server>
</interface-servers>
</dhcp-server-configuration>
</dhcpv6-config>
</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> 

DHCPv6 Client

Data Model

The data model file matching DHCPv6 client is huawei-dhcp.yang.

Table 3-381 DHCPv6 client data model

Object

Description

/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-client-configuration/client/client-type/address-and-prefix/address-and-prefix/address-request

Enables the DHCPv6 client function on an interface.

Enabling the DHCPv6 Client Function

This section provides a sample of enabling the DHCPv6 client function using the merge method. You can also use the create method to enable the DHCPv6 client function.

Table 3-382 Enabling the DHCPv6 client function

Operation

XPATH

edit-config:merge

/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-client-configuration/client/client-type/address-and-prefix/address-and-prefix/address-request

Data Requirements
Table 3-383 Enabling the DHCPv6 client function

Item

Data

Description

Whether the DHCP function is enabled globally

ture

Enable the DHCPv6 client function on GE0/0/1.

Whether the IPv6 function is enabled on GE0/0/1

ture

Whether the DHCPv6 client function is enabled on GE0/0/1

ture

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
 <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
   <interface>
     <name>GigabitEthernet0/0/1</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
      <enabled>true</enabled>
     </ipv6>
    </interface>
 </interfaces>
<dhcp-config xmlns="urn:huawei:params:xml:ns:yang:huawei-dhcp">
<dhcpv4-config>
<enable>true</enable>
</dhcpv4-config>
<dhcpv6-config>
<dhcp-client-configuration>
<client>
<interface-name>GigabitEthernet0/0/1</interface-name>
<address-and-prefix>
<address-request xc:operation="merge">true</address-request>
</address-and-prefix>
</client>
</dhcp-client-configuration>
</dhcpv6-config>
</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> 
Disabling the DHCPv6 Client Function

This section provides a sample of disabling the DHCPv6 client function using the remove method.

Table 3-384 Disabling the DHCPv6 client function

Operation

XPATH

edit-config:merge

/huawei-dhcp:dhcp-config/dhcpv6-config/dhcp-client-configuration/client/client-type/address-and-prefix/address-and-prefix/address-request

Data Requirements
Table 3-385 Disabling the DHCPv6 client function

Item

Data

Description

Whether the DHCP function is enabled globally

ture

Disable the DHCPv6 client function on GE0/0/1.

Whether the IPv6 function is enabled on GE0/0/1

ture

Whether the DHCPv6 client function is enabled on GE0/0/1

false

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> 
<edit-config>
<target>
<running/>
</target><error-option>rollback-on-error</error-option>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
 <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
   <interface>
     <name>GigabitEthernet0/0/1</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
      <enabled>true</enabled>
     </ipv6>
    </interface>
 </interfaces>
<dhcp-config xmlns="urn:huawei:params:xml:ns:yang:huawei-dhcp">
<dhcpv4-config>
<enable>true</enable>
</dhcpv4-config>
<dhcpv6-config>
<dhcp-client-configuration>
<client>
<interface-name>GigabitEthernet0/0/1</interface-name>
<address-and-prefix>
<address-request xc:operation="remove">false</address-request>
</address-and-prefix>
</client>
</dhcp-client-configuration>
</dhcpv6-config>
</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> 
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8535

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next