LACP Functions

emulation lacp config

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

Enables, modifies, or disables an emulated Link Aggregation Control Protocol (LACP) session on a Spirent HLTAPI port.

LACP uses multiple network cables/ports in parallel to increase the link speed beyond the limits of any one single cable or port, and to increase the redundancy for higher availability.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    emulation lacp config
        mode= {enable|modify|disable} M
        port_handle= < port_handle> M
        act_port_key= <integer>
        act_lacp_port_priority= <integer>
        act_port_number= <integer>
        act_lacp_timeout= {long|short}
        act_system_priority= <integer>
        act_system_id= < aa:bb:cc:dd:ee:ff >
        lacp_activity= {passive|active}
        local_mac_addr= < aa:bb:cc:dd:ee:ff >

Arguments:

mode
                Specifies the function to be performed on the test port.
                This argument is `Mandatory`. Possible values are enable,
                modify and disable. The modes are described below::


                 enable   Enables LACP session on the test port. You must
                          specify the port_handle argument.

                 modify   Modifies the LACP session on the test port. You
                          must specify the port_handle argument.

                 disable  Disables the LACP session on the test port. You
                          must specify the port_handle argument.

act_port_key
                Operational key value assigned to the actor port. Possible
                values range from 0 to 65535. The default value is 1. This
                actor port key is encoded as a 16bit integer.

act_lacp_port_priority
                Defines the priority assigned to this port (writable).
                Possible values range from 0 to 65535. The default value
                is 1. The actor port priority is encoded as a 16bit integer.

act_port_number
                Specifies the port number assigned to the port (writable).
                Possible values range from 0 to 65535. The default value
                is 1. The actor port number is encoded as a 16bit integer.

act_lacp_timeout
                Indicates the timeout value for this link. Possible values
                are described below::


                 long - Indicates the timeout value is 90 seconds. This is
                        the default value.

                 short - Indicates the timeout value is 3 seconds.

act_system_priority
                Indicates the priority of the group. Possible
                values range from 0 to 65535. The default is 1. The
                priority of the system is encoded as a 16bit integer.

act_system_id
                Indicates the MAC address of the group. The default
                value is 00:00:00:00:00:01. The value of this argument
                must be in MAC address format.

lacp_activity
                Specifies the activity control value for this link. Possible
                values are described below::


                 active - Indicates the Spirent HLTAPI will form an
                     aggregate link, and initiate the negotiation. The link
                     aggregate will be formed if the other end is running
                     in LACP active or passive mode.

                 passive - Indicates the Spirent HLTAPI will not initiate
                     the channel, but does understand incoming LACP
                     packets. The peer (in active state) initiates
                     negotiation (by sending out an LACP packet) which
                     we receive and reply to, eventually forming the
                     aggregation channel with the peer.

local_mac_addr
                Specifies the MAC address of the test port. The
                default value is 00:10:94:00:00:02. The value should be in
                MAC address format.

port_handle
                Specifies the test port to be used. This argument is
                `Mandatory`.

Arguments Unsupported by Save as HLTAPI:

None
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status
            Success (1) or failure (0) of the operation.

log
            An error message (if the operation failed).
Description:

The emulation lacp config function enables, modifies, or disables a LACP session on the specified test port. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

When you enable a LACP session, use the port_handle argument to specify the Spirent HLTAPI port that the emulated port will use for LACP communication.

Before you configure LACP on a port, you must create the port, and use the returned port handle in the call to the emulation lacp config function.

Examples:

The following example enables LACP session on the port. There must already exist a port with the handle of port_handle1:

emulation lacp config port_handle=port_handle1
              mode= enable
              local_mac_addr= "00:94:01:00:00:01"
              act_port_key= 100
              act_lacp_port_priority= 101
              act_port_number= 10
              act_lacp_timeout= short
              lacp_activity= active
              act_system_priority= 1000
              act_system_id= "00:00:00:00:01:01"

Sample output for the example above:

# SUCCESS output
      {status 1}

# FAILURE output
      {status 0} {log XXX}

emulation lacp control

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Starts or stops the LACP protocol on a port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

      emulation lacp control
        action= {start|stop}  M
        port_handle= <port_handle_list> M

Arguments:

action
                Specifies the action to be performed. This argument is
                `Mandatory`. Possible values are described below::

                 start - Starts the LACP session on the specified port
                 stop - Stops the LACP session on the specified port

port_handle
                Specifies a list of ports on which LACP is enabled. This
                argument is `Mandatory`.
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status
            Success (1) or failure (0) of the operation.

log
            An error message (if the operation failed).
Description:

The emulation lacp control function stops, or starts the LACP session on the specified port.

When you call the emulation lacp control function, you specify a port handle. Spirent HLTAPI applies the specified action to the emulated LACP session on the specified port.

Examples:

The following example starts an enabled LACP session on the specified port:

emulation lacp control port_handle=port_handle1
                    action= start

The following example stops an enabled LACP session on the specified port:

emulation lacp control port_handle=port_handle1
                     action= stop

Sample Output:

{status 1} success or {status 0} {log XXX} fail

emulation lacp info

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Gets or clears statistics about LACP session on the specified port. Statistics include the running status and number and type of PDU packets sent to and received from the specified port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     emulation lacp info
        action= {collect|clear} M
        port_handle= <port_handle> M
        mode= {aggregate|state|stats }

Arguments:

action
                Specifies the action to be executed. This argument is
                `Mandatory`. Possible values are described below::

                 collect - Collects statistics from the specified port.

                 clear - Clears the statistics on the specified port.

port_handle
                Specifies the port on which the LACP session is enabled
                and from which statistics has to be obtained. This
                argument is `Mandatory`.

mode
                Specifies the types of LACP session information to be
                retrieved. Possible values are described below::


                 aggregate - Aggregates information of state and stats.
                         This is the default value.

                 state - Indicates that the information to be retrieved
                         is the state information of the LACP session.

                 stats - Indicates that the information to be retrieved
                         is the statistics of the LACP session.
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status     Success (1) or failure (0) of the operation.
log       An error message (if the operation failed).

The statistics that will be returned are listed below:

actor_operational_key
           Local operational key.
actor_port
           Local port ID.
actor_systemid
           Local system ID.
marker_response_pdus_rx
           Number of received Marker Response PDU packets.
marker_pdus_rx
           Number of received Marker PDU packets.
marker_response_pdus_tx
           Number of sent Marker Response PDU packets.
marker_pdus_tx
           Number of sent Marker PDU packets.
pdus_tx
           Number of sent PDU packets.
pdus_rx
           Number of received PDU packets.
partner_collector_max_delay
           Max delay time value of collecting the Partner packets.
partner_operational_key
           Partner's operational key.
partner_port
           Partner port ID.
partner_port_priority
           Partner port priority value.
partner_system_id
           Partner system ID.
partner_system_priority
           Partner system priority value.
Description:

The emulation lacp info function provides information about the configured LACP session.

This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0). Function return values are formatted as a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list. (See Return Values for a description of each key.)

Examples:

Sample Input:

# There must be an existing port on which there is an enabled LACP
  set cmdReturn [emulation lacp info port_handle=port_handle1
                                 action= collect
                                 mode= aggregate]

Sample Output:

# Sample SUCCESS output
{lacp_state UP} {partner_port 10} {actor_state 63}
{partner_system_priority 1000} {actor_systemid 00:00:00:00:01:01}
{partner_state 63} {actor_port 10} {actor_operational_key 500}
{partner_port_priority 101} {partner_operational_key 100}
{partner_system_id 00:00:00:00:01:01} {status 1}

#Sample FAILURE output
{status 0} {log XXX}

emulation lag config

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

A Spirent Extension used to create, modify, enable, disable, or delete link aggregation group (LAG) port for LACP.

Spirent HLTAPI allows you to aggregate several physical ports into a LAG port. A LAG port is used much like a physical port. You can configure devices, protocols, and traffic on a LAG port as you would on a physical port. Traffic is sent and received across the ports in the LAG. Capture and traffic analysis is performed at the LAG level on a LAG port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

         emulation lag config
               mode= {create | enable | disable | modify | delete}  M
               port_handle= <port_handle>
               lag_handle= <lag_handle>
               protocol= {none | lacp | bfd | lacp_bfd}
               lacp_port_mac_addr= <aa:bb:cc:dd:ee:ff>
               lacp_port_mac_addr_step= <aa:bb:cc:dd:ee:ff>
               lacp_actor_key= <0-65535>
               lacp_actor_key_step= <0-65535>
               lacp_actor_port_priority= <0-65535>
               lacp_actor_port_priority_step= <0-65535>
               lacp_actor_port_number= <0-65535>
               lacp_actor_port_step= <0-65535>
               lacp_timeout= {long | short}
               lacp_activity= {passive | active}
               actor_system_priority= <0-65535>
               actor_system_id=  <aa:bb:cc:dd:ee:ff>
               lag_name= <string>
               transmit_algorithm= {hashing|round_robin}
               l2_hash_option= {ETH_SRC | ETH_DST | VLAN | MPLS}
               l3_hash_option= {ETH_SRC | ETH_DST | VLAN | MPLS IPV4_SRC | IPV4_DST
                               |IPV6_SRC | IPV6_DST | UDP | TCP}]
               aggregatorresult= {member|aggregated}

Arguments:

port_handle
                Specifies the port under which to create the LAG port. This
                argument is `Mandatory` for mode create.

lag_handle
                The LAG port handle returned by the current function. You must
                specify it when the mode is modify, enable, disable, or delete.

mode
                Specifies the action to perform. This argument is `Mandatory`. The modes
                are described below::


                 create       Creates an LAG port. You must specify port_handle
                 modify       Modifies the LAG specified by lag_handle
                 enable       Enables the LAG port. You must specify lag_handle
                 disable      Disables the LAG handle. You must specify lag_handle
                 delete       Deletes the LAG configuration and releases the port

                The default value is create.

protocol
                Specifies the type of LAG to be created.
                Possible values are::


                 none       None
                 lacp       LACP
                 bfd        BFD
                 lacp_bfd   LACP and BFD

                The default value is lacp

lacp_port_mac_addr
                Specifies the starting MAC address of the actor port. The default
                value is 00:10:94:00:00:02.

lacp_port_mac_addr_step
                Specifies the step value by which to generate subsequent MAC
                addresses. The default value is 00:00:00:00:00:01.

lacp_actor_key
                Specifies the operational key value for the actor port. Possible
                values range from 0 to 65535. The default value is 1.

lacp_actor_key_step
                Specifies the step value by which to generate subsequent key
                values. Possible values range from 0 to 65535. The default value
                is 1.

lacp_actor_port_priority
                Specifies the priority assigned to the actor port.
                Possible values range from 0 to 65535. The default value is 1.

lacp_actor_port_priority_step
                Specifies the step value by which to generate subsequent priority
                values. Possible values range from 0 to 65535. The default value
                is 1.

lacp_actor_port_number
                Specifies the port number assigned to the actor port. Possible
                values range from 0 to 65535. The default value is 1.

lacp_actor_port_step
                Specifies the step value by which to generate subsequent port
                numbers. Possible values range from 0 to 65535. The default value
                is 1.

lacp_timeout
                Specifies the timeout value for this link.
                Possible values are long (90 seconds) and short (3 seconds).
                The default value is long.

lacp_activity
                Specifies the Activity Control value for this link. Possible
                values are passive and active. The default value is active.

actor_system_priority
                Specifies the system priority of the LACP group. Possible values
                range from 0 to 65535. The default value is 1.

actor_system_id
                Specifies the system ID of the LACP Group. The value must in MAC
                format. The default value is 00:00:00:00:00:01.

lag_name
                Specifies the name of the LAG port handle

transmit_algorithm
                Specifies the algorithm that determines which port in the
                aggregation group transmits the packet for cutthrough traffic.
                Possible values are::


                 hashing         Determines the transmit port on a packetperpacket
                                 basis by creating a hash value from the specified
                                 fields in the outgoing packet. The hash value is
                                 then used to select one of the available ports in
                                 the aggregation group. Depending on the content
                                 of the packet, either Layer 2 or Layer 3 hashing
                                 is used, but never both on any given packet.

                 round_robin     Determines the transmit port by roundrobin cycling
                                 through all of the available ports in the aggregation
                                 group, on a packetperpacket basis.

                The default value is hashing.

l2_hash_option
                Specifies the fields to be used when hashing Layer 2 frames. Use
                "|" if there is more than one field. These settings are used
                only on frames that do not contain Layer 3 packets.
                Possible values are described below::


                 ETH_SRC     Hash based on the Ethernet Source Address
                 ETH_DS      Hash based on the Ethernet Destination Address
                 VLAN        Hash based on the VLAN Tag Control Information (TCI)
                             field for all VLAN tags in the frame
                 MPLS        Hash based on the 20bit label in all MPLS headers
                             in the frame

                The default value is ETH_SRC|ETH_DST|VLAN|MPLS.

l3_hash_option
                Specifies the options to be used when hashing Layer 3 packets.
                Use "|" if there is more than one option. This argument is
                available when trasmit_algorithm is set to hashing. These
                settings are used on any frame that contains a Layer 3 packet.
                Possible values are described below::


                 ETH_SRC     Hash based on the Ethernet Source Address
                 ETH_DST     Hash based on the Ethernet Destination Address
                 VLAN        Hash based on the VLAN Tag Control Information (TCI)
                             field for all VLAN tags in the frame
                 MPLS        Hash based on the 20bit label in all MPLS headers in
                             the frame
                 IPV4_SRC    Hash based on the IPv4 Source Address
                 IPV4_DST    Hash based on the IPv4 Destination Address
                 IPV6_SRC    Hash based on the IPv6 Source Address
                 IPV6_DST    Hash based on the IPv6 Destination Address
                 UDP         Hash based on the UDP Source and Destination port numbers
                 TCP         Hash based on the TCP Source and Destination port numbers

                The default value is IPV4_SRC|IPV4_DST|IPV6_SRC|IPV6_DST|UDP|TCP.


aggregatorresult
                Specifies the type of traffic statistics that will be collected.
                Possible values are member and aggregated::


                 member          Traffic statistics by the membership port handle

                 aggregated      Traffic statistics by the LAG handle

                The default value is aggregated.
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

lag_handle      The LAG port handle returned

status          Success (1) or failure (0) of the operation

log             An error message (if the operation failed)
Description:
The emulation lag config function creates, modifies, enables, disables, or deletes LAG ports for LACP. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)
Examples:

To create the LAG port:

set cmdReturn1 [emulation lag config
   port_handle= "port1 port2"
   mode= create
   protocol= lacp
   lacp_port_mac_addr= 00:94:01:00:00:02
   lacp_actor_port_key= 100
   actor_lacp_port_priority= 101
   lacp_actor_port_number= 10
   actor_lacp_timeout= short
   lacp_activity= active
   actor_system_priority= 1000
   actor_system_id= 00:00:00:00:01:01
   lag_name= LAG1
   transmit_algorithm= hashing
   l2_hash_option= "ETH_SRC|ETH_DST|VLAN|MPLS"
   l3_hash_option= "VLAN|MPLS|IPV4_SRC|IPV4_DST|IPV6_SRC|IPV6_DST|UDP|TCP"
]

To modify the LAG port:

set cmdReturn2 [emulation lag config
   lag_handle= $lag1_handle
   mode= modify
   aggregatorresult= member
]

To disable the LAG port:

set cmdReturn3 [emulation lag config
   lag_handle= $lag1_handle
   mode= disable]

To delete the LAG port:

set cmdReturn3 [emulation lag config
   lag_handle= $lag1_handle
   mode= delete]

End of Procedure Header