Configuring PnP VLAN
This module describes how to configure PnP VLAN auto-negotiation and query PnP VLAN information.
Data Model
The data model files matching PnP VLAN auto-negotiation are huawei-pnp-management.yang and huawei-lldp.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-pnp-management:pnp-config/startup-vlan/send-enable |
Indicates whether the function of transmitting the PnP VLAN to a downstream device is enabled. |
The value is of the Boolean type:
The default value is false. |
N/A |
/huawei-pnp-management:pnp-config/startup-vlan/receive-enable |
Indicates whether a downstream device is enabled to receive the PnP VLAN negotiation packets sent by an upstream device. |
The value is of the Boolean type:
The default value is true. |
N/A |
/huawei-pnp-management:pnp-config/startup-vlan/send-vlan-id |
Configures a PnP VLAN ID. |
The value is an integer that ranges from 1 to 4094. By default, no PnP VLAN ID is configured. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-pnp-management:pnp/startup-link-aggregation/send-enable |
Indicates whether the function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device is enabled. |
The value is of the Boolean type:
The default value is false. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-lldp:lldp/tlv/legacy/tlvs/enable |
Indicates whether the function of sending LLDP packets containing PnP VLAN information to a downstream device is enabled. |
The value is of the Boolean type:
The default value is true. |
N/A |
/huawei-pnp-management:pnp-state/startup-vlan/receive-vlan-id |
Indicates the PnP VLAN negotiated with an upstream device. |
The value is an integer that ranges from 1 to 4094. |
This object is used to query information during a Get operation. |
/huawei-pnp-management:pnp-state/uplinks/uplink/name |
Indicates the interface connected to an upstream device. |
The value is a character string, indicating an interface name. |
This object is used to query information during a Get operation. |
/huawei-pnp-management:pnp-state/uplinks/uplink/lag-negotiation |
Indicates whether an upstream device needs to auto-negotiate an Eth-Trunk. |
The value is of the Boolean type:
|
This object is used to query information during a Get operation. |
/huawei-pnp-management:pnp-state/uplinks/uplink/lacp-negotiation |
Indicates whether an upstream device needs to auto-negotiate the LACP mode of an Eth-Trunk. |
The value is of the Boolean type:
|
This object is used to query information during a Get operation. |
/huawei-pnp-management:pnp-state/uplinks/uplink/assign-interface |
Indicates the local device's physical member port added to an uplink Eth-Trunk interface. |
The value is a character string, indicating an interface name. |
This object is used to query information during a Get operation. |
/huawei-pnp-management: pnp-info-change/startup-vlan/receive-vlan-id |
Indicates the PnP VLAN negotiated with an upstream device. |
The value is an integer that ranges from 1 to 4094. |
N/A |
/huawei-pnp-management: pnp-info-change/uplinks/uplink/name |
Indicates the interface connected to an upstream device. |
The value is a character string, indicating an interface name. |
N/A |
/huawei-pnp-management: pnp-info-change/uplinks/uplink/lag-negotiation |
Indicates whether an upstream device needs to auto-negotiate an Eth-Trunk. |
The value is of the Boolean type:
|
N/A |
/huawei-pnp-management: pnp-info-change/uplinks/uplink/lacp-negotiation |
Indicates whether an upstream device needs to auto-negotiate the LACP mode of an Eth-Trunk. |
The value is of the Boolean type:
|
N/A |
/huawei-pnp-management: pnp-info-change/uplinks/uplink/assign-interface |
Indicates the local device's physical member port added to an uplink Eth-Trunk interface. |
The value is a character string, indicating an interface name. |
N/A |
Configuring PnP VLAN Auto-Negotiation
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>GigabitEthernet1/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>GigabitEthernet1/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>
Querying PnP VLAN Auto-Negotiation Information
This section provides a sample of querying PnP VLAN auto-negotiation information using the get method.
Operation |
XPATH |
---|---|
get |
/huawei-pnp-management:pnp-state |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <get> <filter type="subtree"> <pnpm:pnp-state xmlns:pnpm="urn:huawei:yang:huawei-pnp-management"/> </filter> </get> </rpc>
Response Example
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <data> <pnp-state xmlns="urn:huawei:yang:huawei-pnp-management"> <startup-vlan> <receive-vlan-id>100</receive-vlan-id> </startup-vlan> <uplinks> <uplink> <name>Eth-Trunk0</name> <lag-negotiation>true</lag-negotiation> <lacp-negotiation>true</lacp-negotiation> <assign-interface>GigabitEthernet1/0/10</assign-interface> <assign-interface>GigabitEthernet1/0/12</assign-interface> </uplink> </uplinks> </pnp-state> </data> </rpc-reply>