FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
bksol92
Staff
Staff
Article Id 352896

 

Description This article describes how to poll FortiManager API for reserved subnets for FortiSwitch VLANs.
Scope FortiManager.
Solution

FortiManager allows users to retrieve reserved subnets used by FortiSwitch VLANs via API. This information is not contained on FortiSwitch Manager, but on Device Manager, so FortiManager API will need to be polled for device-level config.

 

Attached is a sample Python script which will first loop through the list of FortiGate's available interfaces for ones with FortiLink enabled (as there may be cases where FortiSwitch devices are connected to a non-default FortiLink interface:

 

flinkintf.PNG

 

The script will then poll for the subnets of all VLANs associated with each FortiLink-enabled interface with the following function:

 

getip.PNG

 

The following is the output of the script:

 

fortilink.PNG

 

 

Contributors