BGP Route Management
This section describes the configuration model of BGP route management and provides examples of XML packets.
Configuring a BGP-IPv4 Unicast Address Family
This section describes the configuration model of BGP-IPv4 unicast address family and provides examples of XML packets.
Data Model
The configuration model file matching BGP-IPv4 unicast address family is huawei-bgp.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/local-as-number |
Enables BGP, enters the BGP view, and specifies an integral AS number. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/router-id/ip-address |
Specifies a Router ID. |
It is in dotted decimal notation. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/router-id/enable-auto-config |
Configures automatic Router ID selection for all BGP-VPN instance IPv4 or IPv6 address families. If a Router ID is manually specified for a BGP-VPN instance IPv4 or IPv6 address family, the manually specified Router ID takes precedence over the automatically selected Router ID. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/graceful-restart/enable |
Configures the GR function. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/default-route-imported |
Configures the function that imports the default routes in the local IP routing table to the BGP routing table. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/protocol/direct |
Configures the function that imports direct routes. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/protocol/static |
Configures the function that imports static routes. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/protocol/isis/isis-id |
Imports IS-IS routes of IS-IS process 1 into BGP. |
The value is an integer that ranges from 1 to 65535. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/protocol/ospf/ospf-id |
Imports OSPF routes of OSPF process 1 into BGP. |
The value is an integer that ranges from 1 to 65535. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/peer-address |
Specifies the IP address of a peer. |
The value is in dotted decimal notation. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/remote-as |
Specify the AS number of a peer. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/identifier-interface |
Specifies the type and number of the source interface that sends BGP packets. |
The value is a string of characters in the format of interface-typeinterface-number.
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/ipv4/unicast/active |
Configures the function that exchanges routing information with the specified peer. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/ipv4/unicast/route-reflector-client |
Configures the local device as a route reflector and the specified peer or peer group as the client of the route reflector. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/aggregate-prefix/aggregate-ip-prefix |
Indicates the IP address and mask length of the summary route. |
The format is ipv4-address/mask-length:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/aggregate-prefix/detail-suppressed-flag |
Indicates whether to advertise only the summary route. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/networks/ip-prefix |
Adds the route with the specified IP address and mask length statically to the BGP routing table and advertises the route to the peer. |
The format is ipv4-address/mask-length:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/keepalive-time |
Indicates the keepalive time of a BGP peer. |
The value is an integer that ranges from 0 to 21845, in seconds. The default value of a Keepalive timer is 60s |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/hold-time |
Indicates the hold time of a BGP peer. |
The value is an integer that can be 0 or ranges from 3 to 65535, in seconds. The default value of a Hold timer is 180s. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/cipher-password |
Indicates that MD5 authentication is used during the establishment of a TCP connection and indicates a ciphertext password. |
The value is a string of case-sensitive characters without spaces. When the value is displayed in plaintext, its length ranges from 1 to 255. When the value is displayed in ciphertext, its length ranges from 20 to 392. |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/simple-password |
Indicates that MD5 authentication is used during the establishment of a TCP connection and indicates a simple password. |
The value is a string of 1 to 255 case-sensitive characters without spaces. |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/bgp-neighbor-keychain |
Indicates that Keychain authentication is used during the establishment of a TCP connection. |
The value is a string of 1 to 47 case-insensitive characters. Except the question mark (?) and space. However, when double quotation marks (") are used around the string, spaces are allowed in the string. |
This object cannot be configured together with the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/cipher-password object and the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/simple-password object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/fake-as/as-number |
Specifies a fake AS number used by the peer to establish a connection with the local end. |
The value is an integer in the range from 1 to 4294967295. |
The value must be different from the value of the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/local-as-number object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/af-configuration/ipv4/unicast/load-balancing/max-number |
Configures the maximum number of equal-cost routes for load balancing. |
The value is an integer that ranges from 1 to 64. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/bfd/bfd-config/enable |
Enables BFD for a peer or a peer group. |
The value is of the Boolean type:
The default value is false. |
Before configuring this object, configure the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/remote-as object first. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/bfd/bfd-config/min-tx-interval |
Specifies the interval at which BFD packets are sent. |
The value is an integer in the range from 3 to 1000, in milliseconds. The default value is 1000. |
Before configuring this object, configure the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/remote-as object first. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/bfd/bfd-config/min-rx-interval |
Specifies the interval at which BFD packets are received. |
The value is an integer in the range from 3 to 1000, in milliseconds. The default value is 1000. |
Before configuring this object, configure the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/remote-as object first. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/bfd/bfd-config/detect-multiplier |
Specifies the local detection time multiplier. |
The value is an integer in the range from 3 to 50. The default value is 3. |
Before configuring this object, configure the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/bgp-neighbors/bgp-neighbor/remote-as object first. |
Configuring a BGP-IPv4 Unicast Address Family
This section provides a sample of configuring a BGP-IPv4 unicast address family using the edit-config:merge method.
Operation |
XPATH |
---|---|
edit-config:merge |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Integral AS number |
100 |
Enable BGP and enter the BGP view. |
Router ID |
3.3.3.3 |
Specifies a Router ID. |
GR function |
true |
Enable the GR function. |
Default route import |
true |
Import the default routes in the local IP routing table to the BGP routing table. |
Direct route import |
true |
Import direct routes. |
Static route import |
true |
Import static routes. |
IS-IS route import |
1 |
Import IS-IS routes of IS-IS process 1 into BGP. |
OSPF route import |
1 |
Import OSPF routes of OSPF process 1 into BGP. |
Peer IP address |
10.1.1.1 |
Specify a peer IP address. |
Peer AS number |
100 |
Configure an AS number for a peer. |
Source interface |
Vlanif100 |
Specify the type and number of the source interface that sends BGP packets. |
BGP peer |
true |
Enable a BGP peer. |
Route reflector |
true |
Enable the local end as a route reflector. |
Request Example
Create VLANIF 100 and assign an IP address to it.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface> <if:name>Vlanif100</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type> <ip:ipv4 xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip"> <ip:address> <ip:ip>10.1.1.1</ip:ip> <ip:prefix-length>24</ip:prefix-length> </ip:address> </ip:ipv4> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Configure a BGP-IPv4 unicast address family.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <rt:name>bgp</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:huawei-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">huawei-bgp:bgp-routing-protocol</rt:type> <rt:name>bgp</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> <hw-bgp:router-id> <hw-bgp:ip-address>3.3.3.3</hw-bgp:ip-address> </hw-bgp:router-id> <hw-bgp:graceful-restart> <hw-bgp:enable>true</hw-bgp:enable> </hw-bgp:graceful-restart> <hw-bgp:af-configuration> <hw-bgp:ipv4> <hw-bgp:unicast> <hw-bgp:default-route-imported>true</hw-bgp:default-route-imported> <hw-bgp:protocol> <hw-bgp:direct>true</hw-bgp:direct> <hw-bgp:isis> <hw-bgp:isis-id>1</hw-bgp:isis-id> </hw-bgp:isis> <hw-bgp:ospf> <hw-bgp:ospf-id>1</hw-bgp:ospf-id> </hw-bgp:ospf> <hw-bgp:static>true</hw-bgp:static> </hw-bgp:protocol> </hw-bgp:unicast> </hw-bgp:ipv4> </hw-bgp:af-configuration> </hw-bgp:bgp-router> <hw-bgp:bgp-neighbors> <hw-bgp:bgp-neighbor> <hw-bgp:peer-address>10.1.1.1</hw-bgp:peer-address> <hw-bgp:remote-as>100</hw-bgp:remote-as> <hw-bgp:identifier-interface>Vlanif100</hw-bgp:identifier-interface> <hw-bgp:af-specific-config> <hw-bgp:ipv4> <hw-bgp:unicast> <hw-bgp:active>true</hw-bgp:active> <hw-bgp:route-reflector-client>true</hw-bgp:route-reflector-client> </hw-bgp:unicast> </hw-bgp:ipv4> </hw-bgp:af-specific-config> </hw-bgp:bgp-neighbor> </hw-bgp:bgp-neighbors> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> The type of the peer is not IBGP.</error-message> <error-info>Error on node /ietf-routing:routing/routing-instance[name="bgp"]/routing-protocols/routing-protocol[type="huawei-bgp:bgp-routing-protocol",name="bgp"]/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor[peer-address="10.1.1.1"]/af-specific-config/ipv4/unicast/route-reflector-client</error-info> </rpc-error> </rpc-reply>
Configuring a BGP-VPN Instance IPv4 Address Family
This section describes the configuration model of BGP-VPN instance IPv4 address family and provides examples of XML packets.
Data Model
The configuration model file matching BGP-VPN instance IPv4 address family is huawei-bgp-l3vpn.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/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 |
Associates a specified VPN instance with an IPv4 address family. |
The value is a string of 1 to 31 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
When configuring this object, ensure that the VPN instance has been configured, the IPv4 address family has been enabled, and a route distinguisher (RD) has been configured. |
/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 |
Specifies the IP address of a peer. |
The value is in dotted decimal notation. |
Both this object and the remote-as object must be configured to create a 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 |
Specifies the AS number of a peer. |
The value is an integer that ranges from 1 to 4294967295. |
Both this object and the peer-addr object must be configured to create a 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/identifier-interface |
Specifies the source interface that sends BGP packets. |
Only VBDIF interfaces and VLANIF interfaces are supported. |
Before configuring this object, ensure that this interface has been bound to the VPN instance specified by the vpn-instance-name object. |
/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-reflector-client |
Configures the local device as a route reflector and the specified peer or peer group as the client of the route reflector. |
The value is of the Boolean type:
|
NA |
/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/next-hop-local |
Configures the function that enables a device to set its IP address as the next-hop addresses of routes when advertising these routes to an IBGP peer or peer group. |
The value is of the Boolean type:
|
NA |
/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/direct |
Imports direct routes in the BGP-VPN instance IPv4 address family view. |
The value is of the Boolean type:
|
NA |
/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/static |
Imports static routes in the BGP-VPN instance IPv4 address family view. |
The value is of the Boolean type:
|
NA |
/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/isis/isis-id |
Imports IS-IS routes of the specified IS-IS process in the BGP-VPN instance IPv4 address family view. |
The value is an integer that ranges from 1 to 65535. |
NA |
/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/ospf/ospf-id |
Imports OSPF routes of the specified OSPF process in the BGP-VPN instance IPv4 address family view. |
The value is an integer that ranges from 1 to 65535. |
NA |
/huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/route-distinguisher |
Configures an RD for a VPN instance address family. |
- |
NA |
/huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/vpnTargets/vpnTarget/vrfRTValue |
Sets the vpn-target value for the import or export VPN target extended community attribute for the VPN instance address family. |
- |
NA |
/huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/vpnTargets/vpnTarget/vrfRTType |
Specifies the direction in which the vpn-target is added to the VPN instance address family. |
The value is of the enumerated type:
|
NA |
/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/default-route-imported |
Configures the function that imports the default routes in the local IP routing table to the BGP routing table. |
The value is of the Boolean type:
|
NA |
/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/aggregate-prefix/aggregate-ip-prefix |
Indicates the IP address and mask length of the summary route. |
The format is ipv4-address/mask-length:
|
N/A |
/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/aggregate-prefix/detail-suppressed-flag |
Indicates whether to advertise only the summary route. |
The value is of the Boolean type:
|
N/A |
/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/networks/ip-prefix |
Adds the route with the specified IP address and mask length statically to the BGP routing table and advertises the route to the peer. |
The format is ipv4-address/mask-length:
|
N/A |
/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/keepalive-time |
Indicates the keepalive time of a BGP peer. |
The value is an integer that ranges from 0 to 21845, in seconds. The default value of a Keepalive timer is 60s |
N/A |
/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/hold-time |
Indicates the hold time of a BGP peer. |
The value is an integer that can be 0 or ranges from 3 to 65535, in seconds. The default value of a Hold timer is 180s. |
N/A |
/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 that MD5 authentication is used during the establishment of a TCP connection and indicates a ciphertext password. |
The value is a string of case-sensitive characters without spaces. When the value is displayed in plaintext, its length ranges from 1 to 255. When the value is displayed in ciphertext, its length ranges from 20 to 392. |
|
/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/simple-password |
Indicates that MD5 authentication is used during the establishment of a TCP connection and indicates a simple password. |
The value is a string of 1 to 255 case-sensitive characters without 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/bgp-neighbor-keychain |
Indicates that Keychain authentication is used during the establishment of a TCP connection. |
The value is a string of 1 to 47 case-insensitive characters. Except the question mark (?) and space. However, when double quotation marks (") are used around the string, spaces are allowed in the string. |
This object cannot be configured together with the /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 object and the /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/simple-password object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/hw-bgp:bgp-routing/bgp-router/hw-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/load-balancing/max-number |
Configures the maximum number of equal-cost routes for load balancing. |
The value is an integer that ranges from 1 to 64. |
N/A |
/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/bfd-config/enable |
Enables BFD for a peer or a peer group. |
The value is of the Boolean type:
The default value is false. |
Before configuring this object, configure the /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 object first. |
/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/bfd-config/min-tx-interval |
Specifies the interval at which BFD packets are sent. |
The value is an integer in the range from 3 to 1000, in milliseconds. The default value is 1000. |
Before configuring this object, configure the /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 object first. |
/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/bfd-config/min-rx-interval |
Specifies the interval at which BFD packets are received. |
The value is an integer in the range from 3 to 1000, in milliseconds. The default value is 1000. |
Before configuring this object, configure the /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 object first. |
/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/bfd-config/detect-multiplier |
Specifies the local detection time multiplier. |
The value is an integer in the range from 3 to 50. The default value is 3. |
Before configuring this object, configure the /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 object first. |
Configuring a BGP-VPN Instance IPv4 Address Family
This section provides a sample of configuring a BGP-VPN instance IPv4 address family using the edit-config:merge method.
Operation |
XPATH |
---|---|
edit-config:merge |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
VPN instance name of a BGP-VPN instance IPv4 address family |
vrf1 |
Specify the VPN instance name of a BGP-VPN instance IPv4 address family. |
Peer IP address |
10.1.1.1 |
Specify a peer IP address. |
Peer AS number |
100 |
Configure an AS number for a peer. |
Source interface |
Vbdif1 |
Specify the source interface that sends BGP packets. |
Route reflector |
true |
Enable the local end as a route reflector. |
Next-hop address |
true |
Enable a device to set its IP address as the next-hop IP address. |
Direct route import |
true |
Import direct routes. |
Static route import |
true |
Import static routes. |
IS-IS route import |
1 |
Import IS-IS routes of IS-IS process 1 into BGP. |
OSPF route import |
1 |
Import OSPF routes of OSPF process 1 into BGP. |
RD of a VPN instance |
100:1 |
Specify an RD for the VPN instance. |
VPN-target value |
200:2 |
Set the VPN-target value. |
VPN-target direction |
both |
Configure the VPN-target direction. |
Request Example
Create a VPN instance and configure an RD.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="24" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>vrf1</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv4-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>100:1</hw-bgp-vpn:route-distinguisher> </hw-bgp-vpn:ipv4-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> </config> </edit-config> </rpc>
Set the VPN-target value for a VPN instance.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="25" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>vrf1</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv4-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>100:1</hw-bgp-vpn:route-distinguisher> <hw-bgp-vpn:vpnTargets> <hw-bgp-vpn:vpnTarget> <hw-bgp-vpn:vrfRTValue>200:2</hw-bgp-vpn:vrfRTValue> <hw-bgp-vpn:vrfRTType>both</hw-bgp-vpn:vrfRTType> </hw-bgp-vpn:vpnTarget> </hw-bgp-vpn:vpnTargets> </hw-bgp-vpn:ipv4-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> </config> </edit-config> </rpc>
Configure the VBDIF1 interface.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="13" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <bd:bridge-domain xc:operation="merge"> <bd:id>1</bd:id> </bd:bridge-domain> </bd:bridge-domains> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <if:name>Vbdif1</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Bind an interface to the VPN instance.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="26" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-l3vpn:vpn-interfaces xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-interface> <hw-l3vpn:name>Vbdif1</hw-l3vpn:name> <hw-l3vpn:vpn-instance-name>vrf1</hw-l3vpn:vpn-instance-name> </hw-l3vpn:vpn-interface> </hw-l3vpn:vpn-interfaces> </config> </edit-config> </rpc>
Create a BGP-VPN instance IPv4 address family view.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance> <rt:name>test1</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</rt:type> <rt:name>test2</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv4-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv4-vpn-instance> <hw-bgp-vpn:vpn-instance-name>vrf1</hw-bgp-vpn:vpn-instance-name> </hw-bgp-vpn:bgp-af-ipv4-vpn-instance> </hw-bgp-vpn:bgp-af-ipv4-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Configure a peer, including specifying the source interface, enabling a route reflector, and specify a next-hop address.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="28" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance> <rt:name>test1</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</rt:type> <rt:name>test2</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv4-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv4-vpn-instance> <hw-bgp-vpn:vpn-instance-name>vrf1</hw-bgp-vpn:vpn-instance-name> <hw-bgp-vpn:bgp-peers> <hw-bgp-vpn:bgpPeer> <hw-bgp-vpn:peer-addr>10.1.1.1</hw-bgp-vpn:peer-addr> <hw-bgp-vpn:remote-as>100</hw-bgp-vpn:remote-as> <hw-bgp-vpn:identifier-interface>Vbdif1</hw-bgp-vpn:identifier-interface> <hw-bgp-vpn:route-reflector-client>true</hw-bgp-vpn:route-reflector-client> <hw-bgp-vpn:next-hop-local>true</hw-bgp-vpn:next-hop-local> </hw-bgp-vpn:bgpPeer> </hw-bgp-vpn:bgp-peers> </hw-bgp-vpn:bgp-af-ipv4-vpn-instance> </hw-bgp-vpn:bgp-af-ipv4-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Import routes, including direct route, static routes, IS-IS routes, and OSPF routes.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="29" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance> <rt:name>test1</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</rt:type> <rt:name>test2</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv4-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv4-vpn-instance> <hw-bgp-vpn:vpn-instance-name>vrf1</hw-bgp-vpn:vpn-instance-name> <hw-bgp-vpn:protocol> <hw-bgp-vpn:direct>true</hw-bgp-vpn:direct> <hw-bgp-vpn:isis> <hw-bgp-vpn:isis-id>1</hw-bgp-vpn:isis-id> </hw-bgp-vpn:isis> <hw-bgp-vpn:ospf> <hw-bgp-vpn:ospf-id>1</hw-bgp-vpn:ospf-id> </hw-bgp-vpn:ospf> <hw-bgp-vpn:static>true</hw-bgp-vpn:static> </hw-bgp-vpn:protocol> </hw-bgp-vpn:bgp-af-ipv4-vpn-instance> </hw-bgp-vpn:bgp-af-ipv4-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Enable default route import.
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance> <rt:name>test1</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:huawei-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">huawei-bgp:bgp-routing-protocol</rt:type> <rt:name>test2</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv4-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv4-vpn-instance> <hw-bgp-vpn:vpn-instance-name>vrf1</hw-bgp-vpn:vpn-instance-name> <hw-bgp-vpn:default-route-imported>true</hw-bgp-vpn:default-route-imported> </hw-bgp-vpn:bgp-af-ipv4-vpn-instance> </hw-bgp-vpn:bgp-af-ipv4-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>The type of the peer is not IBGP.</error-message> <error-info>Error on node /ietf-routing:routing/routing-instance[name="test1"]/routing-protocols/routing-protocol[type="huawei-bgp:bgp-routing-protocol",name="test2"]/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance[vpn-instance-name="vrf1"]/bgp-peers/bgpPeer[peer-addr="10.1.1.1"]/route-reflector-client</error-info> </rpc-error> </rpc-reply>
Configuring a BGP-VPN Instance IPv6 Address Family
This section describes the configuration model of a BGP-VPN instance IPv6 address family and provides examples of XML packets.
Data Model
The configuration model file matching a BGP-VPN instance IPv6 address family is huawei-bgp-l3vpn.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv6-family/route-distinguisher |
Configures an RD for a VPN instance address family. |
- |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/vpn-instance-name |
Associates a specified VPN instance with an IPv6 address family. |
The value is a string of 1 to 31 case-sensitive characters. If spaces are used, the string must be enclosed in double quotation marks (" "). |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/default-route-imported |
Indicates whether to import the default routes in the local IP routing table into the BGP routing table. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/protocol/direct |
Indicates whether direct routes are imported by BGP. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/protocol/isis/isis-id |
Specifies the ID of the process in which IS-IS routes are imported by BGP. |
The value is an integer in the range from 1 to 65535. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/protocol/ospf/ospf-id |
Specifies the ID of the process in which OSPFv3 routes are imported by BGP. |
The value is an integer in the range from 1 to 65535. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/protocol/static |
Indicates whether static routes are imported by BGP. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance/load-balancing/max-number |
Specifies the maximum number of equal-cost routes for load balancing. |
The value is an integer that ranges from 1 to 64. |
N/A |
Configuring a BGP-VPN Instance IPv6 Address Family
This section provides a sample of configuring a BGP-VPN instance IPv6 address family using the edit-config:merge method.
Operation |
XPATH |
---|---|
edit-config:merge |
|
Data Requirement 1: Creating a BGP-VPN Instance IPv6 Address Family and Configuring Route Import
Item |
Data |
Description |
---|---|---|
Configuring an RD for a VPN instance address family |
2:1 |
- |
Associating a specified VPN instance with an IPv6 address family |
v1 |
- |
Whether to import the default routes in the local IP routing table into the BGP routing table |
true |
- |
Whether to configure BGP to import direct routes |
true |
- |
Whether to configure the process ID of IS-IS routes to be imported by BGP |
1 |
- |
Whether to configure the process ID of OSPFv3 routes to be imported by BGP |
1 |
- |
Whether to configure BGP to import static routes |
true |
- |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <edit-config> <target> <running/> </target> <config> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>v1</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv6-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>2:1</hw-bgp-vpn:route-distinguisher> </hw-bgp-vpn:ipv6-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <rt:routing-instance> <rt:name>bgp</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</rt:type> <rt:name>bgp</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>6</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv6-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv6-vpn-instance> <hw-bgp-vpn:vpn-instance-name>v1</hw-bgp-vpn:vpn-instance-name> <hw-bgp-vpn:default-route-imported>true</hw-bgp-vpn:default-route-imported> <hw-bgp-vpn:protocol> <hw-bgp-vpn:direct>true</hw-bgp-vpn:direct> <hw-bgp-vpn:isis> <hw-bgp-vpn:isis-id>1</hw-bgp-vpn:isis-id> </hw-bgp-vpn:isis> <hw-bgp-vpn:ospf> <hw-bgp-vpn:ospf-id>1</hw-bgp-vpn:ospf-id> </hw-bgp-vpn:ospf> <hw-bgp-vpn:static>true</hw-bgp-vpn:static> </hw-bgp-vpn:protocol> </hw-bgp-vpn:bgp-af-ipv6-vpn-instance> </hw-bgp-vpn:bgp-af-ipv6-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Response Example
# Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
# Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>The specified IPv6-family for VPN instance is not configured with RD.</error-message> <error-info>Error on node /ietf-routing:routing/routing-instance[name="bgp"]/routing-protocols/routing-protocol[type="huawei-bgp:bgp-routing-protocol",name="bgp"]/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance[vpn-instance-name="v1"]</error-info> </rpc-error> </rpc-reply>
Data Requirement 2: Deleting a BGP-VPN Instance IPv6 Address Family and Canceling Route Import
Delete the configuration performed in Data Requirement 1.
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <edit-config> <target> <running/> </target> <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" > <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance xc:operation="delete"> <hw-l3vpn:vpn-instance-name>v1</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv6-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>2:1</hw-bgp-vpn:route-distinguisher> </hw-bgp-vpn:ipv6-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <rt:routing-instance xc:operation="delete"> <rt:name>bgp</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">hw-bgp:bgp-routing-protocol</rt:type> <rt:name>bgp</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>6</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv6-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv6-vpn-instance> <hw-bgp-vpn:vpn-instance-name>v1</hw-bgp-vpn:vpn-instance-name> <hw-bgp-vpn:default-route-imported>false</hw-bgp-vpn:default-route-imported> <hw-bgp-vpn:protocol> <hw-bgp-vpn:direct>false</hw-bgp-vpn:direct> <hw-bgp-vpn:isis> <hw-bgp-vpn:isis-id>1</hw-bgp-vpn:isis-id> </hw-bgp-vpn:isis> <hw-bgp-vpn:ospf> <hw-bgp-vpn:ospf-id>1</hw-bgp-vpn:ospf-id> </hw-bgp-vpn:ospf> <hw-bgp-vpn:static>false</hw-bgp-vpn:static> </hw-bgp-vpn:protocol> </hw-bgp-vpn:bgp-af-ipv6-vpn-instance> </hw-bgp-vpn:bgp-af-ipv6-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Response Example
# Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <ok/> </rpc-reply>
# Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>The specified IPv6-family for VPN instance is not configured with RD.</error-message> <error-info>Error on node /ietf-routing:routing/routing-instance[name="bgp"]/routing-protocols/routing-protocol[type="huawei-bgp:bgp-routing-protocol",name="bgp"]/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv6-vpn-instances/bgp-af-ipv6-vpn-instance[vpn-instance-name="v1"]</error-info> </rpc-error> </rpc-reply>