Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Link Aggregation (LAG)

The Link Aggregation (LAG) feature allows one to combine multiple full-duplex Ethernet links as a single logical link. Network devices treat the aggregation as if it were a single link, which increases fault tolerance and provides load sharing. The LAG feature initially load shares traffic based upon the source and destination MAC address. A port-channel interface can be either static or dynamic, but not both. All members of a port channel must participate in the same protocol.

LAG OpEN API

This document provides a brief description of the LAG OpEN API. The LAG OpEN API allows processes outside of the ICOS main process (switchdrvr) access to LAG Management services. It provides the following services:

Example C Application lag_example

Initialization

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.

lag_example

lag_example.c is a sample application that demonstrates the use of the LAG OpEN API. lag_example is started from the command line. It then exercises all the LAG OpEN APIs one by one with appropriate arguments to manage the LAG component in the ICOS main process (switchdrvr).

LAG CLI/API Cross Reference

CLI Command OpEN API Reference
(Config)#
port-channel load-balance <load-balance mode> {<lag-interface> | all}
openapiLagLoadBalanceModeSet()
openapiLagLoadBalanceModeGet()
(Config)#
port-channel name <lag-interface> <port-channel name>
openapiLagNameSet()
openapiLagNameGet()
(Interface-Config Mode)#
[no] lacp actor admin state (passive |individual |longtimeout}
openapiDot3adAggPortActorAdminStateSet()
openapiDot3adAggPortActorAdminStateGet()
(Interface-Config Mode)#
[no] port lacpmode
openapiDot3adAggPortLacpModeSet()
openapiDot3adAggPortLacpModeGet()
(Interface-Config Mode)#
addport lag <lag-interface>
openapiLagPortAdd()
(Interface-Config Mode)#
deleteport <lag-interface>
openapiLagPortDelete()
(Lag-Config Mode)#
[no]port-channel static
openapiLagStaticModeSet()
openapiLagStaticModeGet()
(Lag-Config Mode)#
[no]adminmode
openapiLagAdminModeSet()
openapiLagAdminModeGet()
(Lag-Config Mode)#
port-channel min-links <min-links>
openapiLagMinUplinksSet()
openapiLagMinUplinksGet()
(Priv-User Mode)#
show port-channel {<slot/port> | all}
openapiLagMembersGet()
openapiLagAdminModeGet()
(Priv-User Mode)#
show port-channel {<slot/port> | all}
openapiLagMembersListGet()
openapiLagAdminModeGet()
(Priv-User Mode)#
show port-channel brief
openapiLagActiveMembersGet()