08-23-2023 03:08 AM
Hi,
We are working on an automation project the polls the switches periodically and would like to extract the MAC address of connected devices to the switch and what ports they are connected to. The result of 'show fdb ports 1:1-1:48' is basically what we're after.
It looks like we might be able to achieve a similar result by using API GET calls against the switch using the built in RESTCONF API but I am struggling with this specific URL:
https://<ip>/rest/restconf/data/openconfig-network-instance:network-instances/network-instance=<key>/fdb
I've pulled this URL from the RESTCONF reference documentation at https://[ip]/apps/resconfdoc# version 2.1.1.41, from our X690 switch directly, so I'm assuming its supported.
It is asking for a <key> but I am struggling to find examples of what this would be.
Does anyone have any experience with this/ have any idea what the <key> value should be?
Many thanks in advance!
Solved! Go to Solution.
08-23-2023 06:24 AM - edited 08-23-2023 06:25 AM
The "network-instance" key should be the "name" of the given "network-instance" when you run https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/
This would be "VR-Default" (case sensitive) when you use the default VR, so you can run "https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/network-instance=VR-Default/fdb?formatted=true"
You will probably see the MAC addresses even when you use the first link without specifying the specific key and "fdb".
08-23-2023 06:24 AM - edited 08-23-2023 06:25 AM
The "network-instance" key should be the "name" of the given "network-instance" when you run https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/
This would be "VR-Default" (case sensitive) when you use the default VR, so you can run "https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/network-instance=VR-Default/fdb?formatted=true"
You will probably see the MAC addresses even when you use the first link without specifying the specific key and "fdb".
08-23-2023 06:46 AM
Thanks for the reply!
I've tried VR-Default but unfortunately get a 500 Internal Server Error:
08-23-2023 06:56 AM
Will try a firmware update. Currently on 31.3.1.3. Looks like the 500 internal server error might be fixed on version 31.6 onwards: https://extremeportal.force.com/ExtrArticleDetail?an=000103544.
Thanks for your help Chris.