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).
Switchover Between Layer 2 and Layer 3 Modes on an Interface

Switchover Between Layer 2 and Layer 3 Modes on an Interface

Data Model

The configuration model file matching the switchover between Layer 2 and Layer 3 modes on an interface is huawei-interfaces.yang.

Table 1 Data model of switchover between layer 2 and layer 3 modes on an interface

Object

Description

ietf-interfaces:interfaces/interface/huawei-interfaces:common/switch-router-mode

Configures switchover between Layer 2 and Layer 3 modes on an interface. The value is as follows:

true: Switchover is enabled. false: Switchover is disabled.

Configuring the Switchover from Layer 3 Mode to Layer 2 Mode on an Interface

This section provides a sample of configuring the switchover from Layer 3 mode to Layer 2 mode on an interface.

Table 3-44 Configuring the switchover of from Layer 3 mode to Layer 2 mode on an interface

Operation

XPATH

edit-config:merge

ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-interfaces:common/switch-router-mode

Data Requirements
Table 3-45 Configuring the switchover of from Layer 3 mode to Layer 2 mode on an interface

Item

Data

Description

Name of an interface to be switched

GigabitEthernet0/0/3

Switch interface GigabitEthernet0/0/3 from Layer 3 mode to Layer 2 mode.

Switching mode

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_dc9bf91389364b8cada05b7d95f3e062">
 <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/3</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <common xmlns="urn:huawei:params:xml:ns:yang:huawei-interfaces" xc:operation="merge">
      <switch-router-mode>true</switch-router-mode>
     </common>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

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

Canceling the Switchover from Layer 3 Mode to Layer 2 Mode on an Interface

This section provides a sample of canceling the switchover from Layer 3 mode to Layer 2 mode on an interface.

Table 3-46 Canceling the switchover from Layer 3 mode to Layer 2 mode on an interface

Operation

XPATH

edit-config:remove

ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-interfaces:common/switch-router-mode

Data Requirements
Table 3-47 Canceling the switchover from Layer 3 mode to Layer 2 mode on an interface

Item

Data

Description

Name of an interface to be switched

GigabitEthernet0/0/3

Cancel the switchover from Layer 3 mode to Layer 2 mode on interface GigabitEthernet0/0/3, that is, the interface is switched from Layer 2 mode to Layer 3 mode.

Switching mode

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_dc9bf91389364b8cada05b7d95f3e062">
 <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/3</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <common xmlns="urn:huawei:params:xml:ns:yang:huawei-interfaces" xc:operation="remove">
      <switch-router-mode>true</switch-router-mode>
     </common>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_dc9bf91389364b8cada05b7d95f3e062">
 <ok/>
</rpc-reply>
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8362

Downloads: 69

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