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).
ACL-Based Simplified Traffic Policy

ACL-Based Simplified Traffic Policy

Data Model

The data model file matching the ACL-based simplified traffic policy defined by Huawei is huawei-sacl.yang, quoted the basic definition in ietf-interfaces.yang.

Table 3-2042 The traffic-filter policy

Object

Description

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply

Indicates that the operation request (creating, deleting, and modifying) object is traffic-filter-apply. It is only used to contain sub-objects, but does not have any data meaning.

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply/directions/direction

Indicates the direction in which the ACL-based simplified traffic policy configured on an interface takes effect.

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply/directions/acls/acl

Indicates the ACL number of the ACL-based simplified traffic policy configured on an interface.

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply/directions/acls/ipv6-flag

Indicates whether an ACL-based simplified traffic policy is applied.

Configuring an ACL-Based Simplified Traffic Policy

This section provides a sample of configuring an ACL-based simplified traffic policy.

Table 3-2043 Configuring an ACL-based simplified traffic policy

Operation

XPATH

edit-config: default

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply

Data Requirements
Table 3-2044 Configuring an ACL 3000 based simplified traffic policy

Item

Data

Description

Interface name

Ethernet0/0/3

Configure an outbound ACL 3000 based simplified traffic policy on Ethernet0/0/3.

Direction in which the simplified traffic policy takes effect

outbound

ACL number

3000

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config> 
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
    <interface> 
     <name>Ethernet0/0/3</name> 
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type> 
     <traffic-filter-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-sacl"> 
      <directions> 
       <direction>outbound</direction> 
       <acls> 
        <acl>3000</acl> 
       </acls> 
      </directions> 
     </traffic-filter-apply> 
    </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="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
  <ok/> 
</rpc-reply> 

Deleting an ACL-Based Simplified Traffic Policy

This section provides a sample of deleting an ACL-based simplified traffic policy.

Table 3-2045 Deleting an ACL-based simplified traffic policy

Operation

XPATH

edit-config: remove

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply

Data Requirements
Table 3-2046 Deleting an ACL 3000 based simplified traffic policy

Item

Data

Description

Interface name

Ethernet0/0/3

Delete the outbound ACL 3000 based simplified traffic policy from Ethernet0/0/3.

Direction in which the simplified traffic policy takes effect

outbound

ACL number

3000

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
    <interface> 
     <name>Ethernet0/0/3</name> 
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type> 
     <traffic-filter-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-sacl" ns0:operation="remove"> 
      <directions> 
       <direction>outbound</direction> 
       <acls> 
        <acl>3000</acl> 
       </acls> 
      </directions> 
     </traffic-filter-apply> 
    </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="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
  <ok/> 
</rpc-reply> 

Configuring an ACL6-Based Simplified Traffic Policy

This section provides a sample of configuring an ACL6-based simplified traffic policy.

Table 3-2047 Configuring an ACL6-based simplified traffic policy

Operation

XPATH

edit-config: default

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply

Data Requirements
Table 3-2048 Configuring an IPv6 ACL 3000 based simplified traffic policy

Item

Data

Description

Interface name

Ethernet 0/0/3

Configure an outbound IPv6 ACL 3000 based simplified traffic policy on Ethernet0/0/3.

Direction in which the simplified traffic policy takes effect

outbound

ACL number

3000

IPv6 ACL

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config> 
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
    <interface> 
     <name>Ethernet0/0/3</name> 
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type> 
     <traffic-filter-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-sacl"> 
      <directions> 
       <direction>outbound</direction> 
       <acls> 
        <acl>3000</acl> 
        <ipv6-flag>true</ipv6-flag> 
       </acls> 
      </directions> 
     </traffic-filter-apply> 
    </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="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
  <ok/> 
</rpc-reply> 

Deleting an ACL6-Based Simplified Traffic Policy

This section provides a sample of deleting an ACL6-based simplified traffic policy.

Table 3-2049 Deleting an ACL6-based simplified traffic policy

Operation

XPATH

edit-config: remove

ietf-interfaces:interfaces/interface/huawei-sacl:/traffic-filter-apply

Data Requirements
Table 3-2050 Deleting an IPv6 ACL 3000 based simplified traffic policy

Item

Data

Description

Interface name

Ethernet0/0/3

Delete the outbound IPv6 ACL 3000 based simplified traffic policy from Ethernet0/0/3.

Direction in which the simplified traffic policy takes effect

outbound

ACL number

3000

IPv6 ACL

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
    <interface> 
     <name>Ethernet0/0/3</name> 
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type> 
     <traffic-filter-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-sacl" ns0:operation="remove"> 
      <directions> 
       <direction>outbound</direction> 
       <acls> 
        <acl>3000</acl> 
        <ipv6-flag>true</ipv6-flag> 
       </acls> 
      </directions> 
     </traffic-filter-apply> 
    </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="bf5ce43c-f224-48d3-a066-ae5d3f21f1cf"> 
  <ok/> 
</rpc-reply> 
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8575

Downloads: 69

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