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).
EVPN

EVPN

Ethernet Virtual Private Network (EVPN) is a VPN technology for Layer 2 network interconnection. EVPN is similar to BGP/MPLS IP VPN. Using extended BGP reachability information, EVPN implements MAC address learning and advertisement between Layer 2 networks at different sites on the data plane rather than on the control plane.

NOTE:

Only the AR100, AR120, AR150, AR160 (except AR161EW, AR161EW-M1, AR169EW, AR169EGW-L), AR200, AR1200, and AR2220E support EVPN.

Data Model

The data model file matching the EVPN is huawei-bgp-l3vpn.yang.

Table 3-1087 EVPN

Object

Description

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/ipv4-family/vpnTargets/huawei-ethernet-vpn:vpnTarget-ethernet-vpn

Indicates the EVPN-VPN-Target extended community of the VPN instance IPv4 address family.

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/ipv4-family/vpnTargets/vpnTarget/vrfRTValue

Indicates the value added to the EVPN-VPN-Target extended community list of the VPN instance IPv4 address family.

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/ipv4-family/vpnTargets/vpnTarget/vrfRTType

Indicates the import and export EVPN-VPN-Target extended community list of the VPN instance IPv4 address family.

  • both: indicates import and export
  • export-extcommunity: indicates the export
  • import-extcommunity: indicates the import

The default value is both.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/advertise-to-ethernet-vpn

Indicates the advertisement of routes is enabled from the VPN instance to BGP-EVPN address family.

Configuring the EVPN-VPN-Target Extended Community

This section provides a sample of configuring an EVPN-VPN-Target extended community.

Table 3-1088 Configuring an EVPN-VPN-Target extended community

Operation

XPATH

edit-config:default

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/ipv4-family/vpnTargets/huawei-ethernet-vpn

Data Requirements
Table 3-1089 Configuring an EVPN-VPN-Target extended community

Item

Data

Description

VPN instance name

vpna

Create the VPN instance vpna, and set the RD to 200:2, and import VPN-Target list to 111:1.

RD of the VPN instance IPv4 address family

200:2

Value added to the EVPN-VPN-Target extended community list

111:1

Import or export EVPN-VPN-Target extended community list value

import_extcommunity

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
    <vpn-instance>
     <vpn-instance-name>vpna</vpn-instance-name>
     <ipv4-family>
      <route-distinguisher>200:2</route-distinguisher>
      <vpnTargets>
       <vpnTarget-ethernet-vpn xmlns="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"/>
       <vpnTarget>
        <vrfRTValue>111:1</vrfRTValue>
        <vrfRTType>import_extcommunity</vrfRTType>
       </vpnTarget>
      </vpnTargets>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
  <ok/> 
</rpc-reply> 

Deleting the EVPN-VPN-Target Extended Community Configuration

This section provides a sample of deleting the EVPN-VPN-Target extended community configuration.

Table 3-1090 Deleting the EVPN-VPN-Target extended community configuration

Operation

XPATH

edit-config:remove

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/ipv4-family/vpnTargets/huawei-ethernet-vpn

Data Requirements
Table 3-1091 Deleting the EVPN-VPN-Target extended community configuration

Item

Data

Description

VPN instance name

vpna

Delete the value of 111:1 that is imported to the EVPN-VPN-Target extended community list of the VPN instance vpna.

RD of the VPN instance IPv4 address family

200:2

Value added to the EVPN-VPN-Target extended community list

111:1

Import or export EVPN-VPN-Target extended community list value

import_extcommunity

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
    <vpn-instance>
     <vpn-instance-name>vpna</vpn-instance-name>
     <ipv4-family>
      <route-distinguisher>200:2</route-distinguisher>
      <vpnTargets xc:operation="remove">
       <vpnTarget-ethernet-vpn xmlns="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"/>
       <vpnTarget>
        <vrfRTValue>111:1</vrfRTValue>
        <vrfRTType>import_extcommunity</vrfRTType>
       </vpnTarget>
      </vpnTargets>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
  <ok/> 
</rpc-reply> 

Enabling a VPN Instance to Advertise IP Routes to a BGP-EVPN Address Family

This section provides a sample of enabling a VPN to advertise IP routes to a BGP-EVPN address family.

Table 3-1092 Enabling a VPN instance to advertise IP routes to a BGP-EVPN address family

Operation

XPATH

edit-config:default

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/advertise-to-ethernet-vpn

Data Requirements
Table 3-1093 Enabling a VPN instance to advertise IP routes to a BGP-EVPN address family

Item

Data

Description

VPN instance name

vpna

Create a VPN instance and set the name to vpna. Enter the BGP 100 view and associate the VPN instance vpna with an IPv4 address family. Enter the BGP-VPN IPv4 address family view, and enable the VPN instance to advertise IP routes to the BGP-EVPN address family.

AS number of the VPN instance IPv4 address family

100

VPN instance associated with the IPv4 address family

vpna

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
    <vpn-instance>
     <vpn-instance-name>vpna</vpn-instance-name>
     <ipv4-family>
      <route-distinguisher>200:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>123</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</type>
       <name>adfa</name>
       <bgp-routing xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp">
        <bgp-router>
         <local-as-number>100</local-as-number>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
          <advertise-to-ethernet-vpn xmlns="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"></advertise-to-ethernet-vpn>
          <bgp-af-ipv4-vpn-instance>
           <vpn-instance-name>vpna</vpn-instance-name>
          </bgp-af-ipv4-vpn-instance>
         </bgp-af-ipv4-vpn-instances>
        </bgp-router>
       </bgp-routing>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
  <ok/> 
</rpc-reply> 

Disabling a VPN Instance from Advertising IP Routes to a BGP-EVPN Address Family

This section provides a sample of disabling a VPN from advertising IP routes to a BGP-EVPN address family.

Table 3-1094 Disabling a VPN instance from advertising IP routes to a BGP-EVPN address family

Operation

XPATH

edit-config:remove

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/advertise-to-ethernet-vpn

Data Requirements
Table 3-1095 Disabling a VPN instance from advertising IP routes to a BGP-EVPN address family

Item

Data

Description

VPN instance name

vpna

Create a VPN instance and set the name to vpna. Enter the BGP 100 view and associate the VPN instance vpna with an IPv4 address family. Enter the BGP-VPN IPv4 address family view, and disable the VPN instance from advertising IP routes to the BGP-EVPN address family.

AS number of the VPN instance IPv4 address family

100

VPN instance associated with the IPv4 address family

vpna

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
    <vpn-instance>
     <vpn-instance-name>vpna</vpn-instance-name>
     <ipv4-family>
      <route-distinguisher>200:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>123</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</type>
       <name>adfa</name>
       <bgp-routing xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp">
        <bgp-router>
         <local-as-number>100</local-as-number>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="remove">
          <advertise-to-ethernet-vpn xmlns="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"></advertise-to-ethernet-vpn>
          <bgp-af-ipv4-vpn-instance>
           <vpn-instance-name>vpna</vpn-instance-name>
          </bgp-af-ipv4-vpn-instance>
         </bgp-af-ipv4-vpn-instances>
        </bgp-router>
       </bgp-routing>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
  <ok/> 
</rpc-reply> 
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8224

Downloads: 69

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