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

L3VPN

The BGP/MPLS IP VPN is a Layer 3 virtual private network (L3VPN). It uses the Border Gateway Protocol (BGP) to advertise VPN routes and the Multiprotocol Label Switching (MPLS) to forward VPN packets on backbone networks. IP indicates that the VPN transmits Internet Protocol (IP) packets.

NOTE:

The AR100&AR120&AR150&AR160&AR200 series do not supports BGP/MPLS IP VPN, only supports MCE.

Data Model

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

Table 3-992 L3VPN

Object

Description

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/vpn-instance-name

Indicates the VPN instance name. The value is a string of 1 to 31 case-sensitive characters without spaces. The character string can contain spaces if it is enclosed with double quotation marks (" ").

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

Indicates that the IPv4 address family is enabled for the VPN instance and the VPN instance IPv4 address family view is displayed.

/huawei-bgp-l3vpn:vpn-instances/vpn-instance/ipv4-family/route-distinguisher

Indicates the Route Distinguisher (RD) of the VPN instance IPv4 address family.

By default, no RD is configured for the VPN instance IPv4 address family.

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

Indicates the 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 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 VPN-Target extended community list of the VPN instance IPv4 address family.

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

The default value is both.

/huawei-bgp-l3vpn:vpn-interfaces/vpn-interface/name

Indicates the name of the interface to be bound to the VPN instance.

/huawei-bgp-l3vpn:vpn-interfaces/vpn-interface/vpn-instance-name

Indicates the name of the VPN instance to bound.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/local-as-number

Indicates that the BGP is enabled and the BGP view with specified AS number is displayed. The value is an integer that ranges from 1 to 4294967295.

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

Indicates that a specified VPN instance is associated with the IPv4 address family and the BGP-VPN instance IPv4 address family view is displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces. The character string can contain spaces if it is enclosed with double quotation marks (" ").

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

Indicates that BGP can import routes discovered by other routing protocols and route type.

  • Direct: indicates a direct route.
  • Static: indicates a static route.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route

Indicates that BGP can import routes of other routing protocols and types.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/direct

Indicates that BGP can import direct routes.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/static

Indicates that BGP can import static routes.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/unr

Indicates that BGP can import UNR routes.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/ospf

Indicates that BGP can import OSPF routes.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/isis

Indicates that BGP can import IS-IS routes.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/router-id/ip-address

Indicates a Router ID of the BGP VPN instance IPv4 address family. It is expressed in the IPv4 address format.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/peer-addr

Indicates the IPv4 address of a peer.

It can be an IP address of an interface on a directly-connected peer, and may also be an IP address of a Loopback interface on a reachable peer.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/remote-as

Indicates the AS number of a peer. The value is an integer that ranges from 1 to 4294967295.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/cipher-password

Indicates the cipher-text password used for MD5 authentication on BGP messages when a TCP connection is established between BGP peers based on the peer address in an IPv4 address family-enabled VPN instance. The value can be a string of 1 to 255 case-sensitive characters with the exception of spaces, in plain text, or a string of 20 to 392 case-sensitive characters with the exception of spaces, in cipher text.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/route-policy/route-policy/direction

Indicates the direction of a route filtering policy for a specified peer group. The value is of enumerated type and can be import or export.

NOTE:

If this object is set to both import and export, the peer group filters routes in both directions.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/route-policy/route-policy/route-policy-name

Indicates the name of a routing policy. The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/route-policy/route-policy/direction

Indicates the direction of a route filtering policy for a specified peer. The value is of enumerated type and can be import or export.

NOTE:

If this object is set to both import and export, the peer filters routes in both directions.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/route-policy/route-policy/route-policy-name

Indicates the name of a routing policy. The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/cipher-password

Indicates the cipher-text password used for MD5 authentication on BGP messages when a TCP connection is established between BGP peers based on the peer group name in an IPv4 address family-enabled VPN instance. The value can be a string of 1 to 255 case-sensitive characters with the exception of spaces, in plain text, or a string of 20 to 392 case-sensitive characters with the exception of spaces, in cipher text.

Configuring a VPN Instance

This section provides a sample of configuring a VPN instance.

Table 3-993 Configuring a VPN instance

Operation

XPATH

edit-config:default

/huawei-bgp-l3vpn:vpn-instances/vpn-instance

Data Requirements
Table 3-994 Configuring the VPN instance vpna

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 VPN-Target extended community list

111:1

Import or export 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>
        <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 a VPN Instance

This section provides a sample of deleting a VPN instance.

Table 3-995 Deleting a VPN instance

Operation

XPATH

edit-config:remove

/huawei-bgp-l3vpn:vpn-instances/vpn-instance

Data Requirements
Table 3-996 Deleting the VPN instance vpna

Item

Data

Description

VPN instance name

vpna

Delete the VPN instance vpna, and cancel the configurations of the RD and import VPN-Target list, which are set to 200:2 and 111:1, respectively.

RD of the VPN instance IPv4 address family

200:2

Value added to the VPN-Target extended community list

111:1

Import or export 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 xc:operation="remove">
     <vpn-instance-name>vpna</vpn-instance-name>
     <ipv4-family xc:operation="remove">
      <route-distinguisher>200:2</route-distinguisher>
      <vpnTargets>
       <vpnTarget xc:operation="remove">
        <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> 

Binding an Interface to a VPN Instance

This section provides a sample of binding an interface to a VPN instance.

Table 3-997 Binding an interface to a VPN instance

Operation

XPATH

edit-config:default

/huawei-bgp-l3vpn:vpn-interfaces/vpn-interface

Data Requirements
Table 3-998 Binding VLANIF 10 to the VPN instance vpna

Item

Data

Description

Name of the interface to be bound to a VPN instance

vlanif10

Create the interface VLANIF 10 and VPN instance vpna, and bind the interface to the VPN instance.

Name of the VPN instance to be bound to the interface

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">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>10</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>vlanif10</name>
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
    </interface>
   </interfaces>
   <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>
   <vpn-interfaces xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
    <vpn-interface>
     <name>vlanif10</name>
     <vpn-instance-name>vpna</vpn-instance-name>
    </vpn-interface>
   </vpn-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="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
  <ok/> 
</rpc-reply> 

Unbinding an Interface from a VPN Instance

This section provides a sample of unbinding an interface from a VPN instance.

Table 3-999 Unbinding an interface from a VPN instance

Operation

XPATH

edit-config:remove

/huawei-bgp-l3vpn:vpn-interfaces/vpn-interface

Data Requirements
Table 3-1000 Unbinding VLANIF 10 from the VPN instance vpna

Item

Data

Description

Name of the interface bound to the VPN instance

vlanif10

Unbind the created interface VLANIF 10 from the VPN instance vpna.

Name of the VPN instance bound to the interface

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">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>10</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>vlanif10</name>
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
    </interface>
   </interfaces>
   <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>
   <vpn-interfaces xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
    <vpn-interface xc:operation="remove">
     <name>vlanif10</name>
     <vpn-instance-name>vpna</vpn-instance-name>
    </vpn-interface>
   </vpn-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="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
  <ok/> 
</rpc-reply> 

Configuring Route Exchange with a Peer

This section provides a sample of configuring the route exchange with peers.

Table 3-1001 Configuring route exchange with a peer

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/bgp-af-ipv4-vpn-instance

Data Requirements
Table 3-1002 Configuring route exchange with a peer

Item

Data

Description

VPN instance name

vpna

Create the VPN instance vpna and enable BGP. Enter the BGP 100 view and associate the VPN instance vpna with an IPv4 address family. Enter the BGP VPN instance IPv4 address family view, import the direct routes to the VPN routing table, and set the router ID of the BGP VPN instance IPv4 address family to 1.1.1.1, peer IPv4 address to 10.2.1.1, and peer AS number to 65410.

AS number of the VPN instance IPv4 address family

100

VPN instance associated with the IPv4 address family

vpna

Routing protocol and route type imported to BGP

Direct

Router ID of the BGP VPN instance IPv4 address family

1.1.1.1

Peer IPv4 address

10.2.1.1

Peer AS number

65410

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">
          <bgp-af-ipv4-vpn-instance>
           <vpn-instance-name>vpna</vpn-instance-name>
           <protocol>Direct</protocol>
           <router-id>
            <ip-address>1.1.1.1</ip-address>
           </router-id>
           <bgp-peers>
            <bgpPeer>
             <peer-addr>10.2.1.1</peer-addr>
             <remote-as>65410</remote-as>
            </bgpPeer>
           </bgp-peers>
          </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> 

Deleting the Configuration of Route Exchange with a Peer

This section provides a sample of deleting the configuration of the route exchange with peers.

Table 3-1003 Deleting the configuration of route exchange with a peer

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/bgp-af-ipv4-vpn-instance

Data Requirements
Table 3-1004 Deleting the configuration of route exchange with a peer

Item

Data

Description

VPN instance name

vpna

Delete the VPN instance vpna, enter the BGP 100 view, associate the VPN instance vpna with the IPv4 address family. Enter the BGP VPN instance IPv4 address family view, delete the direct routes imported to the VPN routing table, and set the router ID of the BGP VPN instance IPv4 address family to 1.1.1.1, peer IPv4 address to 10.2.1.1, and peer AS number to 65410.

AS number of the VPN instance IPv4 address family

100

VPN instance associated with the IPv4 address family

vpna

Routing protocol and route type imported to BGP

Direct

Router ID of the BGP VPN instance IPv4 address family

1.1.1.1

Peer IPv4 address

10.2.1.1

Peer AS number

65410

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">
          <bgp-af-ipv4-vpn-instance xc:operation="remove">
           <vpn-instance-name>vpna</vpn-instance-name>
           <protocol xc:operation="remove">Direct</protocol>
           <router-id xc:operation="remove">
            <ip-address>1.1.1.1</ip-address>
           </router-id>
           <bgp-peers>
            <bgpPeer xc:operation="remove">
             <peer-addr>10.2.1.1</peer-addr>
             <remote-as>65410</remote-as>
            </bgpPeer>
           </bgp-peers>
          </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> 

Configuring BGP to Import Routes of Other Routing Protocols and Types

Configuring BGP to Import Direct Routes

This section provides a sample of configuring BGP to import direct routes.

Table 3-1005 Configuring BGP to import direct routes

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/direct

Data Requirements
Table 3-1006 Configuring BGP to import direct routes

Item

Data

Description

Routing policy name

policy

Configure BGP to import direct routes using the routing policy policy.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes>
            <import-route xc:operation="merge">
             <import-protocol>direct</import-protocol>
             <import-route-policy>policy</import-route-policy>
             <med-for-route>33</med-for-route>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Deleting Direct Routes Imported to BGP

This section provides a sample of deleting direct routes imported to BGP.

Table 3-1007 Deleting direct routes imported to BGP

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/bgp-af-ipv4-vpn-instance/import-routes/import-route/direct

Data Requirements
Table 3-1008 Deleting direct routes imported to BGP

Item

Data

Description

Routing policy name

policy

Delete direct routes imported to BGP using the routing policy policy.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes>
            <import-route xc:operation="remove">
             <import-protocol>direct</import-protocol>
             <import-route-policy>policy</import-route-policy>
             <med-for-route>33</med-for-route>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Configuring BGP to Import Static Routes

This section provides a sample of configuring BGP to import static routes.

Table 3-1009 Configuring BGP to import static routes

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/static

Data Requirements
Table 3-1010 Configuring BGP to import static routes

Item

Data

Description

Routing policy name

policy

Configure BGP to import static routes using the routing policy policy.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes>
            <import-route xc:operation="merge">
             <import-protocol>static</import-protocol>
             <import-route-policy>policy</import-route-policy>
             <med-for-route>33</med-for-route>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Deleting Static Routes Imported to BGP

This section provides a sample of deleting static routes imported to BGP.

Table 3-1011 Deleting static routes imported to BGP

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/bgp-af-ipv4-vpn-instance/import-routes/import-route/static

Data Requirements
Table 3-1012 Deleting static routes imported to BGP

Item

Data

Description

Routing policy name

policy

Delete static routes imported to BGP using the routing policy policy.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes>
            <import-route xc:operation="remove">
             <import-protocol>static</import-protocol>
             <import-route-policy>policy</import-route-policy>
             <med-for-route>33</med-for-route>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Configuring BGP to Import UNR Routes

This section provides a sample of configuring BGP to import UNR routes.

Table 3-1013 Configuring BGP to import UNR routes

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/unr

Data Requirements
Table 3-1014 Configuring BGP to import UNR routes

Item

Data

Description

Routing policy name

policy

Configure BGP to import UNR routes using the routing policy policy.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes>
            <import-route xc:operation="merge">
             <import-protocol>unr</import-protocol>
             <import-route-policy>policy</import-route-policy>
             <med-for-route>33</med-for-route>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Deleting UNR Routes Imported to BGP

This section provides a sample of deleting UNR routes imported to BGP.

Table 3-1015 Deleting UNR routes imported to BGP

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/bgp-af-ipv4-vpn-instance/import-routes/import-route/unr

Data Requirements
Table 3-1016 Deleting UNR routes imported to BGP

Item

Data

Description

Routing policy name

policy

Delete UNR routes imported to BGP using the routing policy policy.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes>
            <import-route xc:operation="remove">
             <import-protocol>unr</import-protocol>
             <import-route-policy>policy</import-route-policy>
             <med-for-route>33</med-for-route>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Configuring BGP to Import OSPF Routes

This section provides a sample of configuring BGP to import OSPF routes.

Table 3-1017 Configuring BGP to import OSPF routes

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/ospf

Data Requirements
Table 3-1018 Configuring BGP to import OSPF routes

Item

Data

Description

Number of the local AS

100

Configure BGP to import OSPF routes with the protocol number 1 using the routing policy policy.

OSPF protocol number

1

Routing policy name

policy

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes xc:operation="merge">
            <import-route xc:operation="merge">
             <import-protocol>ospf</import-protocol>
             <ospf>
              <ospf-id>1</ospf-id>
              <import-route-policy>policy</import-route-policy>
              <med-for-route>123456789</med-for-route>
             </ospf>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Deleting OSPF Routes Imported to BGP

This section provides a sample of deleting OSPF routes imported to BGP.

Table 3-1019 Deleting OSPF routes imported to BGP

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/bgp-af-ipv4-vpn-instance/import-routes/import-route/ospf

Data Requirements
Table 3-1020 Deleting OSPF routes imported to BGP

Item

Data

Description

Number of the local AS

100

Delete OSPF routes with the protocol number 1 imported to BGP using the routing policy policy.

OSPF protocol number

1

Routing policy name

policy

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes xc:operation="remove">
            <import-route xc:operation="merge">
             <import-protocol>ospf</import-protocol>
             <ospf>
              <ospf-id>1</ospf-id>
              <import-route-policy>policy</import-route-policy>
              <med-for-route>123456789</med-for-route>
             </ospf>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Configuring BGP to Import IS-IS Routes

This section provides a sample of configuring BGP to import IS-IS routes.

Table 3-1021 Configuring BGP to import IS-IS routes

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/import-routes/import-route/isis

Data Requirements
Table 3-1022 Configuring BGP to import IS-IS routes

Item

Data

Description

Number of the local AS

100

Configure BGP to import IS-IS routes with the protocol number 1 using the routing policy policy.

OSPF protocol number

1

Routing policy name

policy

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes xc:operation="merge">
            <import-route xc:operation="merge">
             <import-protocol>isis</import-protocol>
             <isis>
              <isis-id>1</isis-id>
              <import-route-policy>policy</import-route-policy>
              <med-for-route>123456789</med-for-route>
             </isis>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply> 
Deleting IS-IS Routes Imported to BGP

This section provides a sample of deleting IS-IS routes imported to BGP.

Table 3-1023 Deleting IS-IS routes imported to BGP

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/bgp-af-ipv4-vpn-instance/import-routes/import-route/isis

Data Requirements
Table 3-1024 Deleting IS-IS routes imported to BGP

Item

Data

Description

Number of the local AS

100

Delete IS-IS routes with the protocol number 1 imported to BGP using the routing policy policy.

OSPF protocol number

1

Routing policy name

policy

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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>ntptest14</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:1</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>ntptest14</vpn-instance-name> 
           <import-routes xc:operation="remove">
            <import-route xc:operation="merge">
             <import-protocol>isis</import-protocol>
             <isis>
              <isis-id>1</isis-id>
              <import-route-policy>policy</import-route-policy>
              <med-for-route>123456789</med-for-route>
             </isis>
            </import-route>
           </import-routes>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
  <ok/> 
</rpc-reply>

Configuring a Bidirectional Route Filtering Policy for a BGP Peer Group

Configuring a Bidirectional Route Filtering Policy for a BGP Peer Group

This section provides a sample of configuring a bidirectional route filtering policy for a BGP peer group.

Table 3-1025 Configuring a bidirectional route filtering policy for a BGP peer group

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/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/route-policy/route-policy

Data Requirements
Table 3-1026 Configuring a bidirectional route filtering policy for a BGP peer group

Item

Data

Description

BGP peer group name

test

Configure a route filtering policy named test to filter routes of a BGP peer group in both directions.

Route filtering policy name

test

Route filtering direction

export

Route filtering policy name

test

Route filtering direction

import

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_d428d0f5b836416088d6fcfc63729702">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>test</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>vpn5</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:2</route-distinguisher>
      <vpnTargets>
       <vpnTarget>
        <vrfRTValue>65001:1</vrfRTValue>
        <vrfRTType>import_extcommunity</vrfRTType>
       </vpnTarget>
      </vpnTargets>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>sdwan</name>
     <routing-protocols>
      <routing-protocol>
       <name>sdwan</name>
       <type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</type>
       <bgp-routing xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp">
        <bgp-router>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
          <bgp-af-ipv4-vpn-instance>
           <bgp-peers-groups>
            <bgpPeer-group>
             <group-name>test</group-name>
             <bgp-type>internal</bgp-type>
             <route-policy>
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>export</direction>
              </route-policy>
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>import</direction>
              </route-policy>
             </route-policy>
            </bgpPeer-group>
           </bgp-peers-groups>
           <vpn-instance-name>vpn5</vpn-instance-name>
          </bgp-af-ipv4-vpn-instance>
         </bgp-af-ipv4-vpn-instances>
         <local-as-number>65001</local-as-number>
        </bgp-router>
       </bgp-routing>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_d428d0f5b836416088d6fcfc63729702">
  <ok/> 
</rpc-reply> 
Deleting a Bidirectional Route Filtering Policy of a BGP Peer Group

This section provides a sample of deleting a bidirectional route filtering policy of a BGP peer group.

Table 3-1027 Deleting a bidirectional route filtering policy of a BGP peer group

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/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/route-policy/route-policy

Data Requirements
Table 3-1028 Deleting a bidirectional route filtering policy of a BGP peer group

Item

Data

Description

BGP peer group name

test

Delete the route filtering policy named test for filtering routes of a BGP peer group in both directions.

Route filtering policy name

test

Route filtering direction

export

Route filtering policy name

test

Route filtering direction

import

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_d428d0f5b836416088d6fcfc63729702">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>test</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>vpn5</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>210:2</route-distinguisher>
      <vpnTargets>
       <vpnTarget>
        <vrfRTValue>65001:1</vrfRTValue>
        <vrfRTType>import_extcommunity</vrfRTType>
       </vpnTarget>
      </vpnTargets>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>sdwan</name>
     <routing-protocols>
      <routing-protocol>
       <name>sdwan</name>
       <type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</type>
       <bgp-routing xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp">
        <bgp-router>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
          <bgp-af-ipv4-vpn-instance>
           <bgp-peers-groups>
            <bgpPeer-group>
             <group-name>test</group-name>
             <bgp-type>internal</bgp-type>
             <route-policy  xc:operation="remove">
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>export</direction>
              </route-policy>
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>import</direction>
              </route-policy>
             </route-policy>
            </bgpPeer-group>
           </bgp-peers-groups>
           <vpn-instance-name>vpn5</vpn-instance-name>
          </bgp-af-ipv4-vpn-instance>
         </bgp-af-ipv4-vpn-instances>
         <local-as-number>65001</local-as-number>
        </bgp-router>
       </bgp-routing>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_d428d0f5b836416088d6fcfc63729702">
  <ok/> 
</rpc-reply> 

Configuring a Bidirectional Route Filtering Policy for a BGP Peer

Configuring a Bidirectional Route Filtering Policy for a BGP Peer

This section provides a sample of configuring a bidirectional route filtering policy for a BGP peer.

Table 3-1029 Configuring a bidirectional route filtering policy for a BGP peer

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/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/route-policy/route-policy

Data Requirements
Table 3-1030 Configuring a bidirectional route filtering policy for a BGP peer

Item

Data

Description

IPv4 address of the peer

192.167.10.1

Configure a route filtering policy named test to filter routes of a BGP peer in both directions.

Route filtering policy name

test

Route filtering direction

export

Route filtering policy name

test

Route filtering direction

import

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>test</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>test</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>200:2</route-distinguisher>
      <vpnTargets>
       <vpnTarget>
        <vrfRTValue>65001:1</vrfRTValue>
        <vrfRTType>import_extcommunity</vrfRTType>
       </vpnTarget>
      </vpnTargets>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy>
     <name>test</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>test</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>65001</local-as-number>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>test</vpn-instance-name> 
           <bgp-peers>
            <bgpPeer xc:operation="merge">
             <peer-addr>192.167.10.1</peer-addr>
             <remote-as>300</remote-as> 
             <route-policy>
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>export</direction>
              </route-policy>
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>import</direction>
              </route-policy>
             </route-policy>
            </bgpPeer>
           </bgp-peers>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI">
  <ok/> 
</rpc-reply> 
Deleting a Bidirectional Route Filtering Policy of a BGP Peer

This section provides a sample of deleting a bidirectional route filtering policy of a BGP peer.

Table 3-1031 Deleting a bidirectional route filtering policy of a BGP peer

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/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/route-policy/route-policy

Data Requirements
Table 3-1032 Deleting a bidirectional route filtering policy of a BGP peer

Item

Data

Description

IPv4 address of the peer

192.167.10.1

Delete the route filtering policy named test for filtering routes of a BGP peer in both directions.

Route filtering policy name

test

Route filtering direction

export

Route filtering policy name

test

Route filtering direction

import

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>test</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>test</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn">
      <route-distinguisher>200:2</route-distinguisher>
      <vpnTargets>
       <vpnTarget>
        <vrfRTValue>65001:1</vrfRTValue>
        <vrfRTType>import_extcommunity</vrfRTType>
       </vpnTarget>
      </vpnTargets>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy>
     <name>test</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>test</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>65001</local-as-number>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>test</vpn-instance-name> 
           <bgp-peers>
            <bgpPeer xc:operation="merge">
             <peer-addr>192.167.10.1</peer-addr>
             <remote-as>300</remote-as> 
             <route-policy xc:operation="remove">
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>export</direction>
              </route-policy>
              <route-policy>
               <route-policy-name>test</route-policy-name>
               <direction>import</direction>
              </route-policy>
             </route-policy>
            </bgpPeer>
           </bgp-peers>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI">
  <ok/> 
</rpc-reply> 

Configuring MD5 Authentication on BGP Messages Based on the IP Address of the Peer in an IPv4 Address Family-Enabled VPN Instance

Configuring MD5 Authentication on BGP Messages Based on the IP Address of the Peer in an IPv4 Address Family-Enabled VPN Instance

This section provides a sample of configuring MD5 authentication on BGP messages based on the IP address of the peer in an IPv4 address family-enabled VPN instance.

Table 3-1033 Configuring MD5 authentication on BGP messages based on the IP address of the peer in an IPv4 address family-enabled VPN instance

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/cipher-password

Data Requirements
Table 3-1034 Configuring MD5 authentication on BGP messages based on the IP address of the peer in an IPv4 address family-enabled VPN instance

Item

Data

Description

Peer address

192.167.10.1

Configure MD5 authentication on BGP messages when a TCP connection is established between the local device and the peer 192.167.10.1, and set the cipher-text password to huawei123.

Peer AS number

300

Password in cipher text

huawei123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>test</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" >
      <route-distinguisher>200:2</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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>65001</local-as-number>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>test</vpn-instance-name> 
           <bgp-peers>
            <bgpPeer>
             <peer-addr>192.167.10.1</peer-addr>
             <remote-as>300</remote-as>
             <cipher-password xc:operation="merge">huawei123</cipher-password>
            </bgpPeer>
           </bgp-peers>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI">
 <ok/>
</rpc-reply>
Canceling MD5 Authentication on BGP Messages Based on the IP Address of the Peer in an IPv4 Address Family-Enabled VPN Instance

This section provides a sample of canceling MD5 authentication on BGP messages based on the IP address of the peer in an IPv4 address family-enabled VPN instance.

Table 3-1035 Canceling MD5 authentication on BGP messages based on the IP address of the peer in an IPv4 address family-enabled VPN instance

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/bgp-af-ipv4-vpn-instance/bgp-peers/bgpPeer/cipher-password

Data Requirements
Table 3-1036 Canceling MD5 authentication on BGP messages based on the IP address of the peer in an IPv4 address family-enabled VPN instance

Item

Data

Description

Peer address

192.167.10.1

Cancel MD5 authentication on BGP messages when a TCP connection is established between the local device and the peer 192.167.10.1.

Peer AS number

300

Password in cipher text

huawei123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>test</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" >
      <route-distinguisher>200:2</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
    <routing-instance> 
     <name>adfa</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>65001</local-as-number>
         <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> 
          <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>test</vpn-instance-name> 
           <bgp-peers>
            <bgpPeer>
             <peer-addr>192.167.10.1</peer-addr>
             <remote-as>300</remote-as>
             <cipher-password xc:operation="remove">huawei123</cipher-password>
            </bgpPeer>
           </bgp-peers>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI">
 <ok/>
</rpc-reply>

Configuring MD5 Authentication on BGP Messages Based on the Name of the Peer Group in an IPv4 Address Family-Enabled VPN Instance

Configuring MD5 Authentication on BGP Messages Based on the Name of the Peer Group in an IPv4 Address Family-Enabled VPN Instance

This section provides a sample of configuring MD5 authentication on BGP messages based on the name of the peer group in an IPv4 address family-enabled VPN instance.

Table 3-1037 Configuring MD5 authentication on BGP messages based on the name of the peer group in an IPv4 address family-enabled VPN instance

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/cipher-password

Data Requirements
Table 3-1038 Configuring MD5 authentication on BGP messages based on the name of the peer group in an IPv4 address family-enabled VPN instance

Item

Data

Description

Peer group name

group1

Configure MD5 authentication on BGP messages when a TCP connection is established between the local device and the peer group group1, and set the cipher-text password to huawei123.

Peer group type

internal

Password in cipher text

huawei123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>test</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" >
      <route-distinguisher>200:2</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
  </vpn-instances>
  <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
   <routing-instance> 
    <name>adfa</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>65001</local-as-number>
        <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> 
         <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>test</vpn-instance-name> 
           <bgp-peers-groups>
            <bgpPeer-group>
             <group-name>group1</group-name>
             <bgp-type>internal</bgp-type>
             <cipher-password xc:operation="merge">huawei123</cipher-password>
            </bgpPeer-group>
           </bgp-peers-groups>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI">
 <ok/>
</rpc-reply>
Canceling MD5 Authentication on BGP Messages Based on the Name of the Peer Group in an IPv4 Address Family-Enabled VPN Instance

This section provides a sample of canceling MD5 authentication on BGP messages based on the name of the peer group in an IPv4 address family-enabled VPN instance.

Table 3-1039 Canceling MD5 authentication on BGP messages based on the name of the peer group in an IPv4 address family-enabled VPN instance

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/bgp-af-ipv4-vpn-instance/bgp-peers-groups/bgpPeer-group/cipher-password

Data Requirements
Table 3-1040 Canceling MD5 authentication on BGP messages based on the name of the peer group in an IPv4 address family-enabled VPN instance

Item

Data

Description

Peer group name

group1

Cancel MD5 authentication on BGP messages when a TCP connection is established between the local device and the peer group group1.

Peer group type

internal

Password in cipher text

huawei123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI"> 
 <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" xc:operation="merge">
    <vpn-instance>
     <vpn-instance-name>test</vpn-instance-name>
     <ipv4-family xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" >
      <route-distinguisher>200:2</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
  </vpn-instances>
  <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> 
   <routing-instance> 
    <name>adfa</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>65001</local-as-number>
        <bgp-af-ipv4-vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> 
         <bgp-af-ipv4-vpn-instance> 
           <vpn-instance-name>test</vpn-instance-name> 
           <bgp-peers-groups>
            <bgpPeer-group>
             <group-name>group1</group-name>
             <bgp-type>internal</bgp-type>
             <cipher-password xc:operation="remove">huawei123</cipher-password>
            </bgpPeer-group>
           </bgp-peers-groups>
          </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFI">
 <ok/>
</rpc-reply>
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8209

Downloads: 69

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