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

IPv4 Protocol Stack

Obtaining an IP Address in Static Mode

This section describes the data model of obtaining IP address in static mode, and samples of XML packets used to configure, modify, and delete IP addresses.

Data Model

The data model file matching the obtained IP address in static mode defined by the IEFT is ietf-ip.yang.

Table 3-181 Obtaining the IP address in static mode

Object

Description

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4

Indicates parameters of an IPv4 address.

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

Indicates the interface IP address.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/address/subnet/prefix-length

Indicates the length of the interface IP address mask.

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/address/subnet/netmask

Indicates the interface IP address mask.

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

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

Configuring IP Addresses
Table 3-182 Configuring IP addresses

Operation

XPATH

edit-config:merge

ietf-interfaces:interfaces/interface/ietf-ip:ipv4

Data Requirements
Table 3-183 Configuring IP addresses

Item

Data

Description

Interface

GigabitEthernet0/0/0

Set the IP address of GigabitEthernet0/0/0 to 198.168.1.1, the mask length to 24, and the MTU to 1200 bytes.

IP address

198.168.1.1

Mask length

24

MTU

1200

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>
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" xc:operation="merge"> 
      <address>
       <ip>198.168.1.1</ip>
       <prefix-length>24</prefix-length>
      </address>
      <mtu>1200</mtu>
     </ipv4>
    </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>
Modifying IP Addresses
Table 3-184 Modifying IP addresses

Operation

XPATH

edit-config:replace

ietf-interfaces:interfaces/interface/ietf-ip:ipv4

Data Requirements
Table 3-185 Modifying an IP address

Item

Data

Description

Interface

GigabitEthernet0/0/0

Modify the IP address of GigabitEthernet0/0/0 to 198.168.1.2, the mask length to 24, and the MTU to 1000 bytes.

IP address

198.168.1.2

Mask length

24

MTU

1000

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>
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" xc:operation="replace"> 
      <address>
       <ip>198.168.1.2</ip>
       <prefix-length>24</prefix-length>
      </address>
      <mtu>1000</mtu>
     </ipv4>
    </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 IP Addresses
Table 3-186 Deleting IP addresses

Operation

XPATH

edit-config:remove

ietf-interfaces:interfaces/interface/ietf-ip:ipv4

Data Requirements
Table 3-187 Deleting IP addresses

Item

Data

Description

Interface

GigabitEthernet0/0/0

Delete the IP address 198.168.1.2, the mask length 24, and the MTU value 1000 bytes from GigabitEthernet0/0/0.

IP address

198.168.1.2

Mask length

24

MTU

1000

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>
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" xc:operation="remove"> 
      <address>
       <ip>198.168.1.2</ip>
       <prefix-length>24</prefix-length>
      </address>
      <mtu>1000</mtu>
     </ipv4>
    </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>

Obtaining an IP Address in DHCP Mode

This section describes the data model of obtaining IP addresses in DHCP mode, and samples of XML packets used to configure and delete the IP addresses obtained in DHCP mode.

Data Model

The data model file matching the obtained IP address in DHCP mode defiled by the IETF is huawei-ip.yang.

Table 3-188 Obtaining the IP address in DHCP mode

Object

Description

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/huawei-ip:ip-address-extend-type

Indicates that the interface obtains an IP address through dhcp.

Configuring IP Address Obtaining in DHCP Mode
Table 3-189 Configuring IP address obtaining in DHCP mode

Operation

XPATH

edit-config:create

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/

Data Requirements
Table 3-190 Configuring IP address obtaining in DHCP mode

Item

Data

Description

Interface

Ethernet0/0/3

Configure the dhcp client function on Ethernet0/0/3.

IP address obtaining mode

dhcp

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>Ethernet0/0/3</name>  
    <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">  
  <ip-address-extend-type xmlns="urn:huawei:params:xml:ns:yang:hw-ip">dhcp</ip-address-extend-type>  
     </ipv4>  
     </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 IP Address Obtaining in DHCP Mode
Table 3-191 Deleting IP address obtaining in DHCP mode

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/

Data Requirements
Table 3-192 Deleting IP address obtaining in DHCP mode

Item

Data

Description

Interface

Ethernet0/0/3

Delete the dhcp client function on Ethernet0/0/3.

IP address obtaining mode

dhcp

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" ns0:operation="remove"> 
    <name>Ethernet0/0/3</name>  
    <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">  
  <ip-address-extend-type xmlns="urn:huawei:params:xml:ns:yang:hw-ip">dhcp</ip-address-extend-type>  
     </ipv4>  
     </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> 

Obtaining an IP Address in Dial-up Mode

This section describes the data model of obtaining IP addresses in dial-up mode, and samples of XML packets used to configure and delete the IP addresses obtained in dial-up mode.

Data Model

The data model file matching the obtained IP address in dial-up mode defiled by the IETF is huawei-ip.yang.

Table 3-193 Obtaining IP addresses in dial-up mode

Object

Description

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/huawei-ip:ip-address-extend-type

Indicates that the interface obtains an IP address through dial-up.

Configuring IP Address Obtaining in Dial-up Mode
Table 3-194 Configuring IP address obtaining in dial-up mode

Operation

XPATH

edit-config:create

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/

Data Requirements
Table 3-195 Configuring IP address obtaining in dial-up mode

Item

Data

Description

Interface

Cellular0/0/0

Configure the IP address obtaining mode on Cellular0/0/0 as dial-up.

IP address obtaining mode

negotiation

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>Cellular0/0/0</name>  
    <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">  
  <ip-address-extend-type xmlns="urn:huawei:params:xml:ns:yang:hw-ip">negotiation</ip-address-extend-type>  
     </ipv4>  
     </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 IP Address Obtaining in Dial-up Mode
Table 3-196 Deleting IP address obtaining in dial-up mode

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/

Data Requirements
Table 3-197 Deleting IP address obtaining in dial-up mode

Item

Data

Description

Interface

Cellular0/0/0

Delete the dial-up IP address obtaining mode on Cellular0/0/0.

IP address obtaining mode

negotiation

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" ns0:operation="remove"> 
    <name>Cellular0/0/0</name>  
    <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">  
  <ip-address-extend-type xmlns="urn:huawei:params:xml:ns:yang:hw-ip">negotiation</ip-address-extend-type>  
     </ipv4>  
     </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> 

MSS of TCP Packets on an Interface

This chapter describes a data model for configuring the Maximum Segment Size (MSS) of TCP packets on an interface and provides examples of XML packets for configuring and deleting the MSS of TCP packets on an interface.

Data Model

The data model for configuring the MSS of TCP packets on an interface is huawei-ip.yang. The data model is defined by IETF.

Table 3-198 Data model for configuring the MSS of TCP packets on an interface

Node

Description

/if:interfaces/if:interface/ip:ipv4/tcp-adjust-mss/adjust-value

Indicates the MSS of TCP packets on an interface. The value is an integer that ranges from 128 to 2048.

Configuring the MSS of TCP Packets on an Interface
Table 3-199 Configuring the MSS of TCP packets on an interface

Operation

XPATH

edit-config:merge

/if:interfaces/if:interface/ip:ipv4/tcp-adjust-mss/

Data Requirements
Table 3-200 Configuring the MSS of TCP packets on an interface

Item

Data

Description

Interface name

VLANIF 70

Create VLANIF 70, and set the MSS of TCP packets on VLANIF 70 to 1200 bytes.

MSS of TCP packets on an interface

1200

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_6b9d313f802840fe993217f37c3d82a3">
  <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>Vlanif70</name>
          <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>            
          <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" xc:operation="merge">
            <tcp-adjust-mss xmlns="urn:huawei:params:xml:ns:yang:hw-ip">
            <adjust-value>1200</adjust-value>
          </tcp-adjust-mss> 
          </ipv4>
        </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="NETCONFIG_6b9d313f802840fe993217f37c3d82a3">
 <ok/>
</rpc-reply>
Deleting the MSS of TCP Packets on an Interface
Table 3-201 Deleting the MSS of TCP packets on an interface

Operation

XPATH

edit-config:remove

/if:interfaces/if:interface/ip:ipv4/tcp-adjust-mss/

Data Requirements
Table 3-202 Deleting the MSS of TCP packets on an interface

Item

Data

Description

Interface name

VLANIF 70

Delete the MSS of 1200 bytes of TCP packets on VLANIF 70.

MSS of TCP packets on an interface

1200

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_6b9d313f802840fe993217f37c3d82a3">
  <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>Vlanif70</name>
          <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>            
          <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip" xc:operation="remove">
            <tcp-adjust-mss xmlns="urn:huawei:params:xml:ns:yang:hw-ip">
            <adjust-value>1200</adjust-value>
          </tcp-adjust-mss> 
          </ipv4>
        </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="NETCONFIG_6b9d313f802840fe993217f37c3d82a3">
 <ok/>
</rpc-reply>

Querying the IP Address Configuration on an Interface

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

NOTE:

This sample applies to V300R003C10 and later versions.

Data Model

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

Table 3-203 Data model for querying the IP address configuration on an interface

Node

Description

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

Displays the link protocol status on an interface.

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

Operation

XPATH

get

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

Data Requirements
Table 3-205 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/>
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
      <forwarding/>
     </ipv4>
    </interface>
   </interfaces-state>
  </filter>
 </get>
</rpc>
Response Example

Sample of successful 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>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>Eth-Trunk1</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>Ethernet0/0/0</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/0</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/1</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/2</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/3</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/4</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>false</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/5</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>GigabitEthernet0/0/6</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>NULL0</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv4>
   </interface>
   <interface>
    <name>Vlanif1</name>
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
     <forwarding>true</forwarding>
    </ipv4>
   </interface>
  </interfaces-state>
 </data>
</rpc-reply>
Table 3-206 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-207 Querying the link protocol status on a specified interface

Operation

XPATH

get

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

Data Requirements
Table 3-208 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> 
     <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> 
      <forwarding/> 
     </ipv4> 
    </interface> 
   </interfaces-state> 
  </filter> 
 </get> 
</rpc>
Response Example

Sample of successful 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> 
    <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> 
    <forwarding>true</forwarding> 
    </ipv4> 
   </interface> 
  </interfaces-state> 
 </data> 
</rpc-reply>
Table 3-209 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: 8272

Downloads: 69

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