Forum Discussion

Trasmontinho's avatar
Trasmontinho
Icon for Nimbostratus rankNimbostratus
Mar 10, 2020

get LLDP Neighbor through RestAPI

Hi,

 

Is there a way to collect lldp neighboring through API or we can collect this information only through tmsh CLI ?

 

If yes, could you help to retrieve this API because I haven't been to find it in iControl.

 

Thanks for your help.

 

Sam

4 Replies

  • Have you tried GET /mgmt/tm/net/lldp-neighbors? e.g.,

    curl -sku <user>:<pass> https://<host>/mgmt/tm/net/lldp-neighbors
    {
        "kind": "tm:net:lldp-neighbors:lldp-neighborscollectionstats",
        "selfLink": "https://localhost/mgmt/tm/net/lldp-neighbors?ver=14.1.2"
    }

    The example does not show any data because my environment consists of only BIG-IP VEs (LLDP is not supported on VEs).

  • Hello Satoshi,

     

    I'll try that. Thank you for your answer. I'll keep you posted.

     

    Regards,

     

    Sam

  • Hello Satoshi,

     

    This commands returns part of the informations that I try to get.

    {'chassisId': {'description': 'e8:ed:f3:e4:29:6c'}, 'localInterface': {'description': '2/2.3'}, 'portId': {'description': 'Eth7/2'}}

     

    the fact is that I need also the remote sysname to do so. Is there another way to retrieve this information ?

     

    Thanks for your answer.

     

    Regards,

    Sam

     

  • How about this one?

    curl -sku <user>:<pass> https://<host>/mgmt/tm/net/lldp-neighbors?options=all-properties