This section provides a sample of configuring Martini VPLS using the edit-config method.
Operation |
XPATH |
---|---|
Config |
|
Item |
Data |
Description |
---|---|---|
Whether MPLS L2VPN is enabled |
true |
MPLS L2VPN is enabled. |
VPN instance name |
jkstatic |
Set the VPN instance name. |
Description of a VSI |
huawei |
Set the description of a VSI. |
Member discovery mode |
static |
Set the member discovery mode used by the VSI to static. |
Tunnel policy name |
jk |
Set the tunnel policy name. |
Signaling mode for a VSI |
pwLdpSignal |
Configure the VSI to use the LDP signaling mode. |
ID of a VSI |
2 |
Set the ID of a VSI. |
Peer IPv4 address |
1.1.1.1 |
Set the peer IPv4 address. |
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <l2vpn xmlns="http://www.huawei.com/netconf/vrp/huawei-l2vpn" nc:operation="merge"> <l2vpncommon> <l2vpnGlobal> <l2vpnEnable>true</l2vpnEnable> </l2vpnGlobal> </l2vpncommon> <l2vpnvpls nc:operation="merge"> <vplsInstances> <vplsInstance> <instanceName>jkstatic</instanceName> <description>huawei</description> <memberDiscoveryMode>static</memberDiscoveryMode> <tnlPolicyName nc:operation="merge">jk</tnlPolicyName> <vplsLdpInsts> <vplsLdpInst> <vplsPwLdpSignal>pwLdpSignal</vplsPwLdpSignal> <vsiId>2</vsiId> <vplsLdpPws> <vplsLdpPw> <peerIp>1.1.1.1</peerIp> <tnlPolicyName>jk</tnlPolicyName> </vplsLdpPw> </vplsLdpPws> </vplsLdpInst> </vplsLdpInsts> </vplsInstances> </l2vpnvpls> </l2vpn> <tnlm:tnlm xmlns:tnlm="http://www.huawei.com/netconf/vrp/huawei-tnlm"> <tnlm:tunnelPolicys> <tnlm:tunnelPolicy> <tnlm:tnlPolicyName>jk</tnlm:tnlPolicyName> </tnlm:tunnelPolicy> </tnlm:tunnelPolicys> </tnlm:tnlm> </config> </edit-config> </rpc>
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <l2vpn xmlns="http://www.huawei.com/netconf/vrp/huawei-l2vpn" nc:operation="remove"> <l2vpncommon> <l2vpnGlobal> <l2vpnEnable>true</l2vpnEnable> </l2vpnGlobal> </l2vpncommon> <l2vpnvpls nc:operation="remove"> <vplsInstances> <vplsInstance> <instanceName>jkstatic</instanceName> <description>huawei</description> <memberDiscoveryMode>static</memberDiscoveryMode> <tnlPolicyName>jk</tnlPolicyName> <vplsLdpInsts> <vplsLdpInst> <vplsPwLdpSignal>pwLdpSignal</vplsPwLdpSignal> <vsiId>2</vsiId> <vplsLdpPws> <vplsLdpPw> <peerIp>1.1.1.1</peerIp> <tnlPolicyName>jk</tnlPolicyName> </vplsLdpPw> </vplsLdpPws> </vplsLdpInst> </vplsLdpInsts> </vplsInstance> </vplsInstances> </l2vpnvpls> </l2vpn> <tnlm:tnlm xmlns:tnlm="http://www.huawei.com/netconf/vrp/huawei-tnlm"> <tnlm:tunnelPolicys> <tnlm:tunnelPolicy nc:operation="remove"> <tnlm:tnlPolicyName>jk</tnlm:tnlPolicyName> </tnlm:tunnelPolicy> </tnlm:tunnelPolicys> </tnlm:tnlm> </config> </edit-config> </rpc>
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="46"> <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="27"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Need to delete all vsi configure first.</error-message> <error-info>Error on node /huawei-l2vpn:l2vpn/l2vpncommon/l2vpnGlobal/l2vpnEnable</error-info> </rpc-error> </rpc-reply>