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 |
|
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>
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>