Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Various APIs are provided to read and select the active SDM Template used by a switch.
This document provides a brief description of the SDM Template OpEN APIs. The APIs allow processes outside of the ICOS main process (switchdrvr) access to read and configure SDM templates for a specific switch. SDM stands for Switching Database Manager. SDM manages aspects of switch configuration at layers 2 and 3. Each supported SDM template is designed to optimize the routing and forwarding configuration of the switch for a specific use case. With this API, the following tasks can be performed:
All 'Set' operations may affect the Switch behavior and configuration.
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits. The program accepts several commandline arguments. Use -h to get usage information displayed to stdout.
sdm_example.c is a sample application that demonstrates the use of the SDM OpEN APIs. sdm_example is started from the command line.
./sdm_example -s
All Supported SDM template IDs
1 OPEN_SDM_TEMPLATE_DUAL_DEFAULT (Dual IPv4 and IPv6)
2 OPEN_SDM_TEMPLATE_V4_DEFAULT (IPv4-routing Default)
3 OPEN_SDM_TEMPLATE_V4_DATA_CENTER (IPv4 Data Center)
4 OPEN_SDM_TEMPLATE_DATA_CENTER_PLUS (Data Center Plus - IPv4)
5 OPEN_SDM_TEMPLATE_DUAL_DATA_CENTER (Data Center - IPv4 and IPv6)
6 OPEN_SDM_TEMPLATE_MPLS_DUAL_DATA_CENTER (Data Center - MPLS IPv4/IPv6)
7 OPEN_SDM_TEMPLATE_DCVPN_DUAL_DATA_CENTER (DCVPN IPv4/IPv6 Data Center)
8 OPEN_SDM_TEMPLATE_DCVPN_V4_DATA_CENTER (DCVPN IPv4 Data Center)
9 OPEN_SDM_TEMPLATE_ALPM (ALPM)
10 OPEN_SDM_TEMPLATE_ALPM_MPLS_DUAL_DATA_CENTER (ALPM MPLS Data Center)
./sdm_example -i 7
Template OPEN_SDM_TEMPLATE_DCVPN_DUAL_DATA_CENTER (DCVPN IPv4/IPv6 Data Center)
ARP Entries.................................... 2560
IPv4 Unicast Routes............................ 8160
IPv6 NDP Entries............................... 2560
IPv6 Unicast Routes............................ 2048
ECMP Next Hops................................. 16
IPv4 Multicast Routes.......................... 0
IPv6 Multicast Routes.......................... 0
./sdm_example -n
Next Active SDM template
Template OPEN_SDM_TEMPLATE_DCVPN_V4_DATA_CENTER (DCVPN IPv4 Data Center)
ARP Entries.................................... 2560
IPv4 Unicast Routes............................ 8160
IPv6 NDP Entries............................... 0
IPv6 Unicast Routes............................ 0
ECMP Next Hops................................. 16
IPv4 Multicast Routes.......................... 0
IPv6 Multicast Routes.......................... 0
./sdm_example -t "Data Center - IPv4 and IPv6"
Template OPEN_SDM_TEMPLATE_DUAL_DATA_CENTER (Data Center - IPv4 and IPv6)
ARP Entries.................................... 2560
IPv4 Unicast Routes............................ 8160
IPv6 NDP Entries............................... 2560
IPv6 Unicast Routes............................ 2048
ECMP Next Hops................................. 48
IPv4 Multicast Routes.......................... 0
IPv6 Multicast Routes.......................... 0
CLI Command | OpEN API Reference
---------— | ----------—
(localhost)# show sdm prefer | all APIs except openapiSdmNextActiveTemplateSet() and openapiSdmNextActiveTemplateGet()
(localhost) (Config)#sdm prefer | openapiSdmNextActiveTemplateSet() and openapiSdmNextActiveTemplateGet()