L2TP Functions

sth::l2tp_config

Purpose

Creates, enables, modifies, or deletes an emulated L2TP session or tunnel on the specified test port of a Spirent HLTAPI chassis. Each port can have up to 32000 sessions and 32000 tunnels.

Layer Two Tunneling Protocol (L2TP) is a tunneling protocol that supports virtual private networks (VPNs). L2TP helps tunnel PPP packets across a network transparently. It combines the features of Cisco’s Layer 2 Forwarding (L2F) and Microsoft’s Point-to-Point Tunneling (PPTP) protocol. L2TP is an extension of PPP. Spirent TestCenter supports L2TPv2.

Synopsis

Note

  1. M indicates that the argument is Mandatory .
  2. S indicates the argument is for scaling scenarios.
sth::l2tp_config
   [-port_handle   {l2tp_port_handle}  M]
   [-handle   {l2tp_handle}]
   [-config_mode   {create|modify|delete}]
   [-l2_encap {ethernet_ii|ethernet_ii_vlan|ethernet_ii_qinq|atm_snap|atm_vc_mux}]
   [-num_tunnels <1-32000>]
   [-l2tp_src_addr  <a.b.c.d>]
   [-l2tp_src_count <1-112> ]
   [-l2tp_src_step  <a.b.c.d>]
   [-l2tp_dst_addr { ip } ]
   [-l2tp_dst_count <1-112> ]
   [-l2tp_dst_step <a.b.c.d>]
   [-l2tp_mac_addr < aa:bb:cc:dd:ee:ff >]
   [-l2tp_mac_step < aa:bb:cc:dd:ee:ff >]
   [-sessions_per_tunnel <1-32000>]
   [-udp_src_port    <1-65535>]
   [-attempt_rate <1-1000>]
   [-auth_mode {none|pap|chap|pap_or_chap}]
   [-username <username>]
   [-username_wc {0|1}]
   [-password <password>]
   [-password_wc {0|1}]
   [-wildcard_pound_start <0-65535>]
   [-wildcard_pound_end <0-65535>]
   [-wildcard_question_start <0-65535>]
   [-wildcard_question_end <0-65535>]
   [-wildcard_bang_end <0-65535>]
   [-wildcard_bang_start <0-65535>]
   [-wildcard_dollar_end <0-65535>]
   [-wildcard_dollar_start <0-65535>]
   [-auth_req_timeout <1-65535>]
   [-avp_framing_type { sync | async }]
   [-avp_hide_list ]
   [-avp_tx_connect_speed <1 - 65535>]
   [-config_req_timeout <1-65535>]
   [-max_auth_req <1-65535>]
   [-max_ipcp_req <1-65535>]
   [-max_terminate_req <1-65535>]
   [-domain_group_map ]
   [-echo_req {1|0|TRUE|FALSE}]
   [-echo_req_interval <1-65535>]
   [-max_echo_acks <0-65535>]
   [-enable_magic {1|0}]
   [-hello_interval <1-1024>]
   [-hello_req {1|0|TRUE|FALSE}]
   [-hostname <pppox_host_name>]
   [-hostname_wc {1|0}]
   [-mode {lac | lns}
   [-ppp_client_ip <a.b.c.d>]
   [-ppp_client_step <a.b.c.d> | <0–4294967295>]
   [-ppp_server_ip <a.b.c.d>]
   [-ppp_server_step <a.b.c.d>]
   [-redial {0 | 1 }]
   [-redial_max <1-20>]
   [-redial_timeout <1-20>]
   [-rws <1-2048>]
   [-secret <wildcard>]
   [-secret_wc {1|0}]
   [-session_id_start <1-65535>]
   [-sessions_per_tunnel <1-65535>]
   [-terminate_req_timeout <1-65535>]
   [-tunnel_id_start <1-65535>]
   [-vci <0-65535>]
   [-vci_count <0-65535>]
   [-vci_step <0-65535>]
   [-vpi <0-4096>]
   [-vpi_count <1-4096>]
   [-vpi_step <0-4096>]
   [-pvc_incr_mode {vpi|vci|both}]
   [-vlan_id <1-4095>]
   [-vlan_count <1-4095>]
   [-vlan_id_step <0-4095>]
   [-vlan_user_priority <0-7>]
   [-vlan_id_outer <1-4096>]
   [-vlan_count_outer <integer>]
   [-vlan_id_step_outer <0-4095>]
   [-vlan_user_priority_outer <0-7>]
   [-ppp_auto_retry { TRUE | FALSE }]
   [-ppp_retry_count <1-65535>]
   [-qinq_incr_mode {inner|outer|both}]
   [-force_lcp_renegotiation  { TRUE | FALSE }]
   [-lcp_proxy_mode {none|authentication|lcponly}]
   [-expand {true|false} S]
   [-enable_authentication {true|false}]
   [-remote_ipv6_addr <IPV6>]
   [-remote_ipv4_addr <IPV4>]
   [-remote_ipv4_addr_step_per_l2tp_node <IPV4>]
   [-remote_ipv6_addr_step_per_l2tp_node <IPV6>]
   [-tunnels_per_l2tp_node <1-65535>]
   [-tunnel_password <ANY>]
   [-use_gateway_as_remote_ipv4_addr {true|false}]
   [-use_gateway_as_remote_ipv6_addr {true|false}]

Arguments

-config_mode

Specifies the action to perform. The modes are described below:

create -  Creates one or more emulated host L2TP Access
          Concentrators (LAC) or L2TP Network Servers (LNS)

modify - Changes the configuration for the emulated host
         identified by the -handle argument.

delete - Deletes the emulated hosts identified by the -handle or
          -port_handle arguments.

The default is create.

-handle

Specifies the L2TPv2 session handle to modify. This argument is Mandatory for -mode modify.

-attempt_rate

Specifies the time interval, in seconds, that Spirent TestCenter attempts to bring up sessions or connect to tunnels. Possible values range from 1 to 1000. The default value is 100.

-auth_mode

Specifies the authentication mode. During the Link Control Protocol (LCP) phase, one peer may send an authentication challenge to the other. LCP supports two authentication protocols: Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP). Possible values are:

none           No authentication
pap            PAP
chap           CHAP MD5
pap_or_chap    Automatically negotiated; accepts both PAP
               and CHAP offered by the DUT

The default is none.

-auth_req_timeout

Specifies the timeout wait period, in seconds, for the server to acknowledge either a Configure Request or a Terminate Request. Possible values range from 1 to 65535. The default is 3 seconds.

-avp_framing_type

Sets AVP value to be sent as framing type. Possible values are sync or async. The default is sync. sync - Indicates that the synchronous framing is supported. async - Indicates that the asynchronous framing is supported.

-avp_hide_list

A list of integers corresponding to AVP. The default is 0.

-avp_tx_connect_speed

Sets AVP value to be sent as tx connect speed. Possible values range from 1 to 65535. The default is 56000.

-config_req_timeout

Specifies the timeout value in seconds for acknowledgement of a Configure Request or Terminate Request. When this expires, another Configure-Request packet is sent, until the value defined for the -max_configure_req argument is reached. After that, the session is terminated. This is a port-wide option. Any subsequent use of this option on a port after the initial “-mode create” will overwrite any previous setting. Possible values range from 1 to 65535. The default is 3. See also -max_configure_req.

-domain_group_map

A list of domain groups to LNS IP mapping. Each domain group can have thousands of domains. With the help of domain group it is very easy to map thousands of domains to one or more LNS IP addresses. Each domain group is defined as:

{{ domain_name } {lnsIP1 lnsIP2} }

where domain_name is defined as:

{name wc wc_start wc_end <wc_repeat(default 1)>}.
- name <string>: name to be used for the domain(s).
- wc {1|0}: enables wildcard substitution in the name field.
 (default 0)
- wc_start <0-65535> : starting value for wildcard symbol
  for the name (%) substitution
- wc_end <0-65535>: ending value for wildcard symbol for
 the name (%) substitution
- lnsIP <a.b.c.d>: LNS IP address list to be used for this
 domain.

For example, if you want to set up 20 domains out of which cisco1.com to cisco10.com go to 192.1.1.1 and 192.1.1.2, and cisco11.com to cisco20.com go to 192.1.2.1. Assuming the number of sessions per tunnel is 5, your domain group list looks like this:

{ { {cisco%.com 1 1 10} {192.1.1.1 192.1.1.2} }
{ {cisco%.com 1 11 20} {192.1.2.1} } }

Tunnel allocation looks like this:

Sessions 1-5, tunnel1 dst 192.1.1.1;
Sessions 5-10, tunnel2 dst 192.1.1.2;
Sessions 11-15, tunnel3 dst 192.1.2.1;
Sessions 16-20, tunnel4 dst 192.1.2.1.
-echo_req

When set to 1 or TRUE, enables Echo Requests. When set to 0 or FALSE, disables Echo Requests. The default is 0.

-echo_req_interval

Specifies the time interval in seconds for sending LCP echo requests. Valid only if -echo_req is set to 1. Possible values range from 1 to 65535. The default is 10.

-max_echo_acks

Specifies The number of consecutive, unanswered echo requests to send before failing the subscriber session. Valid only if -echo_req is set to 1. Possible values range from 0 to 65535. The default is 10.

-enable_magic

Enables or disables negotiation of magic numbers. Possible values are 0 (disabled) and 1 (enabled). The default is 1.

-hello_interval

Sets time interval between sending of the hello request. Only applicable if the -hello_req is set to 1. Possible values range from 1 to 65535. The default is 60.

-hello_req

Enables or disables sending of HELLO messages. Possible values are 0 (FALSE) and 1 (TRUE). The default is 0.

-hostname

The name of the host to use during the tunnel setup. The default is server.spirent.com.

-hostname_wc

Enables wildcard substitution in the hostname field. Possible values are 0 (disable) and 1 (enable). The default is 0.

-l2_encap

Identifies the type of Layer2 encapsulation to use for a stream. Possible values are ethernet_ii, ethernet_ii_vlan, ethernet_ii_qinq, atm_snap, and atm_vc_mux. The ethernet_ii_vlan and ethernet_ii_qinq options support VLAN tagging on Ethernet networks; ethernet_ii does not. The atm_snap and atm_vc_mux options support ATM networks. If you use the -vlan_* arguments to define a VLAN interface, you must set the L2 encapsulation type to ethernet_ii_vlan. If you use the -vlan_outer_* arguments to define a Q-in-Q interface, you must set the L2 encapsulation type to ethernet_ii_qinq. If you use the -vci_* and -vpi_* arguments to define an ATM interface, you must set the L2 encapsulation type to atm_vc_mux or atm_snap.

-l2tp_src_addr

Specifies the base IP address to use for the local IP interface on the port. The default is 192.85.1.3.

-l2tp_src_count

Number of source IP addresses to simulate on the port. Possible values range from 1 to 65535. When the -mode argument is set to “lac”, the value of this option represents the number of the L2TP client, then if the value of -l2_encap is set to “ethernet_ii_vlan”, the value of this option must be divided evenly by the value of -vlan_count. If the value of -l2_encap is set to “ethernet_ii_qinq”, the value of this option must be divided evenly by the least common multiple of vlan_count and vlan_count_outer. Likewise, if the value of -l2_encap is set to “atm_snap” or “atm_vc_mux” then the value of this option must be divided evenly by the least common multiple of vpi_count and vci_count.

-l2tp_src_step

The modifier for the L2TP source address for multiple source addresses. The default is 0.0.0.1.

-l2tp_dst_addr

Specifies the base destination IP address to use for setting up tunnels. The default is 192.85.1.3.

-l2tp_dst_count

Number of destination IP addresses to simulate on the port. Possible values range from 1 to 65535. When the -mode argument is set to lns, the value of this option represents the number of the L2TP client. Then if the value of -l2_encap is set to “ethernet_ii_vlan”, then the value of this option must be divided evenly by the value of -vlan_count. If the value of -l2_encap is set to “ethernet_ii_qinq”, then the value of this option must be divided evenly by the least common multiple of vlan_count and vlan_count_outer. Likewise, if the value of -l2_encap is set to “atm_snap” or “atm_vc_mux”, then the value of this option must be divided evenly by the least common multiple of vpi_count and vci_count.

-l2tp_dst_step

The modifier for the L2TP destination address for multiple destination addresses. The default is 0.0.0.1.

-l2tp_mac_addr

Spirent Extension (for Spirent HLTAPI only).

Defines the MAC address of L2TP device (L2TP Network Server or L2TP Access Concentrator). The default is 00:10:94:00:00:02.

-l2tp_mac_step

Spirent Extension (for Spirent HLTAPI only).

Defines the modifier for the L2TP MAC address. The default is 00:00:00:00:00:01.

-max_auth_req

Specifies the maximum number of authentication requests that can be sent without getting an authentication response from the DUT. Possible values range from 1 to 65535.

-max_ipcp_req

Specifies the maximum number of NCP Configure-Requests that can be sent without acknowledgement before a session fails. Possible values range from 1 to 65535. The default is 10. See also -terminate_req_timeout.

-max_terminate_req

Specifies the maximum number of times a Terminate Requests that can be sent before a session fails. Possible values range from 1 to 65535. The default is 10. See also -terminate_req_timeout.

-mode

Specifies whether the port will be acting as an LAC or LNS. Possible values are:

LAC - Hosts will emulate an L2TP Access Concentrator
LNS - Hosts will emulate an L2TP Network Server

The default is LAC.

-num_tunnels

Sets the number of tunnels to configure on the port. Possible values range from 1 to 32000. The default is 1.

-password

Specifies the string base from which the passwords are generated (for example, Password#) when the authentication mode is pap, chap, or pap_or_chap (see -auth_mode). The default is “pass”. See Notes for information about using wildcards in passwords.

-password_wc

Enables wildcard substitution in the -password argument. Possible values are 0 (false) and 1 (true). If the value is set to 1, any wildcards used in -password are replaced with the corresponding values for -wildcard_pound_start, wildcard_pound_end, wildcard_question_start and -wildcard_question_end. If the value is 0, wildcards are not replaced in the specified password. The default is 0.

-port_handle

Specifies the handle of the port on which to create the L2TP sessions and tunnels. This argument is Mandatory . This port handle is returned by the sth::connect function.

-ppp_client_ip

Base IP address of the client IP pool allocated by the LNS. Only valid if the mode is lns.

-ppp_client_step

Step size to use for allocating client IP addresses. Only valid if the mode is lns. It can either be configured as an integer value or an IP address. The integer value is automatically converted to an IPv4 address and then used as the address increment. The default value is 0.0.0.1.

-ppp_server_ip

Local IP address of the PPP server. Only valid if the mode is lns.

-ppp_server_step

Step size to use for allocating server IP addresses. Only valid if the mode is lns. See “sth::traffic_config” for the step format.

-redial

Determines whether to redial the DUT to reestablish an L2TP link Possible values are 0 (false) and 1 (true). If you set it to 0, Spirent HLTAPI will redial the DUT to reestablish an L2TP link before declaring a failure. The default value is 0.

-redial_max

Specifies the maximum number of times Spirent TestCenter will redial the DUT to reestablish an L2TP link before declaring a failure. Possible values are 1 to 20. The default is 1.

-redial_timeout

Sets number of seconds to wait between successive attempts to redial the DUT to reestablish an L2TP link. Possible values are 1 to 20. The default is 1.

-rws

Sets the receive window size. Possible values are 1 to 2048. The default is 4.

-tun_auth

Enables tunnel authentication during the tunnel setup. The default is false.

-secret

Sets the secret to use during the tunnel setup. You can set a range of secrets using the autoincrement feature. See also -secret_wc.

-secret_wc

Enables wildcard substitution in the -secret argument. Possible values are 0 (false) and 1 (true). If the value is set to 1, any wildcards used in -secret are replaced with the corresponding values for -wildcard_pound_start, wildcard_pound_end, wildcard_question_start and -wildcard_question_end. If the value is 0, wildcards are not replaced in the specified secret. The default is 0.

-session_id_start

Sets the starting session ID to be used as local call ID. Possible values range from 1 to 65535. The default is 1.

-sessions_per_tunnel

Sets the number of sessions number of PPP sessions over each tunnel. Possible values range from 1 to 65535. The default is 1.

-terminate_req_timeout

The maximum amount of time (in seconds) that the termination process can take before another Terminate- Request packet is sent. If there is no response, another packet is sent until the value defined for the -max_terminate_req argument is reached, and then the session is terminated. Possible values range from 1 to 65535. The default is 10. See also -max_terminate_req.

-tunnel_id_start

Sets starting tunnel ID to be used as local tunnel ID. Possible values range from 1 to 65535. The default is 1.

-udp_src_port

Defines the source UDP port to use for setting up tunnels. Possible values range from 1 to 65535. The default is 1701.

-username

The string base from which the usernames are generated (for example, User#) when the authentication mode is pap, chap, or pap_or_chap (see -auth_mode). The default is “anonymous”. See Notes for information about using wildcards in passwords.

-username_wc

Enables wildcard substitution in the -username argument. Possible values are 0 (false) and 1 (true). If the value is set to 1, any wildcards used in -username are replaced with the corresponding values for -wildcard_pound_start, wildcard_pound_end, wildcard_question_start and -wildcard_question_end. If the value is 0, wildcards are not replaced in the specified username. The default is 0.

-pvc_incr_mode

Determines which ID to increment first. Possible values are:

vci - Increments the Virtual Circuit (VC) ID before the VP ID
vpi - Increments the Virtual Path (VP) ID before the VC ID
both - Increments both the VP and VC ID at the same time.
-vci

Sets the starting VCI for L2TPoA . Possible values range from 0 to 65535.

-vci_count

Sets the number of VC IDs to use when generating L2TPoA. Possible values range from 1 to 65535. The default is 1.

-vci_step

Sets the step value applied to VCI, L2TPoA only. Possible values range from 0 to 65535.

-vpi

Sets the starting VPI for L2TPoA. Possible values range from 0 to 4096.

-vpi_count

Sets the number of VP IDs to use when generating L2TPoA. Possible values range from 1 to 4096. The default is 1.

-vpi_step

Sets the step value applied to VPI, L2TPooA only. Possible values range from 0 to 4096.

-vlan_count

Sets the number of VLAN IDs to use when generating L2TPoE sessions or tunnels. Spirent HLTAPI assigns VLAN membership in round-robin fashion. Possible values range from 1 to 4095. The default is 1. Applies only to L2TPoE.

-vlan_id

The VLAN ID of the first VLAN sub-interface. Used to configure refresh reduction capabilities per RFC 2961. Possible values range from 1 to 4095. The default is 1.

-vlan_id_step

The value that Spirent HLTAPI uses to increment the VLAN ID. Possible step values range from 0 to 4095. The default value is 0.

-vlan_user_priority

VLAN user priority assigned to emulated L2TPoE nodes. Possible values range from 0 to 7. The default is 0.

-vlan_count_outer

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of outer VLAN IDs to use when generating L2TP clients. Spirent HLTAPI assigns VLAN membership in round-robin fashion. Possible values range from 0 to 4096. The default is 1.

-vlan_id_outer

Spirent Extension (for Spirent HLTAPI only).

The outer VLAN ID of VLAN sub-interface. Possible values range from 1 to 4096. The default is 1. When you use -vlan_id_outer, you must specify -vlan_id.

-vlan_id_step_outer

Spirent Extension (for Spirent HLTAPI only).

The amount by which to increment the specified outer VLAN ID (-vlan_id_outer) for subsequent packets. Possible values range from 0 to 4095. You must specify this step when you specify the -qinq_incr_mode argument.

-vlan_user_priority_outer

Spirent Extension (for Spirent HLTAPI only).

Specifies the VLAN priority to assign to the outer header. Possible values range from 0 to 7. The default is 0.

-wildcard_bang_start

Starting value for wildcard symbol 1 (!) substitution associated with username and password. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_bang_end

Ending value for wildcard symbol 1 (!) substitution associated with username and password. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_dollar_start

Starting value for wildcard symbol 2 ($) substitution associated with username and password. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_dollar_end

Ending value for wildcard symbol 2 ($) substitution associated with username and password. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_pound_start

Starting numerical value to replace the wildcard pound (#) character in user names and passwords, such as user# or pwd#. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_pound_end

Final numerical value to replace the wildcard pound (#) character in user names and passwords, such as user# or pwd#. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_question_start

Starting numerical value to replace the wildcard question mark character in user names and passwords. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-wildcard_question_end

Final numerical value to replace the wildcard question mark character in user names and passwords. Possible values range from 0 to 65535. The default is 1. See Notes for more about using wildcards.

-ppp_auto_retry

Enable/disable automatic retry to connect failed PPP sessions. Possible values are TRUE and FALSE. The default is FALSE.

-ppp_retry_count

The maximum number of automatic retry attempts. Possible values range from 0 to 65535. The default is 1. ppp_retry_count depends on ppp_auto_retry. Only when ppp_auto_retry is TRUE can ppp_retry_count be set

-qinq_incr_mode

Spirent Extension (for Spirent HLTAPI only).

Specifies the increment mode for ethernet_ii_qinq encapsulation. This parameter only applies to Q-in-Q Ethernet interfaces. Possible values are “inner”, “outer” and “both”. The default is “both”. The modes are described below:

inner - When the number of sessions is greater than
       the inner VLAN count times the outer VLAN count, the
       inner VLAN ID is incremented first until the specified
       number of inner VLANs is exhausted, then the outer
       VLAN ID is incremented. This continues in a
       round-robin fashion until the number of
       sessions is exhausted.

outer - When the number of sessions is greater than the
       inner VLAN count times the outer VLAN count, the outer
       VLAN ID is incremented first until the specified number
       of outer VLANs is exhausted, and then the inner VLAN ID
       is incremented. This continues in a round-robin fashion
       until the number of sessions is exhausted.

both - When the number of sessions is greater than the
       inner VLAN count times the outer VLAN count, the
       inner VLAN ID and outer VLAN ID increment at the
       same time. This continues in a round-robin fashion
       until the number of sessions is exhausted.
-force_lcp_renegotiation

Spirent Extension (for Spirent HLTAPI only).

Enables or disables the LCP Renegotiation. Possible values are “TRUE” and “FALSE”. The default is “FALSE”.

-lcp_proxy_mode

Spirent Extension (for Spirent HLTAPI only).

Specifies the proxy mode for lcp. Possible values are “none”, “lcponly” and “authentication”. The default is “none”. When it is set to “authentication”, argument “-auth_mode” must be PAP or CHAP.

Note

This argument is only available when “-mode” is set to LAC.

-expand

Spirent Extension (for Spirent HLTAPI only).

Determines whether to expand the specified L2TP device parameters into emulated L2TP device objects. It is used in Scaling test scenarios.

When set to true, a list of emulated device handles (handle_list) with enabled L2TP device configurations is created.

When set to false, only L2TP parameters are configured with no handle returned.

When expand argument is specified, only the following set of options are valid:

enable_authentication
hostname
remote_ipv6_addr
remote_ipv4_addr
remote_ipv4_addr_step_per_l2tp_node
remote_ipv6_addr_step_per_l2tp_node
tunnels_per_l2tp_node
tunnel_password
use_gateway_as_remote_ipv4addr
use_gateway_as_remote_ipv6addr
-remote_ipv4_addr_step_per_l2tp_node

Specifies the remote IPv4 address step per L2TP node. The default is 0.0.0.0

-enable_authentication

Specifies to enable/disable authentication. Possible values are true and false. The default is false.

-remote_ipv6_addr

Specifies the remote IPv6 Address. The default is ::

-remote_ipv4_addr

Specifies the remote IPv6 Address. The default is 0.0.0.0

-use_gateway_as_remote_ipv4_addr

Specifies to use the Gateway IP address as the Remote IP address. Only applies to the LAC. Possible values are true and false. The default is true.

-tunnels_per_l2tp_node

Specifies the tunnels per L2TP node. The default is 1

-tunnel_password

Specifies the tunnel password. The default is spirent

-remote_ipv6_addr_step_per_l2tp_node

Specifies the remote IPv6 address step per L2TP node. The default is ::

-use_gateway_as_remote_ipv6_addr

Specifies to use gateway address as remote IPv6 address or not. Possible values are true and false. The default is true.

Arguments Unsupported by Save as HLTAPI

The following Spirent HLTAPI arguments are currently not supported by the Save as HLTAPI function:

-qinq_incr_mode

Cisco-specific Arguments

The following arguments are specific to the Cisco HLTAPI but are not supported by the Spirent HLTAPI:

-avp_hide
-echo_rsp
-udp_dst_port
-avp_rx_connect_speed
-ctrl_chksum
-ctrl_retries
-data_chksum
-disconnect_rate
-init_ctrl_timeout
-ipcp_req_timeout
-length_bit
-max_ctrl_timeout
-max_outstanding
-no_call_timeout
-offset_bit
-offset_byte
-offset_len
-sequence_bit
-sess_distribution
-tun_distribution
-vlan_user_priority_count
-vlan_user_priority_step

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):

handles   A list of L2TP handles that identify the sessions and tunnels
          created by the ``sth::l2tp_config`` function.

handle_list
          The emulated device handles list with enabled L2TP configurations
          is created when expand is set true.

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

log       An error message (if the operation failed).

Description

The sth::l2tp_config function creates, enables, disables, modifies, or deletes an emulated L2TP session or tunnel on the specified test port of a Spirent HLTAPI chassis. Use the -mode argument to specify whether the port will be acting as a LAC or LNS. (See the -mode argument description for information about the modes.)

The Spirent TestCenter L2TPv2 Base Package emulates PPPoX clients using LAC and LNS devices to distribute traffic through tunnels across a network. The access concentrator (LAC) and Network Server (LNS) test devices accept incoming PPPoX clients. The DUT also terminates these clients and routes IP packets through tunnels. You can use L2TP to test an access concentrator with an external or built-in PPP server and an LNS server.

L2TP has two main components: 1) the L2TP Access Concentrator (LAC), which is the device that usually initiates calls, and 2) the L2TP Network Server (LNS), which is the server that terminates a call and authenticates the PPP stream.

L2TP uses control messages, which are used in the establishment, maintenance, and clearing of tunnels (that is, connections between the L2TP Access Concentrator and the L2TP Network Server), to accomplish L2TP over UDP on IP. The current implementation of L2TP supports data messages to encapsulate PPP frames carried over the tunnel for PPP on L2TP over UDP on IP.

Tunnels are set up through a process of negotiation in which the devices responsible for establishing the security arrive at an agreement on the authentication, integrity, and confidentiality methods that will be used to secure the data during communication across the tunnel.

If the creation/configuration/delete fails, Spirent TestCenter returns an error message. For example, if you try to configure a non-existing session handle using Modify mode, an error message is returned.

Examples

#### HLTAPI for Tcl ####

To configure L2TP on the specified port:

set returnedString_lns [sth::l2tp_config   \
                 -port_handle $hltLNSPort  \
                 -mode "lns" \
                 -num_tunnels 1 \
                 -tunnel_id_start 1 \
                 -session_id_start 1 \
                 -sessions_per_tunnel 1 \
                 -l2tp_dst_addr "5.5.5.55" \
              ]

set returnedString_lac [sth::l2tp_config   \
                 -port_handle $hltLACPort  \
                 -mode "lac" \
                 -tunnel_id_start 1 \
                 -session_id_start 1 \
                 -sessions_per_tunnel 1 \
                 -l2tp_dst_addr "5.5.5.55" \
                 -l2tp_src_addr "5.5.5.66" \
              ]

Note

There must already exist ports with handle hltLNSPort and hltLACPort.

Sample Output:

{{handles l2tp1} {status 1}}

To modify configured L2TP device on the specified port:

set l2tpv2_ret_modify [sth::l2tp_config\
            -port_handle                    $port1\
            -config_mode                    modify\
            -handle                         [keylget returnedString_lac handle] \
            -num_tunnels                    2 \
            -tunnel_id_start                2 \
            -sessions_per_tunnel            2\
            -session_id_start               2\
            -l2tp_src_addr                  100.1.1.3 \
            -l2tp_mac_addr                  "00:10:94:00:00:03"\
            -l2tp_mac_step                  "00:00:00:00:00:02"\
            -l2tp_dst_addr                  100.1.1.2 \
            -l2tp_src_count                 2\
            -l2tp_dst_count                 2 \
            -l2tp_dst_step                  0.0.0.2]

Note

Both -handle and -port_handle arguments must be specified for the modify mode.

Sample Output:

{procName l2tp_config} {status 1} {handles host1} {handle host1}

The following example uses the function in Scaling when -port_handle and -block_mode are specified:: This function creates devices and enables L2TP protocol.

set l2tpv2_ret [sth::l2tp_config
-mode lac
-port_handle $port1
-count 2
-block_mode ONE_DEVICE_PER_BLOCK
-block_name_index
 1
-vlan_id 444
-vlan_outer_id 333
-router_id 11.111.11.11
-router_id_step
 0.0.0.2
-mac_addr 00:11:11:11:11:11
-mac_addr_step 00:00:00:00:00:02
-mac_addr_step_per_port
 00:00:00:00:01:01
-mac_addr_step_per_vlan
 {“” 00:00:00:00:00:01}
-ip_step_per_port
 0.0.0.5
-ip_step_per_vlan
 {0.1.0.0 0.0.1.1}
-intf_ipv6_prefix_len
 65
-ipv6_step_per_vlan
 {::1 ::4}
-ipv6_step_per_port
 ::9
-intf_prefix_len
 22
-link_local_ipv6_step_per_port
 ::4
-link_local_ipv6_step_per_vlan
 {::1 ::2}
-name DEVICE_BLOCK_L2TPV2
-vlan_user_pri 3
-vlan_id_count 2
-vlan_id_repeatmode
 REPEAT_ACROSS_PORT
-vlan_outer_id_count
 1
-vlan_outer_user_pri
 4
-vlan_outer_id_repeatmode
 REPEAT_ACROSS_PORT
-router_id_ipv6
 0101::011
-router_id_ipv6_step
 ::1
-intf_ip_addr 11.111.11.11
-gateway_ip_addr
 11.111.11.1
-link_local_ipv6_addr
 2000::2
-link_local_ipv6_addr_step
 ::1
-intf_ipv6_addr
 1111::3e9
-intf_ipv6_addr_step
 ::1
-link_local_ipv6_prefix_len
 64
-gateway_ipv6_addr
 1111::1
-gateway_ipv6_addr_step
 ::1
-expand true
-enable_authentication
 true
-hostname l2tp
-remote_ipv6_addr
 2000::11
-remote_ipv4_addr
 10.1.1.1
-remote_ipv4_addr_step_per_l2tp_node
 0.0.0.1
-remote_ipv6_addr_step_per_l2tp_node
 ::
-tunnels_per_l2tp_node
 1
-tunnel_password
 spirent
-use_gateway_as_remote_ipv4addr
 false
-use_gateway_as_remote_ipv6addr
 false]

Sample Output:

{param_handle emulateddevicegenparams1} {status 1} {handle_list {emulateddevice1
emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5 emulateddevice6
emulateddevice7 emulateddevice8}} {handle {}} {handles {emulateddevice1
emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5 emulateddevice6
emulateddevice7 emulateddevice8}}

#### HLTAPI for Python ####

To configure L2TP on the specified port:

device_ret0 = sth.l2tp_config (
             l2_encap            = 'ethernet_ii_vlan',
             l2tp_src_count      = '10',
             l2tp_src_addr       = '192.85.1.3',
             l2tp_src_step       = '0.0.0.1',
             l2tp_dst_addr       = '192.85.1.1',
             l2tp_dst_step       = '0.0.0.0',
             username_wc         = '1',
             password_wc         = '1',
             hostname_wc         = '1',
             wildcard_pound_start= '10',
             wildcard_pound_end  = '11',
             wildcard_question_start= '4',
             wildcard_question_end= '8',
             wildcard_bang_start = '3',
             wildcard_bang_end   = '6',
             port_handle         = port_handle[0],
             max_outstanding     = '100',
             disconnect_rate     = '1000',
             mode                = 'lac',
             attempt_rate        = '100',
             vlan_id             = '100',
             vlan_user_priority  = '7',
             vlan_id_step        = '0',
             ppp_auto_retry      = 'FALSE',
             max_terminate_req   = '10',
             auth_req_timeout    = '3',
             username            = 'spirent#',
             ppp_retry_count     = '65535',
             max_ipcp_req        = '10',
             echo_req_interval   = '10',
             password            = 'spirent?',
             config_req_timeout  = '3',
             terminate_req_timeout= '3',
             max_echo_acks       = '0',
             auth_mode           = 'chap',
             echo_req            = 'FALSE',
             enable_magic        = 'TRUE',
             l2tp_mac_addr       = '00:10:94:00:00:05',
             l2tp_mac_step       = '00:00:00:00:00:01',
             hello_interval      = '60',
             hello_req           = 'FALSE',
             force_lcp_renegotiation= 'FALSE',
             tunnel_id_start     = '1',
             num_tunnels         = '20',
             tun_auth            = 'TRUE',
             session_id_start    = '1',
             redial              = 'FALSE',
             avp_framing_type    = 'sync',
             redial_max          = '1',
             redial_timeout      = '1',
             sessions_per_tunnel = '30',
             avp_tx_connect_speed= '56000',
             udp_src_port        = '1701',
             lcp_proxy_mode      = 'none',
             secret              = 'spirent',
             hostname            = 'server.spirent.com!',
             rws                 = '4');

Sample Output:

{'status': '1', 'procName': 'l2tp_config', 'handles': 'host3', 'handle': 'host3'}

#### HLTAPI for Perl ####

To configure L2TP on the specified port:

my %device_ret0 = sth::l2tp_config (
             l2_encap            => 'ethernet_ii_vlan',
             l2tp_src_count      => '10',
             l2tp_src_addr       => '192.85.1.3',
             l2tp_src_step       => '0.0.0.1',
             l2tp_dst_addr       => '192.85.1.1',
             l2tp_dst_step       => '0.0.0.0',
             username_wc         => '1',
             password_wc         => '1',
             hostname_wc         => '1',
             wildcard_pound_start=> '10',
             wildcard_pound_end  => '11',
             wildcard_question_start=> '4',
             wildcard_question_end=> '8',
             wildcard_bang_start => '3',
             wildcard_bang_end   => '6',
             port_handle         => "$hport[1]",
             max_outstanding     => '100',
             disconnect_rate     => '1000',
             mode                => 'lac',
             attempt_rate        => '100',
             vlan_id             => '100',
             vlan_user_priority  => '7',
             vlan_id_step        => '0',
             ppp_auto_retry      => 'FALSE',
             max_terminate_req   => '10',
             auth_req_timeout    => '3',
             username            => 'spirent#',
             ppp_retry_count     => '65535',
             max_ipcp_req        => '10',
             echo_req_interval   => '10',
             password            => 'spirent?',
             config_req_timeout  => '3',
             terminate_req_timeout=> '3',
             max_echo_acks       => '0',
             auth_mode           => 'chap',
             echo_req            => 'FALSE',
             enable_magic        => 'TRUE',
             l2tp_mac_addr       => '00:10:94:00:00:05',
             l2tp_mac_step       => '00:00:00:00:00:01',
             hello_interval      => '60',
             hello_req           => 'FALSE',
             force_lcp_renegotiation=> 'FALSE',
             tunnel_id_start     => '1',
             num_tunnels         => '20',
             tun_auth            => 'TRUE',
             session_id_start    => '1',
             redial              => 'FALSE',
             avp_framing_type    => 'sync',
             redial_max          => '1',
             redial_timeout      => '1',
             sessions_per_tunnel => '30',
             avp_tx_connect_speed=> '56000',
             udp_src_port        => '1701',
             lcp_proxy_mode      => 'none',
             secret              => 'spirent',
             hostname            => 'server.spirent.com!',
             rws                 => '4');

Sample Output:

$VAR1 = 'procName';
$VAR2 = 'l2tp_config';
$VAR3 = 'handles';
$VAR4 = 'host4';
$VAR5 = 'handle';
$VAR6 = 'host4';
$VAR7 = 'status';
$VAR8 = '1';

Note

You can generate outgoing usernames and passwords based on wildcard replacements. The following example generates 50 user names and passwords:

sth::l2tp_config -port_handle $hltLACPort  \
-mode "lac" \
-num_tunnels $num_tunnels \
-username User# \
-password Pass? \
-wildcard_pound_start 1  \
-wildcard_pound_end 50  \
-wildcard_question_start 1  \
-wildcard_question_end 50  \

The # character represents a counter. For example, define a counter to start at 1 (-wildcard_pound_start 1), run to 50 (-wildcard_pound_end), and increment by 1. Then, in the -username argument, specify user#, which would be replaced with User1, User2,and so on, when authentication begins.

The # wildcard is replaced with a counter, starting at 1. For example, User# becomes User1, User2, and so on. If you do not specify #, then no substitution will take place.

End of Procedure Header

sth::l2tp_control

Purpose

Starts, stops, and restarts the emulated L2TP session or tunnel.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::l2tp_control
  [-action {connect|disconnect|reset|clear|pause|resume|retry}  M]
  [-handle <l2tp_handle_list>  M]

Arguments

-handle

Specifies a list of handles for L2TP sessions or tunnels to be controlled. That is, the L2TP sessions or tunnels to start, stop, or restart. This argument is Mandatory .

-mode

Specifies the action to be taken. This argument is mandatory. Possible values are:

connect      Start the configured sessions and tunnels

disconnect   Tears down established sessions and tunnels

reset        Stops and then starts all L2TpoX sessions on the
             specified device. A session is not notified of
             termination, and a Terminate Request packet
             is not sent to the peers.

clear        Clears the status and statistics of the PPP
             sessions

pause        Pauses all the sessions

resume       Resumes all the sessions

retry        Attempts to connect PPP sessions that have
             previously failed to establish

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 sth::l2tp_control function controls the starting and of L2TP sessions, and restoring and tearing down of L2TP tunnels. When you call the sth::l2tp_control function, you specify either a handle. Spirent HLTAPI applies the specified action to the specified session or tunnel.

Examples

#### HLTAPI for Tcl ####

To start the LAC/LNS:

# Assume that we are already given L2TP LAC/LNS Session handle lacSessionHandle
# or lnsSessionHandle
 set lacStatus [::sth::l2tp_control -mode connect  -handle $lacSessionHandle]
 set lnsStatus [::sth::l2tp_control -mode connect  -handle $lnsSessionHandle]

To stop the LAC/LNS:

set lacStatus [::sth::l2tp_control -mode stop  -handle $lacSessionHandle]
set lnsStatus [::sth::l2tp_control -mode stop  -handle $lnsSessionHandle]

Sample Output:

{status 1}

#### HLTAPI for Python ####

To start the configured sessions and tunnels:

my %ctrl_ret1 = sth::l2tp_control (
             handle              => "$device_list",
             action              => 'connect');

Sample Output:

{'status': '1'}

#### HLTAPI for Perl ####

To start the configured sessions and tunnels:

my %ctrl_ret3 = sth::l2tp_control (
             handle              => "$device_list",
             action              => 'connect');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';

End of Procedure Header

sth::l2tp_stats

Purpose

Returns information about the L2TPoX sessions configured on the specified test port. Statistics include the connection status and number and type of messages sent and received from the specified port.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::l2tp_stats
   [-handle <l2tp_handle>  M]
   [-mode   { aggregate | session | tunnel}]

Arguments

-handle

The L2TP session or tunnel for which you want information. This argument is Mandatory .

-mode

Specifies the kind of information you want to see. Possible values are:

aggregate  Returns transmitted and received statistics for
           all configured L2TP sessions associated with the
           specified port and a status value (1 for success).

session   Returns transmitted and received statistics for only
          the L2TP sessions specified with -handle.

tunnel - returns transmitted and received statistics for only
         the L2TP tunnels specified with -handle.

Note

Session statistics are only valid after the L2TP sessions are established. They will not be returned nor accessible until you are connected.

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         Retrieves a value indicating the success (1) or failure
                (0) of the operation.

log            Retrieves a message describing the last error that
               occurred during the operation. If the operation was
               successful - {status 1} - the log value is null

The following keys are returned when you specify -mode aggregate:

*** Aggregate stats ***
aggregate.atm_mode......Specifies whether the port is in ATM mode
                                (currently not supported)
aggregate.avg_setup_time........Average time :mandatory:`Mandatory` to bring a session
                                up
aggregate.chap_auth_rsp_tx......Number of CHAP messages sent
aggregate.chap_auth_chal_rx.....The number of CHAP messages received*
aggregate.chap_auth_succ_rx......The number of CHAP messages received*
aggregate.chap_auth_fail_rx......The number of CHAP messages received*

aggregate.connecting............PPPoE clients that are connecting. If
                                aggregate.connecting is 1, then there are
                                sessions connecting on the port.

aggregate.connected.............All sessions that have finished with NCP
                                negotiation. If aggregate.connected is 1,
                                then PPPoX has finished attempting all
                                configured PPPoX sessions.

aggregate.idle..................The sessions have been disconnected or
                                terminated. If aggregate.idle is 1, then
                                the port state is idle.

aggregate.disconnecting.........If aggregate.disconnecting is 1, then L2TP
                                sessions are disconnecting.

aggregate.connect_attempts......Number of sessions attempted
aggregate.connect_success.......Number of sessions that connected
                                successfully
aggregate.disconnect_failed.....Number of sessions that failed to
                                disconnect
aggregate.disconnect_success....Number of sessions that disconnected
                                successfully
aggregate.echo_req_rx...........Number of Echo Requests received
aggregate.echo_rsp_tx...........Number of Echo Replies sent

aggregate.lcp_cfg_req_rx........Number of LCP Configure-Request messages
                                received
aggregate.lcp_cfg_req_tx........Number of LCP Configure-Request messages
                                sent
aggregate.lcp_cfg_rej_rx........Number of LCP Configure-Reject messages
                                received
aggregate.lcp_cfg_rej_tx........Number of LCP Configure-Reject messages
                                sent
aggregate.lcp_cfg_ack_rx........Number of LCP Configure-ACK messages
                                received
aggregate.lcp_cfg_ack_tx........Number of LCP Configure-ACK messages
                                sent
aggregate.lcp_cfg_nak_rx........Number of LCP Configure-NAK messages
                                received
aggregate.lcp_cfg_nak_tx........Number of LCP Configure-NAK messages sent
aggregate.max_setup_time........Maximum time to bring a session up
aggregate.min_setup_time........Minimum time to bring a session up
aggregate.num_sessions..........Number of sessions configured
aggregate.sessions_up...........Number of sessions currently active
aggregate.sessions_down.........Number of sessions that failed to connect
aggregate.success_setup_rate....Number of sessions per second that have
                                been established
aggregate.term_ack_rx...........Number of LCP Terminate-ACK messages
                                received
aggregate.term_ack_tx...........Number of LCP Terminate-ACK messages
                                sent
aggregate.term_req_rx...........Number of LCP Terminate-Request messages
                                received
aggregate.term_req_tx...........Number of LCP Terminate-Request messages
                                sent
aggregate.zlb_tx............... Number of Zero-Length Body (ZLB) Messages sent.
aggregate.sccrq_tx..............Number of Start-Control-Connection-Request
                                (SCCRQ) packets transmitted.
aggregate.scccn_tx..............Number of Start-Control-Connection-
                                Connected (SCCCN) packets transmitted.
aggregate.sccrp_tx..............Number of Start-Control-Connection-Reply
                                (SCCRP) packets transmitted.
aggregate.stopccn_tx............Number of Stop-Control-Connection-
                                Notification (StopCCN)
                                packets transmitted.
aggregate.hello_tx..............Number of Hello packets transmitted
aggregate.icrq_tx...............Number of Incoming-Call-Request (ICRQ)
                                packets transmitted
aggregate.icrp_tx...............Number of Incoming-Call-Reply (ICRP)
                                packets transmitted
aggregate.iccn_tx...............Number of Incoming-Call-Connected (ICCN)
                                packets transmitted
aggregate.cdn_tx................Number of Call-Disconnect-Notify (CDN)
                                packets transmitted
aggregate.wen_tx............... Number of WAN-Error-Notify (WEN) packets
                                transmitted
aggregate.sli_tx................Number of Set-Link-Info (SLI) packets
                                transmitted
aggregate.zlb_rx................ Number of Zero-Length Body (ZLB) Messages
                              received
aggregate.sccrp_rx..............Number of Start-Control-Connection-Reply
                                (SCCRP) packets received
aggregate.scccn_rx..............Number of Start-Control-Connection-
                                Connected (SCCCN) packets received
aggregate.sccrq_rx..............Number of Start-Control-Connection-Request
                                (SCCRQ) packets received
aggregate.stopccn_rx............Number of Stop-Control-Connection-
                                Notification (StopCCN) packets received
aggregate.hello_rx..............Number of Hello packets received
aggregate.icrq_rx...............Number of Incoming-Call-Request (ICRQ)
                                packets received
aggregate.icrp_rx...............Number of Incoming-Call-Reply (ICRP)
                                packets received.
aggregate.iccn_rx...............Number of Incoming-Call-Connected (ICCN)
                                packets received
aggregate.cdn_rx................Number of Call-Disconnect-Notify (CDN)
                                packets received
aggregate.wen_rx................Number of WAN-Error-Notify (WEN) packets
                                received.
aggregate.sli_rx................Number of Set-Link-Info (SLI) packets
                                received.
aggregate.tx_pkt_acked......... Number of ACK packets received.
aggregate.tunnels_up........... Number of tunnels on this port that are in
                                the established state

The following keys are returned when you specify -mode session:

session.<session ID>.icrq_tx....
                                Number of Incoming-Call-Request (ICRQ)
                                packets transmitted
session.<session ID>.icrp_tx.....
                                Number of Incoming-Call-Reply (ICRP)
                                packets transmitted
session.<session ID>.iccn_tx...............
                                Number of Incoming-Call-Connected (ICCN)
                                packets transmitted
session.<session ID>.cdn_tx................
                                Number of Call-Disconnect-Notify (CDN)
                                packets transmitted
session.<session ID>.icrq_rx...............
                                Number of Incoming-Call-Request (ICRQ)
                                packets received
session.<session ID>.icrp_rx...............
                                Number of Incoming-Call-Reply (ICRP)
                                packets received
session.<session ID>.iccn_rx...............
                                Number of Incoming-Call-Connected (ICCN)
                                packets received
session.<session ID>.cdn_rx................
                                Number of Call-Disconnect-Notify (CDN)
                                packets received

The following keys are returned when you specify -mode tunnel:

tunnel.<tunnel ID>.scccn_tx.....
                                Number of Start-Control-Connection-
                                Connected (SCCCN) packets transmitted.
tunnel.<tunnel ID>.sccrp_tx.....
                                Number of Start-Control-Connection-Reply
                                (SCCRP) packets transmitted.
tunnel.<tunnel ID>.stopccn_tx............
                                Number of Stop-Control-Connection-
                                Notification (StopCCN) packets transmitted.
tunnel.<tunnel ID>.hello_tx..............
                                Number of Hello packets transmitted
tunnel.<tunnel ID>.wen_tx...............
                                Number of WAN-Error-Notify (WEN) packets
                                transmitted
tunnel.<tunnel ID>.sli_tx................
                                Number of Set-Link-Info (SLI) packets
                                transmitted
tunnel.<tunnel ID>.sccrp_rx..............
                                Number of Start-Control-Connection-Reply
                                (SCCRP) packets received
tunnel.<tunnel ID>.scccn_rx..............
                                Number of Start-Control-Connection-
                                Connected (SCCCN) packets received
tunnel.<tunnel ID>.sccrq_rx..............
                                Number of Start-Control-Connection-Request
                                (SCCRQ) packets received
tunnel.<tunnel ID>.stopccn_rx............
                                Number of Stop-Control-Connection-
                                Notification (StopCCN) packets received
tunnel.<tunnel ID>.hello_rx..............
                                Number of Hello packets received
tunnel.<tunnel ID>.wen_rx................
                                Number of WAN-Error-Notify (WEN) packets
                                received.
tunnel.<tunnel ID>.sli_rx................
                                Number of Set-Link-Info (SLI) packets
                                received.

tunnel.<tunnel ID>.tx_pkt_acked..Number of ACK packets received.

The following keys are specific to the Cisco HLTAPI but are not supported by the Spirent HLTAPI:

aggregate.out_of_order_rx.......
aggregate.out_of_win_rx
aggregate.duplicate_rx
aggregate.in_order_rx
aggregate.retransmits
aggregate.tunnels_neg

session.<session ID>.chap_auth_chal_rx
session.<session ID>.chap_auth_fail_rx
session.<session ID>.chap_auth_rsp_tx
session.<session ID>.chap_auth_succ_rx
session.<session ID>.completed
session.<session ID>.connect_success
session.<session ID>.echo_req_rx
session.<session ID>.echo_rsp_tx
session.<session ID>.failed_connect
session.<session ID>.failed_disconnect
session.<session ID>.ip_addr
session.<session ID>.ipcp_cfg_ack_rx
session.<session ID>.ipcp_cfg_ack_tx
session.<session ID>.ipcp_cfg_nak_rx
session.<session ID>.ipcp_cfg_nak_tx
session.<session ID>.ipcp_cfg_rej_rx
session.<session ID>.ipcp_cfg_rej_tx
session.<session ID>.ipcp_cfg_req_rx
session.<session ID>.ipcp_cfg_req_tx
session.<session ID>.lcp_cfg_ack_rx
session.<session ID>.lcp_cfg_ack_tx
session.<session ID>.lcp_cfg_nak_rx
session.<session ID>.lcp_cfg_nak_tx
session.<session ID>.lcp_cfg_rej_rx
session.<session ID>.lcp_cfg_rej_tx
session.<session ID>.lcp_cfg_req_rx
session.<session ID>.lcp_cfg_req_tx
session.<session ID>.pap_auth_ack_rx
session.<session ID>.pap_auth_nak_rx
session.<session ID>.pap_auth_req_tx
session.<session ID>.setup_time
session.<session ID>.term_ack_rx
session.<session ID>.term_ack_tx
session.<session ID>.term_req_rx
session.<session ID>.term_req_tx
session.<session ID>.tx_pkt_acked

tunnel.<tunnel ID>.zlb_tx
tunnel.<tunnel ID>.icrq_tx
tunnel.<tunnel ID>.icrp_tx
tunnel.<tunnel ID>.iccn_tx
tunnel.<tunnel ID>.cdn_tx
tunnel.<tunnel ID>.icrq_rx
tunnel.<tunnel ID>.icrp_rx
tunnel.<tunnel ID>.iccn_rx
tunnel.<tunnel ID>.cdn_rx
tunnel.<tunnel ID>.zlb_rx
tunnel.<tunnel ID>.out_of_order_rx
tunnel.<tunnel ID>.out_of_win_rx
tunnel.<tunnel ID>.duplicate_rx
tunnel.<tunnel ID>.in_order_rx
tunnel.<tunnel ID>.retransmits

Description

Use the sth::l2tp_stats function to specify statistics retrieval mode as either aggregate for all configured sessions, on a per session (call) basis, or on a per tunnel basis. When specifying per session stats, the session ID is the local call assigned by the local node. Similarly, when specifying per tunnel stats, the tunnel ID is the local tunnel ID assigned by the local node.

Examples

#### HLTAPI for Tcl ####

When you call sth::l2tp_stats, the contents of the returned keyed list depends on the mode you specified and the status of the call. For example:

sth::l2tp_stats -handle $ lnsSessionHandle -mode aggregate

Sample Output:

{status 1} {aggregate {{term_req_rx 0} {tunnels_up 0} {scccn_tx 0} {cdn_rx 0}
{tx_pkt_acked 0} {lcp_cfg_rej_tx 0} {icrq_tx 0} {stopccn_rx 0} {iccn_tx 0}
{zlb_rx 0} {term_req_tx 0} {sccrp_rx 0} {lcp_cfg_ack_rx 0} {hello_rx 0}
{echo_req_rx 0} {cdn_tx 0}{wen_rx 0} {max_setup_time 0} {stopccn_tx 0}
{echo_rsp_tx 0} {icrp_rx 0} {sli_rx 0}{sessions_up 0} {zlb_tx 0}
{lcp_cfg_req_rx 0} {sccrp_tx 0} {lcp_cfg_ack_tx 0}
{hello_tx 0} {lcp_cfg_nak_rx 0} {min_setup_time 0} {success_setup_rate 0}
{wen_tx 0} {sccrq_rx 0} {term_ack_rx 0} {icrp_tx 0} {sli_tx 0} {scccn_rx 0}
{sessions_down 1}{lcp_cfg_rej_rx 0} {icrq_rx 0} {lcp_cfg_req_tx 0}
{lcp_cfg_nak_tx 0} {avg_setup_time 0} {iccn_rx 0} {term_ack_txv 0}
{sccrq_tx 1} {connecting 0} {connected 0} {disconnecting 0}
{idle 1}}} {procName l2tp_status} {handles host2}

#### HLTAPI for Python ####

Sample Input::
results_ret1 = sth.l2tp_stats (
handle = device, mode = ‘aggregate’);

Sample Output:

{'status': '1', 'procName': 'l2tp_status', 'handles': 'host4', 'aggregate'::
{'tunnels_up': '0', 'hello_tx': '0', 'cdn_rx': '0', 'cdn_tx': '0',
'lcp_cfg_ack_rx': '0', 'lcp_cfg_ack_tx': '0', 'chap_rx': '0',
'disconnect_success': '0', 'max_setup_time': '0', 'stopccn_rx': '0',
'term_ack_rx': '0', 'stopccn_tx': '0', 'icrq_rx': '0', 'min_setup_time': '0',
'avg_setup_time': '0', 'icrq_tx': '0', 'scccn_tx': '0', 'echo_reply_rx': '0',
'ipcp_rx': '0', 'sli_rx': '0', 'lcp_cfg_rej_rx': '0', 'lcp_cfg_req_tx': '0',
'iccn_rx': '0', 'ipcp_tx': '0', 'sli_tx': '0', 'tx_pkt_acked': '0',
'scccn_rx': '0', 'connect_success': '0', 'disconnecting': '0',
'lcp_cfg_rej_tx': '0', 'lcp_cfg_req_rx': '0', 'session_status': 'CONNECTING',
'icrp_rx': '0', 'echo_req_tx': '0', 'sccrq_rx': '0', 'echo_req_rx': '0',
'icrp_tx': '0', 'sessions_up': '0', 'connecting': '1', 'connected': '0',
'sccrp_tx': '0', 'iccn_tx': '0', 'wen_rx': '0', 'sccrp_rx': '0',
'success_setup_rate': '0', 'wen_tx': '0', 'term_ack_txv': '0',
'term_req_tx': '0', 'lcp_cfg_nak_rx': '0', 'term_req_rx': '0', 'sccrq_tx': '0',
'idle': '0', 'hello_rx': '0', 'sessions_down': '240', 'zlb_tx': '0',
'chap_tx': '0', 'lcp_cfg_nak_tx': '0', 'zlb_rx': '0'}}

#### HLTAPI for Perl ####

Sample Input::
my %results_ret1 = sth::l2tp_stats (
handle => “$device”, mode => ‘aggregate’);

Sample Output:

$VAR1 = 'procName';
$VAR2 = 'l2tp_status';
$VAR3 = 'handles';
$VAR4 = 'host4';
$VAR5 = 'status';
$VAR6 = '1';
$VAR7 = 'aggregate';
$VAR8 = {
          'hello_tx' => '0',
          'echo_req_rx' => '0',
          'term_req_tx' => '0',
          'iccn_rx' => '0',
          'tunnels_up' => '0',
          'lcp_cfg_req_rx' => '0',
          'sessions_up' => '0',
          'disconnect_success' => '0',
          'cdn_tx' => '0',
          'lcp_cfg_nak_rx' => '0',
          'cdn_rx' => '0',
          'scccn_tx' => '0',
          'sccrp_rx' => '0',
          'lcp_cfg_rej_tx' => '0',
          'icrq_tx' => '0',
          'icrq_rx' => '0',
          'wen_tx' => '0',
          'echo_reply_rx' => '0',
          'session_status' => 'CONNECTING',
          'connecting' => '1',
          'min_setup_time' => '0',
          'stopccn_tx' => '0',
          'tx_pkt_acked' => '0',
          'iccn_tx' => '0',
          'connect_success' => '0',
          'term_ack_rx' => '0',
          'lcp_cfg_ack_rx' => '0',
          'sli_tx' => '0',
          'idle' => '0',
          'hello_rx' => '0',
          'chap_rx' => '0',
          'scccn_rx' => '0',
          'disconnecting' => '0',
          'lcp_cfg_req_tx' => '0',
          'zlb_rx' => '0',
          'wen_rx' => '0',
          'ipcp_rx' => '0',
          'sccrq_tx' => '0',
          'term_req_rx' => '0',
          'stopccn_rx' => '0',
          'ipcp_tx' => '0',
          'icrp_rx' => '0',
          'connected' => '0',
          'icrp_tx' => '0',
          'echo_req_tx' => '0',
          'lcp_cfg_ack_tx' => '0',
          'sessions_down' => '240',
          'sccrp_tx' => '0',
          'lcp_cfg_rej_rx' => '0',
          'sccrq_rx' => '0',
          'chap_tx' => '0',
          'success_setup_rate' => '0',
          'lcp_cfg_nak_tx' => '0',
          'max_setup_time' => '0',
          'zlb_tx' => '0',
          'term_ack_txv' => '0',
          'avg_setup_time' => '0',
          'sli_rx' => '0'
        };

End of Procedure Header