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).
IPv6 Protocol Stack

IPv6 Protocol Stack

An IPv6 Address for an Interface

Data Model

The data model file matching IPv6 protocol stack is ietf-ip.yang. The data model is defined by IETF.

Table 3-210 Data model of IPv6 configuration

Object

Description

/ietf-interfaces:interfaces/interface/ietf-ip:ipv6

Indicates parameters of an IPv6 address family.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/enabled

Indicates an IPv6-enabled interface.

The default value is true. You are not advised to change it to false. Otherwise, the delivered IPv6 address and MTU will be deleted.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/mtu

Indicates the maximum size of IPv6 packets sent and received by an interface.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address

Indicates the IPv6 address list configured on an interface.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address/ip

Indicates the IPv6 address of an interface.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address/prefix-length

Indicates the subnet prefix length.

Configuring an IPv6 Address for an Interface
Table 3-211 Configuring an IPv6 address

Operation

XPATH

edit-config:create

ietf-interfaces:interfaces/interface/ietf-ip:ipv6

Data Requirements
Table 3-212 Configuring an IPv6 address

Item

Data

Description

Interface

GigabitEthernet0/0/1

Configure GigabitEthernet0/0/1

IPv6 enabling status

true

Enable IPv6 on GigabitEthernet0/0/1

IPv6 address

2001::1

Set the IPv6 address to 2001::1

Mask length

14

Set the mask length to 14

mtu

1280

Set the MTU to 1280 bytes

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
    <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>
                        <address>
                            <ip>2001::1</ip>
                            <prefix-length>14</prefix-length>
                        </address>
                        <mtu>1280</mtu>
                    </ipv6>
                </interface>
            </interfaces>
        </config>
    </edit-config>
</rpc>

Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <ok/> 
</rpc-reply> 

Changing the IPv6 Address of an Interface
Table 3-213 Changing an IPv6 address

Operation

XPATH

edit-config:replace

ietf-interfaces:interfaces/interface/ietf-ip:ipv6

Data Requirements
Table 3-214 Configuring an IPv6 address

Item

Data

Description

Interface

GigabitEthernet0/0/1

Configure GigabitEthernet0/0/1

IPv6 enabling status

true

Enable IPv6 on GigabitEthernet0/0/1

IPv6 address

1000::1

Change the IPv6 address to 1000::1

Mask length

13

Change the mask length to 13

mtu

1300

Change the MTU to 1300 bytes

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
    <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" xc:operation="replace">
                        <enabled>true</enabled>
                        <address>
                            <ip>1000::1</ip>
                            <prefix-length>13</prefix-length>
                        </address>
                        <mtu>1300</mtu>
                    </ipv6>
                </interface>
            </interfaces>
        </config>
    </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <ok/> 
</rpc-reply> 
Deleting the IPv6 Address of an Interface
Table 3-215 Deleting an IPv6 address

Operation

XPATH

edit-config:remove

ietf-interfaces:interfaces/interface/ietf-ip:ipv6

Data Requirements
Table 3-216 Configuring an IPv6 address

Item

Data

Description

Interface

GigabitEthernet0/0/1

Delete the IPv6 address of GigabitEthernet0/0/1

IPv6 address

/

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
    <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" xc:operation="remove">                     
                    </ipv6>
                </interface>
            </interfaces>
        </config>
    </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <ok/> 
</rpc-reply> 

Automatically Generating an IPv6 Address

Data Model

The data model file for automatically generating an IPv6 address is defined by IETF, with the file name of huawei-ipv6.yang.

Table 3-217 Data model of automatically generating an IPv6 address

Object

Description

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-global

Configure an interface to automatically generate an IPv6 address.

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-global/default

Configure an interface to automatically generate an IPv6 address, learn the source IPv6 address in the packet, and use the source IPv6 address as the next hop address of the default IPv6 route.

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-global/local-identifier

Configure an interface to use the interface ID of a link-local address to automatically generate a global IPv6 address.

Configuring an Interface to Automatically Generate an IPv6 Address

This section provides an example of configuring an interface to automatically generate an IPv6 address using the merge method.

Table 3-218 Configuring an interface to automatically generate an IPv6 address

Operation

XPATH

edit-config:merge

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-global

Data Requirements
Table 3-219 Configuring an interface to automatically generate an IPv6 address

Item

Data

Description

Interface

GigabitEthernet0/0/0

Configure GigabitEthernet0/0/0 to automatically generate an IPv6 address.

Automatically generating a global IPv6 address using the interface ID of a link-local address

true

Configure an interface to use the interface ID of a link-local address to automatically generate a global IPv6 address.

Learning the default route

true

Configure an interface to automatically generate an IPv6 address, learn the source IPv6 address in the packet, and use the source IPv6 address as the next hop address of the default IPv6 route.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <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/0</name> 
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" >   
      <auto-global xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="merge"> 
      <default>true</default> 
      <local-identifier>true</local-identifier> 
      </auto-global> 
     </ipv6>  
    </interface> 
   </interfaces>  
  </config>  
 </edit-config> 
</rpc>
Response Example

Example of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Disabling an Interface from Automatically Generating an IPv6 Address

This section provides an example of disabling an interface from automatically generating an IPv6 address using the remove method.

Table 3-220 Disabling an interface from automatically generating an IPv6 address

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-global

Data Requirements
Table 3-221 Disabling an interface from automatically generating an IPv6 address

Item

Data

Description

Interface

GigabitEthernet0/0/0

Disable GigabitEthernet0/0/0 from automatically generating an IPv6 address.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <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/0</name> 
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" >   
      <auto-global xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="remove"> 
      </auto-global> 
     </ipv6>  
    </interface> 
   </interfaces>  
  </config>  
 </edit-config> 
</rpc>
Response Example

Example of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring the Minimum MSS Value of a TCP6 Connection

This section describes the data model for configuring the minimum Maximum Segment Size (MSS) value of a TCP6 connection and provides examples of XML packets for configuring, changing, and deleting the minimum MSS value of a TCP6 connection.

NOTE:

This sample applies to V300R003C10 and later versions.

Data Model

The file name of the data model for configuring the minimum MSS value of a TCP6 connection is huawei-ipv6.yang. The data model is defined by IETF.

Table 3-222 Data model for configuring the minimum MSS value of a TCP6 connection

Object

Description

/huawei-ipv6:tcp/min-mss

Configures the minimum MSS value of a TCP6 connection. The value is an integer that ranges from 32 to 1500.

Configuring the Minimum MSS Value of a TCP6 Connection
Table 3-223 Configuring the minimum MSS value of a TCP6 connection

Operation

XPATH

edit-config:merge

/huawei-ipv6:tcp/min-mss

Data Requirements
Table 3-224 Configuring the minimum MSS value of a TCP6 connection

Item

Data

Description

Minimum MSS value of a TCP6 connection

1500

Set the minimum MSS value of a TCP6 connection to 1500.

NOTE:

The minimum MSS value of a TCP6 connection must be less than the maximum MSS value of the TCP6 connection.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <tcp xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="merge"> 
    <min-mss>1500</min-mss> 
   </tcp> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <ok/> 
</rpc-reply>
Changing the Minimum MSS Value of a TCP6 Connection
Table 3-225 Changing the minimum MSS value of a TCP6 connection

Operation

XPATH

edit-config:replace

/huawei-ipv6:tcp/min-mss

Data Requirements
Table 3-226 Changing the minimum MSS value of a TCP6 connection

Item

Data

Description

Minimum MSS value of a TCP6 connection

1200

Change the minimum MSS value of a TCP6 connection to 1200.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <tcp xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="replace"> 
    <min-mss>1200</min-mss> 
   </tcp> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <ok/> 
</rpc-reply>
Deleting the Minimum MSS Value of a TCP6 Connection
Table 3-227 Deleting the minimum MSS value of a TCP6 connection

Operation

XPATH

edit-config:remove

/huawei-ipv6:tcp/min-mss

Data Requirements
Table 3-228 Deleting the minimum MSS value of a TCP6 connection

Item

Data

Description

Minimum MSS value of a TCP6 connection

1200

Delete the configured minimum MSS value 1200 of a TCP6 connection.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <tcp xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="remove"> 
    <min-mss>1200</min-mss> 
   </tcp> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <ok/> 
</rpc-reply>

Configuring the Maximum MSS Value of a TCP6 Connection

This section describes the data model for configuring the maximum Maximum Segment Size (MSS) value of a TCP6 connection and provides examples of XML packets for configuring, changing, and deleting the maximum MSS value of a TCP6 connection.

NOTE:

This sample applies to V300R003C10 and later versions.

Data Model

The file name of the data model for configuring the maximum MSS value of a TCP6 connection is huawei-ipv6.yang. The data model is defined by IETF.

Table 3-229 Data model for configuring the maximum MSS value of a TCP6 connection

Object

Description

/huawei-ipv6:tcp/max-mss

Configures the maximum MSS value of a TCP6 connection. The value is an integer that ranges from 32 to 9600.

Configuring the Maximum MSS Value of a TCP6 Connection
Table 3-230 Configuring the maximum MSS value of a TCP6 connection

Operation

XPATH

edit-config:merge

/huawei-ipv6:tcp/max-mss

Data Requirements
Table 3-231 Configuring the maximum MSS value of a TCP6 connection

Item

Data

Description

Maximum MSS value of a TCP6 connection

9600

Set the maximum MSS value of a TCP6 connection to 9600.

NOTE:

The maximum MSS value of a TCP6 connection must be greater than the minimum MSS value of the TCP6 connection.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <tcp xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="merge"> 
    <max-mss>9600</max-mss> 
   </tcp> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <ok/> 
</rpc-reply>
Changing the Maximum MSS Value of a TCP6 Connection
Table 3-232 Changing the maximum MSS value of a TCP6 connection

Operation

XPATH

edit-config:replace

/huawei-ipv6:tcp/max-mss

Data Requirements
Table 3-233 Changing the maximum MSS value of a TCP6 connection

Item

Data

Description

Maximum MSS value of a TCP6 connection

5000

Change the MSS value of a TCP6 connection to 5000.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <tcp xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="replace"> 
    <max-mss>5000</max-mss> 
   </tcp> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <ok/> 
</rpc-reply>
Deleting the Maximum MSS Value of a TCP6 Connection
Table 3-234 Deleting the maximum MSS value of a TCP6 connection

Operation

XPATH

edit-config:remove

/huawei-ipv6:tcp/max-mss

Data Requirements
Table 3-235 Deleting the maximum MSS value of a TCP6 connection

Item

Data

Description

Maximum MSS value of a TCP6 connection

5000

Delete the configured maximum MSS value 5000 of a TCP6 connection.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <tcp xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="remove"> 
    <max-mss>5000</max-mss> 
   </tcp> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
 <ok/> 
</rpc-reply>

Automatically Generating a Link-Local Address

This section describes the data model for managing the function of automatically generating a link-local address on an interface and provides examples of XML packets for configuring, changing, and deleting the function of automatically generating a link-local address on an interface.

NOTE:

This sample applies to V300R003C10 and later versions.

Data Model

The file name of the data model for automatically generating a link-local address on an interface is huawei-ipv6.yang. The data model is defined by IETF.

Table 3-236 Data model of automatically generating a link-local address

Object

Description

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-link-local

Configures an interface to automatically generate a link-local address.

Configuring an Interface to Automatically Generate a Link-Local Address
Table 3-237 Configuring an interface to automatically generate a link-local address

Operation

XPATH

edit-config:merge

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-link-local

Data Requirements
Table 3-238 Configuring an interface to automatically generate a link-local address

Item

Data

Description

Interface

GigabitEthernet0/0/0

Configure the interface GigabitEthernet0/0/0 to automatically generate a link-local address.

Whether to enable the function of automatically generating a link-local address on an interface

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <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 xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"> 
     <name>GigabitEthernet0/0/0</name> 
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <enabled>true</enabled> 
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> 
      <enabled>true</enabled> 
      <auto-link-local xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="merge">true</auto-link-local> 
     </ipv6> 
    </interface> 
   </interfaces> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <ok/> 
</rpc-reply>
Changing the Function of Automatically Generating a Link-Local Address on an Interface
Table 3-239 Changing the function of automatically generating a link-local address on an interface

Operation

XPATH

edit-config:replace

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-link-local

Data Requirements
Table 3-240 Changing the function of automatically generating a link-local address on an interface

Item

Data

Description

Interface

GigabitEthernet0/0/0

Disable the function of automatically generating a link-local address on the interface GigabitEthernet0/0/0.

Whether to enable the function of automatically generating a link-local address on an interface

false

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <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 xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"> 
     <name>GigabitEthernet0/0/0</name> 
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <enabled>true</enabled> 
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> 
      <enabled>true</enabled> 
      <auto-link-local xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="replace">false</auto-link-local> 
     </ipv6> 
    </interface> 
   </interfaces> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <ok/> 
</rpc-reply>
Deleting the Function of Automatically Generating a Link-Local Address on an Interface
Table 3-241 Deleting the function of automatically generating a link-local address on an interface

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-ip:ipv6/huawei-ipv6:auto-link-local

Data Requirements
Table 3-242 Deleting the function of automatically generating a link-local address on an interface

Item

Data

Description

Interface

GigabitEthernet0/0/0

Delete the function of automatically generating a link-local address configured on the interface GigabitEthernet0/0/0.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a">
 <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 xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0">
     <name>GigabitEthernet0/0/0</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
      <enabled>true</enabled>
      <auto-link-local xmlns="urn:huawei:params:xml:ns:yang:hw-ipv6" xc:operation="remove">true</auto-link-local>
     </ipv6>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
 <ok/> 
</rpc-reply>

Querying the IPv6 Address Configuration on an Interface

This section provides a sample of querying the IPv6 address configuration on an interface.

NOTE:

This sample applies to V300R003C10 and later versions.

Data Model

The data model for querying the IPv6 address configuration on an interface is ietf-ip.yang

Table 3-243 Data model for querying the IPv6 address configuration on an interface

Object

Description

/ietf-interfaces:interfaces-state/interface/ietf-ip:ipv6/forwarding

Displays the link protocol status on an interface.

Querying the Link Protocol Status on All Interfaces
Table 3-244 Querying the link protocol status on all interfaces

Operation

XPATH

get

/ietf-interfaces:interfaces-state/interface/ietf-ip:ipv6/forwarding

Data Requirements
Table 3-245 Querying the link protocol status on all interfaces

Item

Data

Description

Interface name

-

Query the link protocol status on all interfaces.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="#message-id">
 <get>
  <filter type="subtree">
   <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name/>
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
      <forwarding/>
     </ipv6>
    </interface>
   </interfaces-state>
  </filter>
 </get>
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="#message-id">
 <data>
  <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
   <interface>
    <name>Cellular0/0/0</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>Eth-Trunk1</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>Ethernet0/0/0</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/0</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/1</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/2</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/3</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/4</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/5</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/6</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>NULL0</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv6>
   </interface>
   <interface>
    <name>Vlanif1</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv6>
   </interface>
  </interfaces-state>
 </data>
</rpc-reply>
Table 3-246 Description of output information in the response example

Item

Description

name

Interface name.

forwarding

Link protocol status on the interface. The value can be:

  • True: indicates that the link protocol status on the interface is Up.
  • False: indicates that the link protocol status on the interface is Down.
Querying the Link Protocol Status on a Specified Interface
Table 3-247 Querying the link protocol status on a specified interface

Operation

XPATH

get

/ietf-interfaces:interfaces-state/interface/ietf-ip:ipv6/forwarding

Data Requirements
Table 3-248 Querying the link protocol status on a specified interface

Item

Data

Description

Interface name

GigabitEthernet0/0/0

Query the link protocol status on GigabitEthernet0/0/0.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="#message-id">
 <get>
  <filter type="subtree">
   <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/0</name>
     <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
      <forwarding/>
     </ipv6>
    </interface>
   </interfaces-state>
  </filter>
 </get>
</rpc>
Response Example

Example of successful configuration response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="#message-id">
 <data>
  <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
   <interface>
    <name>GigabitEthernet0/0/0</name>
    <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv6>
   </interface>
  </interfaces-state>
 </data>
</rpc-reply>
Table 3-249 Description of output information in the response example

Item

Description

name

Interface name.

forwarding

Link protocol status on the interface. The value can be:

  • True: indicates that the link protocol status on the interface is Up.
  • False: indicates that the link protocol status on the interface is Down.
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8458

Downloads: 69

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