This section provides a sample of binding an interface to a VSI using the edit-config:merge method.
Operation |
XPATH |
|---|---|
edit-config:merge |
|
Item |
Data |
Description |
|---|---|---|
Interface name |
Vlanif3 |
Set the interface name. |
Whether MPLS L2VPN is enabled |
true |
Enable MPLS L2VPN. |
Name of a VSI |
lcz |
Set the name of the VSI. |
Member discovery mode used by a VSI |
static |
Set the member discovery mode used by a VSI to static. |
Whether a VSI uses the LDP signaling mode |
pwLdpSignal |
Configure the VSI to use the LDP signaling mode. |
Number of a VSI |
2 |
Set the number of the 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">
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface nc:operation="merge">
<if:name>Vlanif3</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>
<l2vpn:l2vpn xmlns:l2vpn="http://www.huawei.com/netconf/vrp/huawei-l2vpn">
<l2vpn:l2vpncommon>
<l2vpn:l2vpnGlobal>
<l2vpn:l2vpnEnable>true</l2vpn:l2vpnEnable>
</l2vpn:l2vpnGlobal>
</l2vpn:l2vpncommon>
<l2vpn:l2vpnvpls>
<l2vpn:vplsInstances>
<l2vpn:vplsInstance>
<l2vpn:instanceName>lcz</l2vpn:instanceName>
<l2vpn:memberDiscoveryMode>static</l2vpn:memberDiscoveryMode>
<l2vpn:vplsLdpInsts>
<l2vpn:vplsLdpInst>
<l2vpn:vplsPwLdpSignal>pwLdpSignal</l2vpn:vplsPwLdpSignal>
<l2vpn:vsiId>2</l2vpn:vsiId>
<l2vpn:vplsLdpPws>
<l2vpn:vplsLdpPw>
<l2vpn:peerIp>1.1.1.1</l2vpn:peerIp>
</l2vpn:vplsLdpPw>
</l2vpn:vplsLdpPws>
</l2vpn:vplsLdpInst>
</l2vpn:vplsLdpInsts>
<l2vpn:vplsAcs>
<l2vpn:vplsAc>
<l2vpn:interfaceName>Vlanif3</l2vpn:interfaceName>
</l2vpn:vplsAc>
</l2vpn:vplsAcs>
</l2vpn:vplsInstance>
</l2vpn:vplsInstances>
</l2vpn:l2vpnvpls>
</l2vpn:l2vpn>
</config>
</edit-config>
##### Ok Reply or Operation Successful ##### <?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>
<?xml version="1.0" encoding="utf-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11">
<rpc-error>
<error-app-tag>-1</error-app-tag>
<error-message> There is no VLAN ID configured on this interface. Please configure VLAN ID first.</error-message>
<error-info>Error on node /huawei-l2vpn:l2vpn/l2vpnvpls/vplsInstances/vplsInstance[instanceName="lcz"]/vplsAcs/vplsAc[interfaceName="XGigabitEthernet0/0/3.3"]/interfaceName</error-info>
</rpc-error>
</rpc-reply>