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).
Port Isolation

Port Isolation

Data Model

The configuration model file matching port isolation is huawei-port-isolation.yang.

Table 1 Data model of port isolation

Object

Description

/huawei-port-isolation:port-isolation-config/isolation-group/port-groups/group-id

Specifies the port isolation group.

Interfaces in a port isolation group are isolated from each other, but interfaces in different port isolation groups can communicate. If group-id is not specified, an interface is added to port isolation group 1 by default.

/huawei-port-isolation:port-isolation-config/isolation-group/port-groups/port-name

Specifies the interface to be isolated.

/huawei-port-isolation:port-isolation-config/asymmetric-port-isolation/asym-isolation-ports/source-port

Specifies the source interface of unidirectional isolation. Configure the source interface of unidirectional isolation to be isolated from the target interface of unidirectional isolation, so that the target interface cannot receive packets sent from the source interface, but the source interface can receive packets sent from the target interface.

/huawei-port-isolation:port-isolation-config/asymmetric-port-isolation/asym-isolation-ports/target-ports

Specifies the target interface for unidirectional isolation.

Enabling Port Isolation

Table 3-23 Enabling port isolation

Operation

XPATH

edit-config:default

/ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-port-isolation

Data Requirements
Table 3-24 Enabling port isolation

Item

Data

Description

Port isolation group

2

Enable port isolation on GigabitEthernet0/0/1 and add this interface to port isolation group 2.

Name of the interface to which the port isolation configuration is delivered

GigabitEthernet0/0/1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="12">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <port-isolation-config xmlns="urn:huawei:params:xml:ns:yang:huawei-port-isolation">
    <isolation-group>
     <port-groups>
      <group-id>2</group-id>
      <port-name>GigabitEthernet0/0/1</port-name>
     </port-groups>
    </isolation-group>
   </port-isolation-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="12">
 <ok/>
</rpc-reply>

Disabling Port Isolation

Table 3-25 Disabling port isolation

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-port-isolation

Data Requirements
Table 3-26 Disabling port isolation

Item

Data

Description

Port isolation group

2

Disable port isolation on GigabitEthernet0/0/1 and add this interface to port isolation group 2.

Name of the interface to which the port isolation configuration is delivered

GigabitEthernet0/0/1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <port-isolation-config xmlns="urn:huawei:params:xml:ns:yang:huawei-port-isolation" >
    <isolation-group>
     <port-groups xc:operation="remove">
      <group-id>2</group-id>
      <port-name>GigabitEthernet0/0/1</port-name>
     </port-groups>
    </isolation-group>
   </port-isolation-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="1">
 <ok/>
</rpc-reply>

Configuring Unidirectional Isolation

Table 3-27 Configuring unidirectional isolation

Operation

XPATH

edit-config:create

/ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-port-isolation

Data Requirements
Table 3-28 Configuring unidirectional isolation

Item

Data

Description

Name of the source interface of port isolation

GigabitEthernet0/0/1

Configure unidirectional isolation between GigabitEthernet0/0/1 and GigabitEthernet0/0/3, so that GigabitEthernet0/0/3 cannot receive packets sent from GigabitEthernet0/0/1, but GigabitEthernet0/0/1 can receive packets sent from GigabitEthernet0/0/3.

Name of the target interface of port isolation

GigabitEthernet0/0/3

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <port-isolation-config xmlns="urn:huawei:params:xml:ns:yang:huawei-port-isolation" xc:operation="create">
    <asymmetric-port-isolation>
     <asym-isolation-ports>
      <source-port>GigabitEthernet0/0/1</source-port>
      <target-ports>GigabitEthernet0/0/3</target-ports>
     </asym-isolation-ports>
    </asymmetric-port-isolation>
   </port-isolation-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="1">
 <ok/>
</rpc-reply>

Disabling Unidirectional Isolation

Table 3-29 Disabling unidirectional isolation

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-port-isolation

Data Requirements
Table 3-30 Disabling Unidirectional Isolation

Item

Data

Description

Name of the source interface of port isolation

GigabitEthernet0/0/1

Disable unidirectional isolation between GigabitEthernet0/0/1 and GigabitEthernet0/0/3.

Name of the target interface of port isolation

GigabitEthernet0/0/3

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <port-isolation-config xmlns="urn:huawei:params:xml:ns:yang:huawei-port-isolation">
    <asymmetric-port-isolation>
     <asym-isolation-ports xc:operation="remove">
      <source-port>GigabitEthernet0/0/1</source-port>
      <target-ports>GigabitEthernet0/0/3</target-ports>
     </asym-isolation-ports>
    </asymmetric-port-isolation>
   </port-isolation-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="1">
 <ok/>
</rpc-reply>
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8550

Downloads: 69

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