No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
LLDP

LLDP

NOTE:

This feature is supported in V300R003C10 and later versions.

Data Model

The configuration model file matching LLDP is huawei-lldp.yang.

Table 3-2279 LLDP data model

Object

Description

LLDP

Indicates that the operation request object is a LLDP-related configuration. It is only used to contain sub-objects, but does not have any data meaning.

huawei-lldp:lldp/enabled

Indicates whether the LLDP function is enabled. The value can be true or false. The value true indicates that the LLDP function is enabled globally, and the value false indicates that the LLDP function is disabled globally. By default, the LLDP function is disabled.

lldp-neighbor-change-event/lldp-neighbor/remote-index

Indicates the index of a neighboring device.

lldp-neighbor-change-event/lldp-neighbor/event-type

Indicates the type of a neighboring device change. The options are as follows:

  • add: An LLDP neighbor is added.
  • del: An LLDP neighbor is deleted.
  • update: The neighbor information is updated.

lldp-neighbor-change-event/lldp-neighbor/local-port

Indicates the type of the local device interface.

lldp-neighbor-change-event/lldp-neighbor/peer-device/chassis-id-sub-type

Indicates the ID sub-type of a neighboring device.

  • ChassisComponent: chassis alias
  • interfaceAlias: interface alias
  • portComponent: interface or backplane alias
  • macAddress: MAC address
  • networkAddress: network address
  • interfaceName: name of the interface
  • local: name of the local device

lldp-neighbor-change-event/lldp-neighbor/peer-device/chassis-id

Indicates the ID of a neighboring device.

lldp-neighbor-change-event/lldp-neighbor/peer-device/port-id-sub-type

Indicates the ID sub-type of a neighboring interface.

  • interfaceAlias: interface alias
  • portComponent: interface or backplane alias
  • macAddress: MAC address
  • networkAddress: network address
  • interfaceName: name of the interface
  • agentCircuitId: loopback interface ID of the DHCP relay
  • local: name of the local device

lldp-neighbor-change-event/lldp-neighbor/peer-device/port-id

Indicates the ID of a neighboring interface.

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-name

Indicates the system name.

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-description

Indicates the description of a neighboring device.

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-cap-supported

Indicates capabilities supported by a neighboring device. (At least one capability must be supported)

  • other: other capabilities
  • repeater: repeater
  • bridge: bridge device
  • wlanAccessPoint: wireless access point
  • router: router
  • telephone: wireless device
  • docsisCableDevice: management station
  • stationOnly: base station

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-cap-enabled

Indicates capabilities enabled on a neighboring device. (This field is a subset of the supported system capabilities, and at least one capability must be enabled.)

  • other: other capabilities
  • repeater: repeater
  • bridge: bridge device
  • wlanAccessPoint: wireless access point
  • router: router
  • telephone: wireless device
  • docsisCableDevice: management station
  • stationOnly: base station

ietf-interfaces:interfaces-state/interface/lldp/remote-port/index

Indicates the index of a neighboring device interface.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/chassic-id-sub-type

Indicates the ID sub-type of a neighboring device.

  • 1: chassis alias
  • 2: interface alias
  • 3: interface or backplane alias
  • 4: MAC address
  • 5: network address
  • 6: name of the interface
  • 7: name of the local device

ietf-interfaces:interfaces-state/interface/lldp/remote-port/chassis-id

Indicates the ID of a neighboring device.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/port-id-sub-type

Indicates the ID sub-type of a neighboring device interface.

  • 1: interface alias
  • 2: interface or backplane alias
  • 3: MAC address
  • 4: network address
  • 5: name of the interface
  • 6: loopback interface ID of the DHCP relay
  • 7: name of the local device

ietf-interfaces:interfaces-state/interface/lldp/remote-port/port-id

Indicates the ID of a neighboring device interface.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/port-description

Indicates the description of a neighboring device interface.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-name

Indicates the name of a neighboring device.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-description

Indicates the description of a neighboring device.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-cap-supported

Indicates capabilities supported by a neighboring device.

  • repeater: repeater
  • bridge: bridge device
  • wlanAccessPoint: wireless access point
  • router: router
  • telephone: wireless device
  • docsisCableDevice: management station
  • stationOnly: base station
  • other: other capabilities

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-cap-enabled

Indicates capabilities enabled on a neighboring device.

  • repeater: repeater
  • bridge: bridge device
  • wlanAccessPoint: wireless access point
  • router: router
  • telephone: wireless device
  • docsisCableDevice: management station
  • stationOnly: base station
  • other: other capabilities

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/subtype

Indicates the management address type of a neighboring device.

  • 1: IPv4 address
  • 2: IPv6 address
  • 3: NSAP
  • 4: HDLC
  • 5: BBN 1822
  • 6: MAC address
  • 7: E.163
  • 8: E.164
  • 9: F.69
  • 10: X.121
  • 11: IPX
  • 12: AppleTalk
  • 13: DECnet IV
  • 14: Banyan Vines
  • 15: E.164 with NSAP subaddress
  • 16: DNS
  • 17: Distinguished name
  • 18: AS number
  • 19: XTP over IPv4
  • 20: XTP over IPv6

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/address

Indicates the management address of a neighboring device.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/if-subtype

Indicates the interface index type of the neighbor management address.

  • 1: unknown
  • 2: interface index

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/if-id

Indicates the interface index of the neighbor management address.

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/oid

Indicates the management address OID of a neighboring device.

Enabling the LLDP Function Globally

This section provides a sample of enabling the LLDP function globally.

Table 3-2280 Enabling the LLDP function globally

Operation

XPATH

edit-config:merge

huawei-lldp:lldp/enabled

Data Requirements
Table 3-2281 Enabling the LLDP function globally

Item

Data

Description

Whether to enable the LLDP function globally

true

Enable the LLDP function globally.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
    <edit-config> 
        <target> 
            <running/> 
        </target> 
        <error-option>rollback-on-error</error-option> 
        <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
            <lldp xmlns="urn:huawei:params:xml:ns:yang:huawei-lldp" xc:operation="merge"> 
               <enabled>true</enabled>                   
            </lldp>  
        </config> 
    </edit-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884">  
   <ok/>  
 </rpc-reply>

Disabling the LLDP Function Globally

This section provides a sample of disabling the LLDP function globally.

Table 3-2282 Disabling the LLDP function globally

Operation

XPATH

edit-config:merge

huawei-lldp:lldp/enabled

Data Requirements
Table 3-2283 Disabling the LLDP function globally

Item

Data

Description

Whether to disable the LLDP function globally

false

Disable the LLDP function globally.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884"> 
     <edit-config> 
         <target> 
             <running/> 
         </target> 
         <error-option>rollback-on-error</error-option> 
         <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
             <lldp xmlns="urn:huawei:params:xml:ns:yang:huawei-lldp" xc:operation="merge"> 
                <enabled>false</enabled>                   
             </lldp>  
         </config> 
     </edit-config> 
 </rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_44b89c8aa8fd4a918f793b73409d0884">  
   <ok/>  
 </rpc-reply>

Notifying the Change of an LLDP Neighboring Device

This section provides a sample of notifying the change of an LLDP neighboring device. In the following packet objects, if any object of the LLDP peer changes, the local device automatically notifies the change of the neighboring device.

Table 3-2284 Notifying the change of an LLDP neighboring device

XPATH

lldp-neighbor-change-event/lldp-neighbor/remote-index

lldp-neighbor-change-event/lldp-neighbor/event-type

lldp-neighbor-change-event/lldp-neighbor/local-port

lldp-neighbor-change-event/lldp-neighbor/peer-device/chassis-id-sub-type

lldp-neighbor-change-event/lldp-neighbor/peer-device/chassis-id

lldp-neighbor-change-event/lldp-neighbor/peer-device/port-id-sub-type

lldp-neighbor-change-event/lldp-neighbor/peer-device/port-id

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-name

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-description

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-cap-supported

lldp-neighbor-change-event/lldp-neighbor/peer-device/system-cap-enabled

Message Example

If system-name of the LLDP peer changes, the local device automatically notifies the change of the neighboring device.

You can enable the debugging function on the device and run the debugging netconf all command to view detailed notification messages about the change.

Response Example
<lldp-neighbor-change-event xmlns="urn:huawei:params:xml:ns:yang:huawei-lldp">
    <lldp-neighbor>
        <remote-index>1</remote-index>
        <event-type>del</event-type>
        <local-port>GigabitEthernet0/0/1</local-port>
        <peer-device>
            <chassis-id-sub-type>4</chassis-id-sub-type>
            <chassis-id>80fb-06d4-7306</chassis-id>
            <port-id-sub-type>5</port-id-sub-type>
            <port-id>Ethernet0/0/36</port-id>
            <system-name>LAB86-L6-Q3-ACC</system-name>
            <system-description>S2352P-EI  Huawei Versatile Routing Platform Software  VRP (R) software,Version 5.70 (S2300 V100R005C01SPC100)  Copyright (C) 2000-2006 Huawei Technologies Co., Ltd.</system-description>
            <system-cap-supported>cap-bridge</system-cap-supported>
            <system-cap-enabled>cap-bridge</system-cap-enabled>
        </peer-device>
    </lldp-neighbor>
</lldp-neighbor-change-event>
Table 3-2285 Notifying the change of an LLDP neighboring device

Item

Description

Index of the neighboring device

1

Type of the neighboring device change

del

Type of the local device interface

GigabitEthernet0/0/1

ID sub-type of the neighboring device

4

ID of the neighboring device

80fb-06d4-7306

ID sub-type of the neighboring interface

5

ID of the neighboring interface

Ethernet0/0/36

System name

LAB86-L6-Q3-ACC

Description of the neighboring device

S2352P-EI Huawei Versatile Routing Platform Software VRP (R) software,Version 5.70 (S2300 V100R005C01SPC100) Copyright (C) 2000-2006 Huawei Technologies Co., Ltd.

Capability supported by the neighboring device

cap-bridge

Capability enabled on the neighboring device

cap-bridge

Querying Information About an LLDP Neighboring Device

This section provides a sample of querying information about an LLDP neighboring device.

Table 3-2286 Querying information about an LLDP neighboring device

Operation

XPATH

get

ietf-interfaces:interfaces-state/interface/lldp/remote-port/index

ietf-interfaces:interfaces-state/interface/lldp/remote-port/chassic-id-sub-type

ietf-interfaces:interfaces-state/interface/lldp/remote-port/chassis-id

ietf-interfaces:interfaces-state/interface/lldp/remote-port/port-id-sub-type

ietf-interfaces:interfaces-state/interface/lldp/remote-port/port-id

ietf-interfaces:interfaces-state/interface/lldp/remote-port/port-description

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-name

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-description

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-cap-supported

ietf-interfaces:interfaces-state/interface/lldp/remote-port/system-cap-enabled

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/subtype

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/address

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/if-subtype

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/if-id

ietf-interfaces:interfaces-state/interface/lldp/remote-port/remote-management/oid

Data Requirements
Table 3-2287 Querying information about an LLDP neighboring device

Item

Data

Description

Index of the neighboring device interface

1

Query information about an LLDP neighboring device.

ID sub-type of the neighboring device interface

5

ID of the neighboring device interface

Ethernet0/0/36

ID sub-type of the neighboring device

4

Description of the neighboring device

S2352P-EI; Huawei Versatile Routing Platform Software ; VRP (R) software,Version 5.70 (S2300 V100R005C01SPC100) ; Copyright (C) 2000-2006 Huawei Technologies Co., Ltd.

ID of the neighboring device

80fb-06d4-7306

Description of the neighboring device interface

Null

Name of the neighboring device

LAB86-L6-Q3-ACC

Capability supported by the neighboring device

cap-bridge

Capability enabled on the neighboring device

cap-bridge

Management address type of the neighboring device

1

Management address of the neighboring device

192.86.6.63

Interface index type of the neighbor management address

2

Interface index of the neighbor management address

57

Management address OID of the neighboring device

0.6.15.43.6.1.4.1.2011.5.25.41.1.2.1.1.1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="#message-id"> 
    <get> 
        <filter type="subtree"> 
            <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
                <interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
                    <name>GigabitEthernet0/0/1</name> 
                    <lldp xmlns="urn:huawei:params:xml:ns:yang:huawei-lldp"></lldp> 
                </interface> 
            </interfaces-state> 
        </filter> 
    </get> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="#message-id"> 
    <data> 
        <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
            <interface> 
                <name>GigabitEthernet0/0/1</name> 
                <lldp xmlns="urn:huawei:params:xml:ns:yang:huawei-lldp"> 
                    <remote-port> 
                        <index>1</index> 
                        <port-id-sub-type>5</port-id-sub-type> 
                        <port-id>Ethernet0/0/36</port-id> 
                        <chassic-id-sub-type>4</chassic-id-sub-type> 
                        <system-description>S2352P-EI; Huawei Versatile Routing Platform Software ; VRP (R) software,Version 5.70 (S2300 V100R005C01SPC100) ; Copyright (C) 2000-2006 Huawei Technologies Co., Ltd.</system-description> 
                        <chassis-id>80fb-06d4-7306</chassis-id> 
                        <port-description></port-description> 
                        <system-name>LAB86-L6-Q3-ACC</system-name> 
                        <system-cap-enabled>cap-bridge</system-cap-enabled> 
                        <system-cap-supported>cap-bridge</system-cap-supported> 
                        <remote-management> 
                            <subtype>1</subtype> 
                            <address>192.86.6.63</address> 
                            <if-subtype>2</if-subtype> 
                            <if-id>57</if-id> 
                            <oid>0.6.15.43.6.1.4.1.2011.5.25.41.1.2.1.1.1</oid> 
                        </remote-management> 
                    </remote-port> 
                </lldp> 
            </interface> 
        </interfaces-state> 
    </data> 
</rpc-reply>
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8318

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next