This section describes how to configure PnP VLAN auto-negotiation using the config method.
Operation |
XPATH |
|---|---|
edit-config:config |
/huawei-pnp-management:pnp-config /ietf-interfaces:interfaces/interface/huawei-pnp-management:pnp /ietf-interfaces:interfaces/interface/huawei-lldp:lldp/tlv/legacy |
Data Requirements 1
Item |
Data |
Description |
|---|---|---|
Enabling the function of transmitting the PnP VLAN to a downstream device |
true |
- |
Enabling a downstream device to receive the PnP VLAN negotiation packets sent by an upstream device |
true |
- |
Configuring a PnP VLAN ID |
3 |
A VLAN needs to be created first. |
Enabling the function of sending LLDP packets containing PnP VLAN information to a downstream device |
true |
- |
Enabling the function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device |
true |
- |
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<huawei-vlan:vlan>
<huawei-vlan:id>3</huawei-vlan:id>
</huawei-vlan:vlan>
</huawei-vlan:vlans>
<huawei-pnp-management:pnp-config xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<huawei-pnp-management:startup-vlan>
<huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
<huawei-pnp-management:receive-enable>true</huawei-pnp-management:receive-enable>
<huawei-pnp-management:send-vlan-id>3</huawei-pnp-management:send-vlan-id>
</huawei-pnp-management:startup-vlan>
</huawei-pnp-management:pnp-config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<if:interface>
<if:name>GigabitEthernet0/0/1</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<huawei-lldp:lldp xmlns:huawei-lldp="urn:huawei:params:xml:ns:yang:huawei-lldp">
<huawei-lldp:tlv>
<huawei-lldp:legacy>
<huawei-lldp:tlvs>
<huawei-lldp:type>huawei-lldp:tlv-legacy-pnp</huawei-lldp:type>
<huawei-lldp:enable>true</huawei-lldp:enable>
</huawei-lldp:tlvs>
</huawei-lldp:legacy>
</huawei-lldp:tlv>
</huawei-lldp:lldp>
</if:interface>
<if:interface>
<if:name>Eth-Trunk1</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<huawei-pnp-management:pnp xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management">
<huawei-pnp-management:startup-link-aggregation>
<huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
</huawei-pnp-management:startup-link-aggregation>
</huawei-pnp-management:pnp>
</if:interface>
</if:interfaces>
</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 VLAN is not created.</error-message>
<error-info>Error on node /huawei-pnp-management:pnp-config/startup-vlan/send-vlan-id</error-info>
</rpc-error>
</rpc-reply>
Data Requirements 2
Item |
Data |
Description |
|---|---|---|
PnP VLAN ID |
4 |
Change the PnP VLAN ID from 3 to 4. |
Replacement Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">
<huawei-vlan:vlan>
<huawei-vlan:id>4</huawei-vlan:id>
</huawei-vlan:vlan>
</huawei-vlan:vlans>
<huawei-pnp-management:pnp-config xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">
<huawei-pnp-management:startup-vlan>
<huawei-pnp-management:send-vlan-id>4</huawei-pnp-management:send-vlan-id>
</huawei-pnp-management:startup-vlan>
</huawei-pnp-management:pnp-config>
</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-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>parse rpc config error.</error-message>
</rpc-error>
</rpc-reply>
Data Requirements 3
Item |
Data |
Description |
|---|---|---|
Enabling the function of transmitting the PnP VLAN to a downstream device |
true |
- |
Enabling a downstream device to receive the PnP VLAN negotiation packets sent by an upstream device |
true |
|
Configuring a PnP VLAN ID |
4 |
|
Enabling the function of sending LLDP packets containing PnP VLAN information to a downstream device |
true |
|
Enabling the function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device |
true |
Deletion Example
<?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>
<huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
<huawei-vlan:vlan xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<huawei-vlan:id>4</huawei-vlan:id>
</huawei-vlan:vlan>
</huawei-vlan:vlans>
<huawei-pnp-management:pnp-config xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<huawei-pnp-management:startup-vlan>
<huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
<huawei-pnp-management:receive-enable>true</huawei-pnp-management:receive-enable>
<huawei-pnp-management:send-vlan-id>4</huawei-pnp-management:send-vlan-id>
</huawei-pnp-management:startup-vlan>
</huawei-pnp-management:pnp-config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<if:interface>
<if:name>GigabitEthernet0/0/5</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<huawei-lldp:lldp xmlns:huawei-lldp="urn:huawei:params:xml:ns:yang:huawei-lldp">
<huawei-lldp:tlv>
<huawei-lldp:legacy>
<huawei-lldp:tlvs>
<huawei-lldp:type>huawei-lldp:tlv-legacy-pnp</huawei-lldp:type>
<huawei-lldp:enable>true</huawei-lldp:enable>
</huawei-lldp:tlvs>
</huawei-lldp:legacy>
</huawei-lldp:tlv>
</huawei-lldp:lldp>
</if:interface>
<if:interface>
<if:name>Eth-Trunk3</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<huawei-pnp-management:pnp xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management">
<huawei-pnp-management:startup-link-aggregation>
<huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
</huawei-pnp-management:startup-link-aggregation>
</huawei-pnp-management:pnp>
</if:interface>
</if:interfaces>
</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="3"> <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="3">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>parse rpc config error.</error-message>
</rpc-error>
</rpc-reply>