NETCONF Configuration Guide
...
Layer2
LLDP
21 min
asternos lldp this chapter provides examples on how to use netconf to manage lldp configurations on asternos devices enable lldp feature request example to enable lldp feature via edit config \<config>\<top> \<lldp global operation="create"> \<admin status>true\</admin status> \</lldp global> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 088fc1fb b534 42aa b7d3 1ab408d6ffe6"> \<ok/> \</rpc reply> disable lldp feature request example to disable lldp feature via edit config \<config>\<top> \<lldp global operation="merge"> \<admin status>false\</admin status> \</lldp global> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ caf95cdc e6fc 43ed 9682 5c5a6c50cd6c"> \<ok/> \</rpc reply> edit lldp global config request example to edit lldp global configuration via edit config \<config> \<top> \<lldp global operation="merge"> \<global portid subtype>macaddress\</global portid subtype> \<management address>1 1 1 1\</management address> \<dot3 power>true\</dot3 power> \<med power>true\</med power> \<admin status>true\</admin status> \</lldp global> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 7f3e2f3a 2f4e 4d1b 8e2e 3c3f0b6e5f4a"> \<ok/> \</rpc reply> replace lldp global config request example to replace lldp global configuration via edit config \<config> \<top> \<lldp global operation="replace"> \<global portid subtype>ifname\</global portid subtype> \<admin status>true\</admin status> \</lldp global> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ f8b9af10 0da7 4634 baad ac27cd353c4a"> \<ok/> \</rpc reply> get lldp global config request example to get lldp global configuration via get config with subtree filter \<filter type="subtree"> \<top> \<lldp global/> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ a7600ade aa6e 4ccd 9fd5 0b2d7ba95d27"> \<data> \<top> \<lldp global xmlns="http //asterfusion com/ns/yang/asternos lldp"> \<global portid subtype>macaddress\</global portid subtype> \<management address>1 1 1 1\</management address> \<dot3 power>true\</dot3 power> \<med power>true\</med power> \<admin status>true\</admin status> \</lldp global> \</top> \</data> \</rpc reply> delete lldp global config request example to delete lldp global configuration via edit config \<config> \<top> \<lldp global operation="delete"/> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ e1396839 b3f9 4dcf bd34 7231175454f4"> \<ok/> \</rpc reply> create lldp entry for interface request example to create lldp entry for interface via edit config \<config> \<top> \<lldp ports> \<lldp port operation="merge"> \<ifname>ethernet1\</ifname> \<priority>5\</priority> \<dscp>20\</dscp> \<vid>20\</vid> \<vlan type>untagged\</vlan type> \</lldp port> \</lldp ports> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 4f5c6e2b 3c4d 4e5f 8a9b 0c1d2e3f4a5b"> \<ok/> \</rpc reply> modify lldp entry for interface request example to modify specific lldp entry for interface via edit config with merge operation \<config> \<top> \<lldp ports> \<lldp port operation="merge"> \<ifname>ethernet1\</ifname> \<priority>3\</priority> \<dscp>30\</dscp> \<vid>30\</vid> \<vlan type>tagged\</vlan type> \</lldp port> \</lldp ports> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 59274d9a 6e2f 4b55 b27c 242d44aa231d"> \<ok/> \</rpc reply> get lldp entry for interface request example to get specific lldp entry for interface via get config with subtree filter \<filter type="subtree"> \<top> \<lldp ports> \<lldp port> \<ifname>ethernet1\</ifname> \</lldp port> \</lldp ports> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 5fb8022a e506 4357 9b2a 7a0a0712cbab"> \<data> \<top> \<lldp ports xmlns="http //asterfusion com/ns/yang/asternos lldp"> \<lldp port> \<ifname>ethernet1\</ifname> \<vid>30\</vid> \<vlan type>tagged\</vlan type> \<priority>3\</priority> \<dscp>30\</dscp> \</lldp port> \</lldp ports> \</top> \</data> \</rpc reply> delete lldp entry for interface request example to delete specific lldp entry for interface via edit config \<config> \<top> \<lldp ports> \<lldp port operation="delete"> \<ifname>ethernet1\</ifname> \</lldp port> \</lldp ports> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 8d6f4e2c 1a2b 3c4d 5e6f 7a8b9c0d1e2f"> \<ok/> \</rpc reply> show lldp table request example to show lldp table via rpc show lldp table \<show lldp table/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 680ce60c a289 4344 a8a1 61e1753174b5"> \<data xmlns="http //asterfusion com/ns/yang/asternos lldp"> capability codes (r) router, (b) bridge, (o) other localport remotedevice remoteportid capability remoteportdescr \ ethernet29 sonic ethernet37 br y37 eth0 dev leaf 4 ethernet27 br ethernet27 \ total entries displayed 2 \</data> \</rpc reply> show lldp neighbors request example to show lldp neighbors via rpc show lldp neighbors \<show lldp neighbor/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ cbde15fb 9bcb 4a90 8253 4c0e8cc0773f"> \<data xmlns="http //asterfusion com/ns/yang/asternos lldp"> \ lldp neighbors \ interface eth0, via lldp, rid 1, time 0 day, 02 33 41 chassis chassisid local 60\ eb 5a 01 02\ a4 sysname dev leaf 4 sysdescr db98dx3530 52cd debian gnu/linux 9 (stretch) 5 10 34 103 aarch64 mgmtip 172 18 0 1 mgmtiface 10 mgmtip fc00 62eb\ ffc\ ac10 10b mgmtiface 15 capability bridge, on capability router, on port portid ifname ethernet27 portdescr ethernet27 ttl 8 mfs 9216 pmd autoneg supported no, enabled no mau oper type 10basetfd utp mau, full duplex mode vlan 802, pvid yes vlan802 vlan 4094, pvid no vlan4094 \ interface ethernet29, via lldp, rid 2, time 0 day, 02 33 41 chassis chassisid local 60\ eb 5a 01 12\ f2 sysname sonic sysdescr sonic software version sonic v6 1r004t006 hwsku cx308p 48y m distribution debian 12 12 kernel 6 1 0 22 2 amd64 mgmtip 192 168 15 167 mgmtiface 2 capability bridge, on capability router, on capability wlan, off capability station, off port portid ifname ethernet37 portdescr y37 ttl 8 pmd autoneg supported no, enabled no mau oper type 10basetfd utp mau, full duplex mode \ \</data> \</rpc reply> show lldp ports med policy request example to show lldp ports med policy via rpc show lldp ports med policy \<show lldp ports med policy/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 19401514 72f0 4834 a666 4eef10cd7ff0"> \<data xmlns="http //asterfusion com/ns/yang/asternos lldp"> + + + + + + + \| ports | application | vlan | tagged | priority | dscp | +===========+===============+========+==========+============+========+ \| ethernet1 | voice | 30 | tagged | 3 | 30 | + + + + + + + \</data> \</rpc reply>
