PPPoX Server Functions¶
sth::pppox_server_config¶
Purpose¶
Creates, modifies, or deletes PPPoX server session blocks for the specified Spirent HLTAPI port or handle.
A PPPoX sever is responsible for the dynamic allocation and serving of network addresses to PPPoX clients. It responds to the connection request from the client.
Synopsis¶
Note
- M indicates that the argument is Mandatory .
- S indicates the argument is for
scaling
scenarios.
sth::pppox_server_config [-mode {create|modify|activate|reset} M] [-port_handle <port_handle>] [-handle <pppox_server_block_handle>] [-attempt_rate {<1-1000>] [-auth_mode { none | pap | chap | pap_or_chap }] [-chap_reply_timeout <1-65535>] [-config_req_timeout <1-65535>] [-disconnect_rate <1-1000>] [-echo_req {0 | 1}] [-echo_req_interval < 1-65535 >] [-echo_vendor_spec_tag_in_pado {0 | 1}] [-echo_vendor_spec_tag_in_pads {0 | 1}] [-encap { ethernet_ii | ethernet_ii_vlan | ethernet_ii_qinq | vc_mux| llcsnap }] [-enable_osi {0 | 1}] [-enable_mpls {0 | 1}] [-fsm_max_naks <1-65535>] [-force_server_connect_mode {0 | 1}] [-include_id {0 | 1}] [-ip_cp { ipv4_cp | ipv6_cp | ipv4v6_cp }] [-intf_ip_addr <a.b.c.d>] [-intf_ip_addr_step <a.b.c.d>] [-intf_ip_prefix_length <0-32>] [-gateway_ip_addr <a.b.c.d>] [-intf_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>] [-intf_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>] [-intf_ipv6_prefix_length <0-128>] [-gateway_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>] [-gateway_ipv6_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>] [-ipcp_req_timeout <1-65535>] [-ipv4_pool_addr_start <a.b.c.d>] [-ipv4_pool_addr_prefix_len <1-32>] [-ipv4_pool_addr_count <1-65535>] [-ipv4_pool_addr_step <1-65535>] [-ipv6_pool_prefix_start <aaaa:bbbb:cccc:dddd::>] [-ipv6_pool_prefix_step <aaaa:bbbb:cccc:dddd::>] [-ipv6_pool_intf_id_start <::eeee:ffff:gggg:hhhh>] [-ipv6_pool_intf_id_step <::eeee:ffff:gggg:hhhh>] [-ipv6_pool_prefix_len <0-128>] [-ipv6_pool_addr_count <1-65535>] [-lcp_mru <128-65535>] [-local_magic {0 | 1}] [-mac_addr < aa:bb:cc:dd:ee:ff >] [-mac_addr_step < aa:bb:cc:dd:ee:ff >] [-max_configure_req <1-65535>] [-max_chap_req_attempt <1-65535>] [-max_echo_acks <0-65535>] [-max_ipcp_req <1-65535>] [-max_outstanding <2- 65535>] [-max_payload_tag_enable {0 | 1}] [-max_terminate_req <1- 65535>] [-mru_neg_enable {0 | 1}] [-num_sessions <1-65535>] [-pap_req_timeout <1-65535>] [-protocol < pppoe | pppoa | pppoeoa >] [-pvc_incr_mode < vci | vpi | both >] [-password] [-password_wildcard {0 | 1}] [-qinq_incr_mode < inner | outer | both >] [-service_name < service_name >] [-server_inactivity_timer <1-65535>] [-term_req_timeout <1-65535>] [-username <username>] [-username_wildcard {0 | 1}] [-unconnected_session_threshold <0-65535>] [-vlan_id <0-4095>] [-vlan_id_step <1-4095>] [-vlan_id_count <1-4096>] [-vlan_cfi {0 | 1}] [-vlan_user_priority <0-7>] [-vlan_id_outer <0-4095>] [-vlan_id_outer_step <0-4095>] [-vlan_id_outer_count <1-4096>] [-vlan_outer_cfi {0 | 1}] [-vlan_outer_user_priority <0-7>] [-vci <0-65535>] [-vci_count <1-65536 >] [-vci_step <0-255>] [-vpi <0-255>] [-vpi_count < 1-256 >] [-vpi_step <0-255>] [-wildcard_bang_start <0-65535>] [-wildcard_bang_end <0-65535>] [-wildcard_dollar_start <0-65535>] [-wildcard_dollar_end <0-65535>] [-wildcard_pound_start <0-65535>] [-wildcard_pound_end <0-65535>] [-wildcard_pound_fill <0-9>] [-wildcard_question_end <0-65535>] [-wildcard_question_start <0-65535>] [-wildcard_question_fill <0-9>] [-wildcard_bang_fill <0-9>] [-wildcard_dollar_fill <0-9>] [-expand {true|false} S] [-ac_name <ANY>] [-emulation_type {server}] [-enable_max_payload_tag {true|false}] [-ipv4_addr_pool_count <1-65535>] [-ipv4_addr_pool_start <IPV4>] [-ipv4_addr_pool_step <NUMERIC>] [-ipv6_addr_pool_count <1-65535>] [-ipv6_addr_pool_int_id_start <IPV6>] [-ipv6_addr_pool_int_id_step <IPV6>] [-ipv6_addr_pool_prefix_step <IPV6>] [-ipv6_addr_pool_prefix_start <IPV6>] [-max_payload_bytes <0-65535>] [-remote_or_session_id <ANY>]
Arguments¶
-
-mode
¶
Specifies the action to perform. Possible values are create, modify, and reset. This argument is Mandatory . The modes are described below:
create - Configures PPPoX server session blocks on the port specified by the -port_handle argument. modify - Changes the configuration for the PPPoX server block identified by the -handle argument. activate - Used for ``Scaling`` scenarios. 1. Enables PPPoE devices and configures PPPoE server parameters for the devices created via the sth::emulation_device_config function. This mode requires the value of param_handle as the input to the -handle option. Use this mode for ``Scaling`` scenarios. Refer to -count and -expand options under the ``sth::pppox_server_config`` function for more information. For this mode, only the following set of options are valid:: ac_name auth_mode echo_req emulation_type enable_max_payload_tag ipv6_addr_pool_count ipv6_addr_pool_int_id_start ipv6_addr_pool_prefix_start ipv4_addr_pool_start include_id password username ipv6_addr_pool_int_id_step max_payload_bytes ipv6_addr_pool_prefix_step ipv4_addr_pool_count service_name max_echo_acks ipv4_addr_pool_step remote_or_session_id echo_req_interval ip_cp lower_encap 2. Creates devices and enables PPPoE protocol. Requires -port_handle and -block_mode options. For this mode, the following options are required/supported along with the options specified above:: -count -block_mode -block_name_index -name -vlan_id -vlan_outer_id -vlan_user_pri -vlan_id_count -vlan_id_repeatmode -vlan_outer_id_count -vlan_outer_user_pri -vlan_outer_id_repeatmode -router_id -router_id_step -router_id_ipv6 -router_id_ipv6_step -intf_ip_addr -intf_ip_addr_step -intf_prefix_len -gateway_ip_addr -gateway_ip_addr_step -mac_addr -mac_addr_step -link_local_ipv6_addr -link_local_ipv6_addr_step -intf_ipv6_addr -intf_ipv6_addr_step -intf_ipv6_prefix_len -link_local_ipv6_prefix_len -gateway_ipv6_addr -gateway_ipv6_addr_step -mac_addr_step_per_port -mac_addr_step_per_vlan -ip_step_per_port -ip_step_per_vlan -ipv6_step_per_vlan -ipv6_step_per_port -link_local_ipv6_step_per_port -link_local_ipv6_step_per_vlan .. note:: Please refer to the emulation_device_config documentation. reset - Deletes the PPPoX servers specified by -handle.
-
-port_handle
¶
Specifies the handle of the port on which the PPPoX server(s) is to be created when -mode is set to create. This argument is Mandatory for create mode only.
-
-handle
¶
Specifies the handle of the PPPoX server group to use when -mode is set to “modify” or “reset.” This argument is Mandatory for modify and reset mode. The handle is returned by the
sth::pppox_server_config
function.
-
-attempt_rate
¶
Specifies the PPP attempt rate, in seconds, for all PPPoX servers on this port. This is a port-wide option. Possible values range from 1 to 1000. The default value is 100.
-
-auth_mode
¶
Specifies the authentication mode to use. Possible values are listed below:
none - No authentication. This is the default. pap - Password Authentication Protocol (PAP). chap - Challenge Handshake Authentication Protocol (CHAP) MD5.
-
-chap_reply_timeout
¶
Specifies the timeout wait period (in seconds) for the PPPoX client to send a CHAP response. Possible values range from 1 to 65535. The default value is 3.
-
-config_req_timeout
¶
Specifies the timeout value in seconds for acknowledgement of a Configure-Request or Terminate Request. Possible values range from 1 to 65535. The default value is 3.
-
-disconnect_rate
¶
Specifies the disconnect rate at which PPPoX servers are disconnected. This option is a port-wide option. Possible vales range from 1 to 1000. The default value is 1000.
-
-echo_req
¶
Enables or disables echo requests. Possible values are 0 (disable) and 1 (enable). The default value is 0.
-
-echo_req_interval
¶
Specifies the time interval in seconds for sending Link Control Protocol (LCP) echo requests. Possible values range from 1 to 65535. The default value is 10. This argument is available when -echo_req is set to 1.
-
-echo_vendor_spec_tag_in_pado
¶
Enables or disables echo vendor-specific tag in PPPoE Active Discovery Offer (PADO) message. Possible values are 0 (disable) and 1 (enable). The default value is 0.
-
-echo_vendor_spec_tag_in_pads
¶
Enables or disables echo vendor-specific tag in PPPoE Active Discovery Session-confirmation (PADS) message. Possible values are 0 (disable) and 1 (enable). The default value is 0.
-
-encap
¶
Identifies the type of Layer2 encapsulation to use. Possible values are described below:
ethernet_ii - Ethernet II. This option supports Ethernet encapsulation ethernet_ii_vlan - Ethernet II with a single VLAN tag. This option supports Ethernet encapsulation. You can use the -vlan_* arguments to define a VLAN interface. ethernet_ii_qinq - Ethernet II with two VLAN tags. This option supports Ethernet encapsulation. You can use the -vlan_outer_* and -vlan_* arguments to define a Q-in-Q interface vc_nux - Specifies ATM encapsulation to VC Multiplexed. Virtual Circuit Multiplexing (VC_MUX) is one of the two mechanisms or identifying the protocol carried in ATM Adaptation Layer5 (AAL5) frame. This option is available for ATM cards. Use the -vci_* arguments and -vpi_* arguments to define an ATM interface llcsnap - Specifies ATM encapsulation to LLC Encapsulated. llcsnap is the other mechanism for identifying the protocol carried in AAL5 frame. This option is available for ATM cards. Use the -vci_* arguments and -vpi_* arguments to define an ATM interface
Note
When setting PPP over Ethernet over ATM (PPPoEoA) encapsulation, you can set the Layer 2 encapsulation type to the combination of {ethernet_ii|ethernet_ii_vlan|ethernet_ii_qinq} and {vc_mux|llcsnap}. You can set PPPoEoA encapsulation using -protocol pppoeoa. The default value is ethernet_ii.
-
-enable_osi
¶
Enables or disables the Network Layer Control Protocol (NLCP) required for OSI protocols. Possible values are 0 (disable) and 1 (enable). The default value is 0.
-
-enable_mpls
¶
Enables or disables a control protocol for the traffic going through MPLS tunnels. Possible values are 0 (disable) and 1 (enable). The default value is 0
-
-fsm_max_naks
¶
Specifies the maximum number of Negative-Acknowledgment packages allowed during the LCP or the NCP negotiation. Possible values range from 1 to 65535. The default value is 5.
-
-force_server_connect_mode
¶
Enables or disables the force connect mode. A server is forced into the Connected state provided it has the user-defined maximum number of unconnected sessions. Forcing a server into the Connected state allows a partially bound block to send and receive traffic. Possible values are 0 (disable) and 1 (enable). The default value is 0.
-
-include_id
¶
Determines whether to include the Identifier field in the challenge message during the CHAP authentication. Possible values are 0 and 1. The default value is 0. When the argument is set to 1, the ID will be included in the challenge message during the CHAP authentication. This argument is available only when you specify -auth_mode chap.
-
-ip_cp
¶
Determines the IP Control Protocol (IPCP) version to enable. Possible values are listed below:
ipv4_cp - Enables IPv4 addressing. This is the default. ipv6_cp - Enables IPv6 addressing
-
-intf_ip_addr
¶
Defines the starting IPv4 address of emulated PPPoX servers. The format of the values must be in IPv4 format. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-intf_ip_addr_step
¶
Defines the increment used to generate IPv4 addresses.The format of the values must be in IPv4 format. The default value is 0.0.0.1. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-intf_ip_prefix_length
¶
Specifies the IPv4 prefix length for the emulated PPPoX servers. Possible values range from 0 to 32. The default value is 24. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-gateway_ip_addr
¶
Configures the starting IPv4 gateway address of emulated PPPoX servers. The format of the values must be in IPv4 format. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-gateway_ip_step
¶
Defines the increment used to generate IPv4 gateway addresses. The format of the values must be in IPv4 format. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp. The default value is 0.0.0.0.
-
-intf_ipv6_addr
¶
Configures the starting IPv6 address of emulated PPPoX servers. The format of the values must be in IPv6 format. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-intf_ipv6_addr_step
¶
Defines the increment used to generate IPv6 addresses. The format of the values must be in IPv6 format. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp. The default value is 0000::1.
-
-intf_ipv6_prefix_length
¶
Specifies the IPv6 prefix length for the emulated PPPoX server. Possible values range from 0 to 128. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp. The default value is 64.
-
-gateway_ipv6_addr
¶
Configures the starting IPv6 gateway address of emulated PPPoX servers. The format of the values must be in IPv6 format. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-gateway_ipv6_step
¶
Defines the increment used to generate gateway IPv6 addresses. The format of the values must be in IPv6 format. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp. The default value is ::.
-
-ipcp_req_timeout
¶
Specifies the timeout value in seconds for the acknowledgement of an IPCP Configure-Request.Possible values range from 1 to 65535. The default value is 3.
-
-ipv4_pool_addr_start
¶
Specifies the starting IPv4 address of the IP address pool. The format of the values must be in IPv4 format. The default value is 192.0.1.0. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-ipv4_pool_addr_prefix_len
¶
Specifies the IPv4 prefix length of IPv4 addresses in the PPPoX server pool. Possible values range from 0 to 32. The default value is 24. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-ipv4_pool_addr_count
¶
Specifies the number of IPv4 addresses in the PPPoX server pool. Possible values range from 1 to 65535. The default value is 1. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-ipv4_pool_addr_step
¶
Specifies the integer step by which to increment the IPv4 addresses in the PPPoX Server pool. The values of the argument must be integers. Possible values range from 1 to 65535. The default value is 1. This argument is available when -ip_cp is set to ipv4_cp or ipv4v6_cp.
-
-ipv6_pool_prefix_start
¶
Specifies the upper 64 bits of the starting IPv6 address for the PPPoX Server’s address pool. The format must be IPv6. The default value is 2001::. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-ipv6_pool_prefix_step
¶
Specifies the upper 64 bits of the IPv6 step to increment the addresses in the PPPoX Server pool. The format must be IPv6. The default value is 0:0:0:1::. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-ipv6_pool_intf_id_start
¶
Specifies the lower 64 bits of the starting IPv6 address for the PPPoX Server’s address pool. The format must be IPv6. The default value is ::1. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-ipv6_pool_intf_id_step
¶
Specifies the lower 64 bits of the IPv6 step to increment the addresses in the PPPoX Server pool. The format must be IPv6. The default value is ::1. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-ipv6_pool_prefix_len
¶
Specifies the IPv6 prefix length of IPv4 addresses in the PPPoX Server pool. Possible values range from 0 to 128. The default value is 64. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-ipv6_pool_addr_count
¶
Specifies the number of IPv6 addresses in the PPPoX Server pool. Possible values range from 1 to 65535. The default value is 1. This argument is available when -ip_cp is set to ipv6_cp or ipv4v6_cp.
-
-lcp_mru
¶
Specifies the local Maximum Receive Unit (MRU) size in bytes. Possible values range from 128 to 65535. The default value is 1492. This argument is available when -mru_neg_enable is set to 1.
-
-local_magic
¶
Enables or disables the use of the magic number for detecting data link layer errors. Possible values are 0 (disable) and 1 (enable). The default value is 1.
-
-mac_addr
¶
Specifies the starting value for MAC addresses. The value must be in MAC format.
-
-mac_addr_step
¶
Specifies the step value applied to the base MAC address. The value must be in MAC format. The default value is 00.00.00.00.00.01.
-
-max_configure_req
¶
Specifies the maximum number of Configure-Request packets that can be sent without acknowledgement. Possible values range from 1 to 65535. The default value is 5.
-
-max_chap_req_attempt
¶
Specifies the maximum number of CHAP challenge attempts made by the server. Possible values range from 1 to 65535. The default value is 10.
-
-max_echo_acks
¶
Specifies the maximum number of unanswered echo requests to send before the PPPoX server session fails. When you specify -max_echo_acks 0, echo requests are disabled. Possible values range from 0 to 65535. The default value is 3. This argument is available when -echo_req is set to 1.
-
-max_ipcp_req
¶
Specifies the maximum number of IPCP Configure-Request packets that can be sent without getting an ACK. Possible values range from 1 to 65535. The default value is 10.
-
-max_outstanding
¶
Specifies the maximum number of sessions in progress at one time. The sessions in process are the sessions either coming up or disconnecting.This is a port-wide option. Possible values range from 2 to 65535. The default value is 100.
-
-max_payload_tag_enable
¶
Enables or disables the Maximum Payload tag. When this argument is set to 1, PPPoX servers allow the negotiation of an MRU larger than 1492. Possible values are 0 (disable) and 1 (enable). The default value is 0.
-
-max_payload_bytes
¶
Specifies the maximum payload in bytes. Possible values range from 1 to 65535. The default value is 1500. This argument is available when -max_payload_tag_enable is set to 1.
-
-max_terminate_req
¶
Specifies the maximum number of Terminate Requests that can be sent without acknowledgement. Possible values range from 1 to 65535. The default value is 10.
-
-mru_neg_enable
¶
Enables or disables the MRU negotiation. Possible values are 0 (disable) and 1 (enable). The default value is 1.
-
-num_sessions
¶
The number of PPPoX servers to emulate. Possible values range from 1 to 65535. This argument is Mandatory . The default value is 1.
When you specify -encap ethernet_ii_vlan, the value of this argument must be divided evenly by the value of the -vlan_id_count argument.
When you specify -encap ethernet_ii_qinq, the value of this argument must be divided evenly by the least common multiple of the values of -vlan_id_count and -vlan_id_outer_count.
Likewise, if you specify -encap vc_mux or -encap llcsnap, the value of this argument must be divided evenly by the least common multiple of the values of -vpi_count and -vci_count.
-
-pap_req_timeout
¶
Specifies the timeout wait period (in seconds) between retransmissions of a PAP request. Possible values range from 1 to 65535. The default value is 3.
-
-protocol
¶
Specifies the type of protocol to use. Possible values are listed below:
pppoe - Indicates the PPP over Ethernet encapsulation. This is the default. Applicable on Ethernet cards. pppoa - indicates the PPP over ATM encapsulation. Applicable on ATM cards pppoeoa - Indicates the PPP over Ethernet and bridging over ATM encapsulation. This argument is applicable on ATM cards
-
-pvc_incr_mode
¶
Determines which ID to increment first. Possible values are listed below:
vci - Increments the VC ID before the Virtual Path (VP) ID. This is the default. vpi - Increments the VP ID before the Virtual Circuit (VC)ID. both - Increments both the VP and VC ID at the same time.
-
-password
¶
Specifies the string base from which the passwords are generated (e.g., Password#) when the authentication mode is pap or chap (see -auth_mode).
When -password_wildcard is enabled, you can include # (pound), ? (question), ! (bang), and $ (dollar) into the string to use wildcards to generate unique passwords. See the description of arguments related to pound (-wildcard_pound_*), question (-wildcard_question_*), bang (-wildcard_bang_*) and dollar (-wildcard_dollar_*) for details.
-
-password_wildcard
¶
Enables or disables the wildcard substitution in passwords defined by the -password argument. Possible values are 0 (disable) and 1 (enable). If the value is set to 1, any wildcards used in -password will be replaced with the corresponding values according to arguments related to pound (-wildcard_pound_*), question (-wildcard_question_*), bang (-wildcard_bang_*)and dollar (-wildcard_dollar_*). If the value is 0, wildcards will not be replaced. The default value is 0.
-
-qinq_incr_mode
¶
Specifies the increment mode for Q-in-Q Ethernet interfaces. This parameter only applies to Q-in-Q Ethernet interfaces. Possible values are described below:
inner - 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 outer VLANs is exhausted. This is the default. outer - The outer VLANs ID is incremented first until the specified number of outer VLANs is exhausted, then the inner VLAN ID is incremented. This continues in a round-robin fashion until the number of inner VLANs is exhausted. both - The inner VLAN ID and outer VLAN ID increment at the same time. When inner VLAN count is larger than the outer VLAN count, then the inner VLAN ID will continues in a round-robin fashion until the number of the outer VLAN ID is exhausted. The similar thing happens when the outer VLAN count is larger than the outer VLAN count.
-
-service_name
¶
Indicates the service (ISP name, class, or QoS) requested. If you do not specify a service name or specify an empty string, any service will be accepted.
-
-server_inactivity_timer
¶
Specifies the number of seconds to wait before the PPPoX server is forced to the Connected state. The timer begins during a period of inactivity on the server and is reset upon transmission/receipt of a packet (excluding keepalives). When the timer expires, the server is put in the Connected state provided the server hits the threshold defined by -unconnected_session_threshold. Possible values range from 1 to 65535. The default values is 30. This argument is available when -force_server_connect_mode is set to 1.
-
-term_req_timeout
¶
Specifies the timeout value in seconds for acknowledgement of a Terminate Request packet. Possible values range from 1 to 65535. The default value is 10.
-
-username
¶
Indicates the string base from which the usernames are generated (for example, User#) when the authentication mode is pap or chap (see -auth_mode). When -username_wildcard is enabled, the #(pound), ? (question), ! (bang), and $ (dollar) you use in the string will be replaced with corresponding values. See the description of arguments related to pound (-wildcard_pound_*), question (-wildcard_question_*), bang (-wildcard_bang_*) and dollar (-wildcard_dollar_*) for details.
-
-username_wildcard
¶
Enables or disables the wildcard substitution in the usernames defined by the -username argument. If the value is set to 1, any wildcards used in the usernames will be replaced with the corresponding values according to arguments related to pound, question, bang and dollar. If the value is 0, wildcards will not be replaced. The default value is 0.
-
-unconnected_session_threshold
¶
Specifies the number of unconnected sessions required for putting a PPPoX server in the Connected state. Possible values range from 0 to 65535. The default value is 0. This argument is only available when -force_server_connect_mode is set to 1.
-
-vlan_id
¶
Specifies the first inner VLAN ID to use when generating PPPoX servers. Possible values range from 0 to 4095. The default value is 100.
-
-vlan_id_step
¶
The step value to increment the inner VLAN ID. Possible values range from 1 to 4095. The default value is 0.
-
-vlan_id_count
¶
The number of inner VLAN IDs to use when generating PPPoX servers. VLAN membership is assigned in round-robin fashion. The Session number must be divided evenly by the VLAN number. Possible values range from 1 to 4096. The default value is 1.
-
-vlan_cfi
¶
Sets the canonical format indicator field in VLAN for the emulated router node. Possible values are 0 (Ethernet) and 1 (Token Ring). The default is 0. If set to 0, it indicates the network is Ethernet. If set to 1, it indicates that Token Ring and packets are dropped by Ethernet ports.
-
-vlan_user_priority
¶
Specifies the inner VLAN priority to assign to the specified port. Possible values range from 0 to 7. The default value is 0.
-
-vlan_id_outer
¶
The first outer VLAN ID to use when generating PPPoX server sessions. This ID only applies to PPPoX w/Stacked VLAN. Possible values range from 0 to 4095. The default is 100.
-
-vlan_id_outer_step
¶
Specifies the step value to increment the outer VLAN IDs. Possible values range from 0 to 4095. The default value is 0.
-
-vlan_id_outer_count
¶
Defines the number of outer VLAN IDs to use when generating PPPoX servers. VLAN membership is assigned in round-robin fashion. The number of sessions must be divided evenly into the outer VLAN count. Possible values range from 1 to 4096. The default value is 1.
-
-vlan_outer_cfi
¶
Defines the outer VLAN CFI. Possible values are 0 and 1. The default value is 0.
-
-vlan_outer_user_priority
¶
Specifies the outer VLAN priority to assign to the specified port. Possible values range from 0 to 7. The default value is 0.
-
-vci
¶
Specifies the VCI of the first ATM PVC pool. Possible values range from 0 to 65535. The default value is 32. This argument is available when -protocol is set to pppoa or pppoeoa.
-
-vci_count
¶
The number of VCIs to use when generating PPPoX servers. The session number must be divided evenly by the value of this argument. Possible values range from 1 to 65536. The default value is 1. This argument is available when -protocol is set to pppoa or pppoeoa.
-
-vci_step
¶
Specifies the step size in which the VCI value is incremented. Possible values range from 0 to 65535. The default value is 0. This argument is available when -protocol is set to pppoa or pppoeoa.
-
-vpi
¶
Specifies the VPI of the first ATM PVC pool (for an ATM connection). Possible values range from 0 to 255. The default value is 0. This argument is only available when -protocol is set to pppoa or pppoeoa.
-
-vpi_count
¶
Specifies the number of the VPIs to use when generating PPPoX servers. The session number must be divided evenly by the value of this argument. Possible values range from 1 to 256. The default value is 1. This argument is available when -protocol is set to pppoa or pppoeoa.
-
-vpi_step
¶
Specifies the step size in which the VPI value is incremented. Possible values range from 0 to 255. The default value is 0. This argument is available when -protocol is set to pppoa or pppoeoa.
-
-wildcard_bang_start
¶
Specifies the starting value of the wildcard symbol bang (!) substitution in the usernames or passwords. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_bang_end
¶
Specifies the ending value of the substitution of the wildcard symbol bang (!) in the usernames or passwords. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard s enabled.
-
-wildcard_dollar_start
¶
Specifies the starting value of the substitution of the wildcard symbol dollar ($) in the usernames or passwords. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_dollar_end
¶
Specifies the ending value for the substitution of the wildcard symbol dollar ($) in the usernames or passwords. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_pound_start
¶
Specifies the starting value to replace the wildcard pound (#) characters in usernames or passwords, such as user# or pwd#. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_pound_end
¶
Specifies the ending numerical value to replace the wildcard pound (#) characters in usernames or passwords, such as user# or pwd#. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_question_start
¶
Specifies the starting numerical value to replace the wildcard question mark (?) characters in usernames or passwords. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_question_end
¶
Defines the ending numerical value to replace the wildcard question mark (?) characters in usernames and passwords. Possible values range from 0 to 65535. The default value is 1. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_bang_fill
¶
Indicates the length that the substitution of the wildcard symbol bang (!) should be. If the substitution generated by -wildcard_bang_start and -wildcard_bang_end is shorter than this length, leading zeros will be filled to make the substitution length equal to the length specified by this argument. If the substitution is longer than this length, the value of this argument will be ignored. When it is set to 0, leading zeros will not be filled. Possible values range from 0 to 9. The default value is 0. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_dollar_fill
¶
Indicates the length that the substitution of the wildcard symbol dollar ($) should be. If the substitution generated by -wildcard_dollar_start and -wildcard_dollar_end is shorter than this length, leading zeros will be filled to make the substitution length equal to the length specified by this argument. If the substitution is longer than this length, the value of this argument will be ignored. When it is set to 0, leading zeros will not be filled. Possible values range from 0 to 9. The default value is 0. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_pound_fill
¶
Indicates the length that the substitution of the wildcard symbol pound (#) should be. If the substitution generated by -wildcard_pound_start and -wildcard_pound_end is shorter than this length, leading zeros will be filled to make the substitution length equal to the length specified by this argument. If the substitution is longer than this length, the value of this argument will be ignored. When it is set to 0, leading zeros will not be filled. Possible values range from 0 to 9. The default value is 0. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-wildcard_question_fill
¶
Indicates the length that the substitution of the wildcard symbol question mark (?) should be. If the substitution generated by -wildcard_question_start and -wildcard_question_end is shorter than this length, leading zeros will be filled to make the substitution length equal to the length specified by this argument. If the substitution is longer than this length, the value of this argument will be ignored. When it is set to 0, leading zeros will not be filled. Possible values range from 0 to 9. The default value is 0. This argument is available when -username_wildcard or -password_wildcard is enabled.
-
-expand
¶
Spirent Extension (for Spirent HLTAPI only).
Determines whether to expand the specified PPPoE server device parameters into emulated PPPoE device objects. It is used in
Scaling
test scenarios.When set to true, a list of emulated device handles (handle_list) with enabled PPPoE device configurations is created.
When set to false, only PPPoE parameters are configured with no handle returned.
-
-ac_name
¶
Specifies the Access Concentrator name in the PADO messages. The default is spirenttestcenter Applicable only in -mode activate when -block_mode or -expand is specified.
-
-emulation_type
¶
Specifies the PPPoX node emulation type. The default is server Applicable only in -mode activate when -block_mode or -expand is specified.
-
-enable_max_payload_tag
¶
Enables the PPP-Max-Payload-Tag (see RFC 4638). The default is false
-
-ipv4_addr_pool_count
¶
Specifies the number of IPv4 addresses in the PPPoX server’s pool. The default is 1 Applicable only in -mode activate when -block_mode or -expand is specified.
-
-ipv4_addr_pool_step
¶
Specifies the step IPv4 address for the PPPoX server’s pool. The default is 1 Applicable only in -mode activate when -block_mode or -expand is specified.
-
-ipv4_addr_pool_start
¶
Specifies the starting IPv4 address for the PPPoX server’s pool. The default is 192.0.1.0 Applicable only in -mode activate when -block_mode or -expand is specified.
-
-ipv6_addr_pool_int_id_step
¶
Specifies the IPv6 address pool Interface ID (lower 64 bits) step. The default is ::1 Applicable only in -mode activate when -block_mode or -expand is specified.
-
-ipv6_addr_pool_int_id_start
¶
Specifies the IPv6 address pool Interface ID (lower 64 bits) start. The default is ::2 Applicable only in -mode activate when -block_mode or -expand is specified.
-
-ipv6_addr_pool_prefix_start
¶
Specifies the IPv6 address pool prefix (upper 64 bits) start. The default is 2001::: Applicable only in -mode activate when -block_mode or -expand is specified.
-
-ipv6_addr_pool_prefix_step
¶
Specifies the IPv6 address pool prefix (upper 64 bits) step. The default is 0:0:0:1::: Applicable only in -mode activate when -block_mode or -expand is specified.
-
-max_payload_bytes
¶
Specifies the maximum number of PPP payload bytes the client can transmit and receive. The default is 1500 Applicable only in -mode activate when -block_mode or -expand is specified.
-
-remote_or_session_id
¶
Specifies the remote ID or session ID depending on the relay agent type. Special wildcards allowed. The default is remote @m-@p-@b Applicable only in -mode activate when -block_mode or -expand is specified.
Arguments Unsupported by Save as HLTAPI¶
The following Spirent HLTAPI arguments are currently not supported by the Save as HLTAPI function:
-qinq_incr_mode
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):
handle A list of created PPPoX Server group handles.
handles
A list of emulated devices with PPPoX Server configuratin created by
``sth::pppox_server_config`` function when expand is set true.
handle_list
A list of emulated devices with PPPoX Server configuratin created by
``sth::pppox_server_config`` function when expand is set true.
status $SUCCESS or $FAILURE
log An error message if the command returns {status 0}
Description¶
The sth::pppox_server_config
function creates, modifies, or deletes
PPPoX server session blocks for the specified port. Use the -mode
argument to specify the action to perform. (See the -mode argument
description for information about the actions.)
When you create a PPPoX server session block, you must use the
-port_handle argument to specify the Spirent HLTAPI port that the
emulated PPPoX server session block will use for PPPoX communication.
(The port handle value is contained in the keyed list returned by the
sth::connect
function.)
To make PPPoX servers connect to PPPoX clients successfully, you must create PPPoX server session number equivalent to or larger than PPPoX client number by specifying -num_sessions. PPPoX servers will delegate IP addresses to the clients from the address pool after the connection is established. To make sure each client can be assigned unique IP address, you must configure IP address pool count equivalent to or larger than PPPoX client number by specifying -ipv4_pool_addr_count or -ipv6_pool_addr_count.
In addition to specifying the port handle (-port_handle), you must also provide one or more of the following arguments when you create PPPoX servers or use their default values:
Defines the number of PPPoX servers to emulate (-num_sessions)
The IPCP version (-ip_cp { ipv4_cp | ipv6_cp | ipv4v6_cp } )
The Layer2 encapsulation type (-encap)
The type of protocol to use (-protocol)
When you specify -ip_cp ipv4_cp or ipv4v6_cp, the following arguments are needed to configure IPv4 address and the pool address settings:
-intf_ip_addr
-intf_ip_addr_step
-intf_ip_prefix_length
-gateway_ip_addr
-gateway_ip_step
-ipv4_pool_addr_start
-ipv4_pool_addr_prefix_len
-ipv4_pool_addr_count
-ipv4_pool_addr_step
When you specify -ip_cp ipv6_cp or ipv4v6_cp, the following arguments are needed to configure IPv6 address and the pool address settings:
-intf_ipv6_addr
-intf_ipv6_addr_step
-intf_ipv6_prefix_length
-gateway_ipv6_addr
-gateway_ipv6_step
-ipv6_pool_prefix_start
-ipv6_pool_prefix_step
-ipv6_pool_intf_id_start
-ipv6_pool_intf_id_step
-ipv6_pool_prefix_len
-ipv6_pool_addr_count
For a detailed description of PPPoX server encapsulation, see RFC 2516.
Examples¶
#### HLTAPI for Tcl ####
The following example creates 10 IPv4 PPPoE servers:
sth::pppox_server_config -mode "create" \
-port_handle $hltSourcePort \
-num_sessions 10 \
-encap ethernet_ii_qinq \
-protocol pppoe \
-attempt_rate 50 \
-disconnect_rate 50 \
-max_outstanding 100 \
-auth_mode chap \
-username spirent \
-password spirent \
-mac_addr "00:10:94:01:00:01" \
-mac_addr_step "00.00.00.00.00.01" \
-intf_ip_addr 192.0.0.8 \
-intf_ip_addr_step 0.0.0.1 \
-gateway_ip_addr 192.0.0.1 \
-qinq_incr_mode inner \
-vlan_id 200 \
-vlan_id_count 2 \
-vlan_id_outer 300 \
-vlan_id_outer_count 5 \
-ipv4_pool_addr_start 10.1.0.0 \
-ipv4_pool_addr_prefix_len 24 \
-ipv4_pool_addr_count 50 \
-ipv4_pool_addr_step 1
Sample Output:
{port_handle port1} {pppox_port pppoxportconfig1} {handle host3}
The following example creates 4 IPv6 PPPoE servers:
set status [sth::pppox_server_config -mode "create" \
-port_handle $hltSourcePort \
-encap pppoe \
-protocol ethernet_ii \
-num_sessions 4 \
-ip_cp "ipv6_cp" \
-mac_addr "00:10:94:01:00:01" \
-intf_ipv6_addr 2000::5 \
-intf_ipv6_addr_step 0::2 \
-gateway_ipv6_addr 2000::1 \
-ipv4_pool_addr_start 10.0.0.4 \
-ipv6_pool_prefix_start 1000:: \
-ipv6_pool_prefix_step 2:: \
-ipv6_pool_intf_id_start ::1 \
-ipv6_pool_intf_id_step ::2 \
-ipv6_pool_prefix_len 64 \
-ipv6_pool_addr_count 50 \
Sample Output:
{port_handle port1} {pppox_port pppoxportconfig1} {handle host4}
You can generate outgoing usernames and passwords based on wildcard replacements. For example, the # character represents a counter. If you 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, the specified user# would be replaced with User1, User2, and so on, when the authentication begins. The following example generates 50 user names and passwords:
sth::pppox_server_config -mode "create" \
-port_handle $hltSourcePort \
-num_sessions 50 \
-encap ethernet_ii \
-protocol pppoe \
-mac_addr "00:10:94:01:00:01" \
-intf_ip_addr 192.0.0.8 \
-gateway_ip_addr 192.0.0.1 \
-ipv4_pool_addr_start 10.1.0.0 \
-ipv4_pool_addr_count 50 \
-auth_mode chap \
-username User# \
-password Pass? \
-username_wildcard 1 \
-password_wildcard 1 \
-wildcard_pound_start 1 \
-wildcard_pound_end 50 \
-wildcard_question_start 1 \
-wildcard_question_end 50 \
Sample Output:
{port_handle port1} {pppox_port pppoxportconfig1} {handle host5}
The following example uses the function in Scaling
mode (-mode activate)
with -port_handle and -block_mode:
set pppoe_server_ret [sth::pppox_server_config\
-mode activate \
-port_handle $port2\
-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.0.1.1} \
-intf_ipv6_prefix_len 65 \
-ipv6_step_per_vlan {"" ::2} \
-ipv6_step_per_port ::1 \
-intf_prefix_len 22 \
-link_local_ipv6_step_per_port ::4 \
-link_local_ipv6_step_per_vlan {"" ::5} \
-name DEVICE_BLOCK_PPPOX \
-vlan_user_pri 3 \
-vlan_id_count 2 \
-vlan_id_repeatmode REPEAT_ACROSS_PORT\
-vlan_outer_id_count 2 \
-vlan_outer_user_pri 4 \
-vlan_outer_id_repeatmode REPEAT_ACROSS_PORT\
-router_id_ipv6 0101::011 \
-router_id_ipv6_step ::11 \
-intf_ip_addr 11.111.11.11 \
-gateway_ip_addr 11.111.11.1 \
-expand true \
-ac_name spirent\
-auth_mode none\
-echo_req true\
-emulation_type server\
-enable_max_payload_tag true\
-ipv6_addr_pool_count 1\
-ipv6_addr_pool_int_id_start ::2\
-ipv6_addr_pool_prefix_start 2002::\
-ipv4_addr_pool_start 10.1.1.1\
-include_id true\
-password spirent\
-username spirent\
-ipv6_addr_pool_int_id_step ::2\
-max_payload_bytes 1400\
-ipv6_addr_pool_prefix_step ::\
-ipv4_addr_pool_count 2\
-service_name spirent\
-max_echo_acks 10\
-ipv4_addr_pool_step 1\
-remote_or_session_id remote\
-echo_req_interval 20\
-ip_cp ipv4_cp\
-lower_encap pppoe]
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 ####
The following example creates one IPv4 PPPoE server:
device_ret0 = sth.pppox_server_config (
mode = 'create',
encap = 'ethernet_ii',
protocol = 'pppoe',
ipv4_pool_addr_prefix_len= '24',
ipv4_pool_addr_count= '1',
ipv4_pool_addr_step = '1',
ipv4_pool_addr_start= '192.0.1.0',
port_handle = port_handle[0],
max_outstanding = '100',
disconnect_rate = '1000',
attempt_rate = '100',
enable_osi = 'false',
pap_req_timeout = '3',
mru_neg_enable = '1',
max_configure_req = '10',
term_req_timeout = '3',
max_terminate_req = '10',
username = 'spirent',
force_server_connect_mode= 'false',
echo_vendor_spec_tag_in_pado= 'false',
echo_vendor_spec_tag_in_pads= 'false',
max_payload_tag_enable= 'false',
max_ipcp_req = '10',
echo_req_interval = '10',
config_req_timeout = '3',
local_magic = '1',
password = 'spirent',
chap_reply_timeout = '3',
max_chap_req_attempt= '10',
enable_mpls = 'false',
lcp_mru = '1492',
ip_cp = 'ipv4_cp',
max_echo_acks = '0',
auth_mode = 'none',
include_id = '1',
ipcp_req_timeout = '3',
server_inactivity_timer= '30',
unconnected_session_threshold= '0',
max_payload_bytes = '1500',
echo_req = 'false',
fsm_max_naks = '5',
num_sessions = '1',
mac_addr = '00:10:94:00:00:01',
mac_addr_step = '00:00:00:00:00:01',
intf_ip_prefix_length= '24',
intf_ip_addr = '192.85.1.3',
gateway_ip_addr = '192.85.1.1',
intf_ip_addr_step = '0.0.0.1',
gateway_ip_step = '0.0.0.0');
Sample Output:
{'status': '1', 'pppox_port': 'pppoxportconfig1', 'handle': 'host3',
'port_handle': 'port1'}
#### HLTAPI for Perl ####
The following example creates one IPv4 PPPoE server:
my %device_ret0 = sth::pppox_server_config (
mode => 'create',
encap => 'ethernet_ii',
protocol => 'pppoe',
ipv4_pool_addr_prefix_len=> '24',
ipv4_pool_addr_count=> '1',
ipv4_pool_addr_step => '1',
ipv4_pool_addr_start=> '192.0.1.0',
port_handle => "$hport[1]",
max_outstanding => '100',
disconnect_rate => '1000',
attempt_rate => '100',
enable_osi => 'false',
pap_req_timeout => '3',
mru_neg_enable => '1',
max_configure_req => '10',
term_req_timeout => '3',
max_terminate_req => '10',
username => 'spirent',
force_server_connect_mode=> 'false',
echo_vendor_spec_tag_in_pado=> 'false',
echo_vendor_spec_tag_in_pads=> 'false',
max_payload_tag_enable=> 'false',
max_ipcp_req => '10',
echo_req_interval => '10',
config_req_timeout => '3',
local_magic => '1',
password => 'spirent',
chap_reply_timeout => '3',
max_chap_req_attempt=> '10',
enable_mpls => 'false',
lcp_mru => '1492',
ip_cp => 'ipv4_cp',
max_echo_acks => '0',
auth_mode => 'none',
include_id => '1',
ipcp_req_timeout => '3',
server_inactivity_timer=> '30',
unconnected_session_threshold=> '0',
max_payload_bytes => '1500',
echo_req => 'false',
fsm_max_naks => '5',
num_sessions => '1',
mac_addr => '00:10:94:00:00:01',
mac_addr_step => '00:00:00:00:00:01',
intf_ip_prefix_length=> '24',
intf_ip_addr => '192.85.1.3',
gateway_ip_addr => '192.85.1.1',
intf_ip_addr_step => '0.0.0.1',
gateway_ip_step => '0.0.0.0');
Sample Output:
$VAR1 = 'handle';
$VAR2 = 'host3';
$VAR3 = 'port_handle';
$VAR4 = 'port1';
$VAR5 = 'status';
$VAR6 = '1';
$VAR7 = 'pppox_port';
$VAR8 = 'pppoxportconfig1';
End of Procedure Header
sth::pppox_server_control¶
Purpose¶
Controls the pppox server activity on the specified test port.
Synopsis¶
Note
M indicates that the argument is Mandatory .
sth::pppox_server_control [-action {connect|disconnect|retry|pause|resume|reset|clear|abort} M] [-handle <pppox_server_block_handle_list>] [-port_handle <port_handle_list>] [-ipcp_mode {ipv4|ipv6|ipv4v6}]
Arguments¶
-
-action
¶
Specifies the action to perform. Possible values are described below:
connect - Brings up the configured PPPoX servers. disconnect - Tears down connected PPPoX servers retry - Attempts to connect PPPoX servers that have previously failed to establish pause - Pauses the PPPoX servers resume - Resumes the PPPoX servers. reset - Aborts PPPoX sessions and resets the PPP. clear - Clears the status and statistics of the PPP sessions. abort - Aborts PPPoX sessions and resets the PPP emulation engine (without bringing the sessions back up) on the specified device.
-
-handle
¶
Identifies a list of server session blocks on which the actions defined by the -action argument will be taken. You must specify either -handle or -port_handle, but not both.
-
-port_handle
¶
Specifies a list of ports to use. When you specify this argument, the action (-action) will be applied to all PPPoX servers on the port. You must specify either -handle or -port_handle, but not both.
-
-ipcp_mode
¶
Specifies the IP version of PPPoX servers to connect, retry or disconnect. Possible values are ipv4, ipv6 and ipv4v6. The default mode is ipv4v6. You must specify one of these values. The modes are described below:
ipv4 - Use this mode, to connect, retry or disconnect all IPv4 PPPoX servers under the specified -handle or the -port_handle. ipv6 - Use this mode, to connect, retry or disconnect all IPv6 PPPoX servers under the specified -handle or the -port_handle. ipv4v6 - Use this mode, to connect, retry or disconnect all IPv4 and IPv6 PPPoX servers under the specified -handle or the -port_handle.
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 or $FAILURE
log Returns debug information when status is $FAILURE.
Description¶
The sth::pppox_server_control
function operates PPPoX server
session blocks. You can use the function to perform the following actions:
connecting, disconnecting, resetting, retrying, pausing, resuming,
clearing or aborting PPPoX server session blocks. When you
call the sth::pppox_server_control
function, you must specify a handle
or a port handle. When you specify a port handle, the action will be
applied to all the PPPoX servers on the port.
You can check the aggregate.connected and aggregate.idle fields returned by sth::pppox_server_stats to see when all sessions finish connecting or disconnecting. If the aggregate.idle or the aggregate.connected values are equal to 1, then you can send sth::pppox_server_control connect, retry, disconnect, pause, or resume actions again. When the aggregate.connected value is 1, you can disconnect the PPPoX server sessions with sth::pppox_server_control [-handle <handle>] -action disconnect. If configuring and connecting multiple PPPoX server handles, configure all the handles before connecting PPPoE servers. Do not call sth::pppox_server_config while aggregate.connecting, aggregate.connected, or aggregate.disconnecting are equal to 1.
While in the aggregate.connecting, aggregate.connected, or aggregate.disconnecting state, the PPPoX server cannot accept newly configured PPPoX server session blocks. Therefore, if you plan to configure and bring up multiple PPPoX server session blocks, configure all the PPPoX server session blocks before connecting PPPoE server sessions.
Examples¶
#### HLTAPI for Tcl ####
To connect with the specified PPPoX server:
sth::pppox_server_control -action connect \
-port_handle $hltSourcePort
Sample Output:
{status 1}
To connect only IPv4 PPPoX servers:
sth::pppox_server_control \
-action connect \
-port_handle $hltSourcePort \
-ipcp_mode ipv4\
Sample Output:
{status 1}
#### HLTAPI for Python ####
To connect with the specified PPPoX servers:
device_list = [device_ret0['handle'].split()[0],device_ret1['handle'].split()[0]]
- ctrl_ret1 = sth.pppox_server_control (
- handle = device_list, action = ‘connect’);
Sample Output:
{'status': '1'}
#### HLTAPI for Perl ####
To connect with the specified PPPoX servers:
my $device_list = "$device_ret0{handle}[0] $device_ret1{handle}[0]";
- my %ctrl_ret1 = sth::pppox_server_control (
- handle => “$device_list”, action => ‘connect’);
Sample Output:
$VAR1 = 'status';
$VAR2 = '1';
End of Procedure Header
sth::pppox_server_stats¶
Purpose¶
Returns statistics of the PPPoX servers configured on the specified test port.
Synopsis¶
Note
M indicates that the argument is Mandatory .
sth::pppox_server_stats [-handle <handle>] [-mode { aggregate | session }]
Arguments¶
-
-handle
¶
Specifies the handle of the PPPoX server block whose PPPoX statistics you will retrieve.
-
-mode
¶
Specifies the statistics retrieval mode. Possible values are described below:
aggregate - Aggregates the statistics on all the configured sessions. session - Retrieves the statistics on a per session basis.
Note
Session statistics are only valid after the PPPoX server sessions are established. They will not be returned or accessible until the sessions 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 $SUCCESS or $FAILURE
log Error message if command returns {status 0}
The following keys are returned when you specify -port_handle:
*** aggregate statistics ***
-aggregate.idle
Possible return values are 0 and 1. When
it returns 1, no PPP servers are active. This
state is entered if all hosts were manually released.
-aggregate.connecting
Possible return values are 0 and 1. When
it returns 1, the server is awaiting
connection requests (PADI messages) from clients.
-aggregate.connected
Possible return values are 0 and 1. When it returns 1, PPP
sessions have completed all phases (LCP, authentication, and
IPCP) of negotiation between the PPP client and the server and
have resulted in retrieving an IP address for at least one host
on the port.
-aggregate.disconnecting
Possible return values are 0 and 1. When it returns 1, the server
is bringing down sessions by sending Terminate-Request messages
to clients.
-aggregate.abort
Possible return values are 0 and 1. When it returns 1, the server
is terminating.
-aggregate.atm_mode
Specifies whether the server session block is in the ATM mode.
-aggregate.num_sessions
The number of sessions.
-aggregate.connect_attempts
The number of connection attempts for the PPPoX server
sessions (maximum of one per session). This value increments
the first time an LCP Configure-Request packet is sent per session.
-aggregate.connect_success
The number of PPPoX server sessions that connected successfully.
-aggregate.disconnect_success
The number of disconnected server sessions during which an LCP
Terminate-Request packet was sent (from either peer) and an LCP
Terminate-Ack packet was received
-aggregate.sessions_up
The Number of sessions currently up.
-aggregate.sessions_down
The Number of sessions currently down.
-aggregate.disconnect_failed
The number of PPPoX server sessions that fail to disconnect.
-aggregate.min_setup_time
The shortest period of time (in milliseconds) from when the first
LCP Configure-Request packet was sent out to when an IPCP
Configure-Ack packet was received for a single session.
-aggregate.max_setup_time
The longest period of time (in milliseconds) from when the first
LCP Configure-Request packet was sent out to when an IPCP
Configure-Ack packet was received for a single session.
-aggregate.avg_setup_time
The average period of time (in milliseconds) from when the first
LCP Configure-Request packet was sent out to when an IPCP
Configure-Ack packet was received for a single session.
-aggregate.success_setup_rate
The average rate of successful connections (in sessions
per second).
-aggregate.lcp_cfg_req_rx
The number of Configure-Request packets received.
-aggregate.lcp_cfg_req_tx
The number of Configure-Request packets sent.
-aggregate.lcp_cfg_rej_rx
The number of Configure-Reject packets received.
-aggregate.lcp_cfg_rej_tx
The number of Configure-Reject packets sent.
-aggregate.lcp_cfg_ack_rx
The number of Configure-Acknowledge packets received.
-aggregate.lcp_cfg_ack_tx
The number of Configure-Acknowledge packets sent.
-aggregate.lcp_cfg_nak_rx
The number of Configure-Negative Acknowledge
packets received.
-aggregate.lcp_cfg_nak_tx
The number of Configure-Negative Acknowledge
packets sent.
-aggregate.term_req_rx
The number of Terminate-Request packets received.
-aggregate.term_req_tx
The number of Terminate-Request packets sent.
-aggregate.term_ack_rx
The number of Configure-Acknowledge packets received.
-aggregate.term_ack_tx
The number of Configure-Acknowledge packets sent.
-aggregate.echo_req_rx
The number of Echo Request packets received.
-aggregate.echo_req_tx
The number of Echo Request packets sent.
-aggregate.echo_rsp_rx
The number of Echo Reply packets received.
-aggregate.echo_rsp_tx
The number of Echo Reply packets sent.
-aggregate.ipcp_tx
The number of IPCP requests sent.
-aggregate.ipcp_rx
The number of IPCP requests received.
-aggregate.pap_auth_tx
The number of PAP requests sent.
-aggregate.pap_auth_rx
The number of PAP requests received.
-aggregate.chap_auth_tx
The number of CHAP requests sent.
-aggregate.chap_auth_rx
The number of CHAP requests received.
-aggregate.ipv6cp_tx
The number of IPv6CP requests sent.
-aggregate.ipv6cp_rx
The number of IPv6CP requests received.
-aggregate.padi_rx
The number of PPPoE Active Discovery Initialized packets
received.
-aggregate.padi_tx
The number of PPPoE Active Discovery Initialized packets
received.
-aggregate.pado_rx
The number of PPPoE Active Discovery Offer (PADO) packets
received.
-aggregate.padr_tx
The number of PPPoE Active Discovery Request packets sent.
-aggregate.pads_rx
The number of PPPoE Active Discovery Session-confirmation
packets received.
-aggregate.padt_tx
The number of PPPoE Active Discovery Terminate
packets sent.
-aggregate.padt_rx
The number of PPPoE Active Discovery Terminate
packets received.
-aggregate.padr_rx
The number of PPPoE Active Discovery Request (PADR)
packets received.
-aggregate.pado_tx
The number of PADO packets sent.
-aggregate.pads_tx
The number of PADS packets sent.
-aggregate.session_retried
The number of sessions retired.
The Detailed Session Information dialog box displays information at the PPPoX server session level. The statistics are listed below:
*** session statistics ***
-session.<session ID>.idle
Possible return values are 0 and 1. When
it returns 1, no PPP sessions are active. This
state is entered if all hosts were manually released.
-session.<session ID>.connecting
Possible return values are 0 and 1. When
it returns 1, the server is awaiting
connection requests (PADI messages) from clients.
-session.<session ID>.connected
Possible return values are 0 and 1. When it returns 1, PPP
sessions have completed all phases (LCP, authentication, and
IPCP) of negotiation between the PPP client and the server and
have resulted in retrieving an IP address for at least one host
on the port.
-session.<session ID>.disconnecting
Possible return values are 0 and 1. When it returns 1,
the server is bringing down sessions by sending
Terminate-Request messages to clients.
-session.<session ID>.abort
Possible return values are 0 and 1. When it returns 1,
the server is terminating.
-session.<session ID>.atm_mode
Possible return values are 0 and 1. When it returns 1,
the server is in the ATM mode.
-session.<session ID>. connect_success
Possible return values are 0 and 1. When it returns 1,
the server connects to the clients successfully.
-session.<session ID>. disconnect_success
Possible return values are 0 and 1. When it returns 1,
the server session block is disconnected successfully.
-session.<session ID>. sessions_up
Possible return values are 0 and 1. When it returns 1,
the session are up.
-session.<session ID>. disconnect_failed
Possible return values are 0 and 1. When it returns 1,
the server is failed to be disconnected.
-session.<session ID>. sessions_down
Possible return values are 0 and 1. When it returns 1,
the session are down.
-session.<session ID>.lcp_cfg_req_rx
The number of Configure-Request packets received.
-session.<session ID>.lcp_cfg_req_tx
The number of Configure-Request packets sent.
-session.<session ID>.lcp_cfg_rej_rx
The number of Configure-Reject packets received.
-session.<session ID>.lcp_cfg_rej_tx
The number of Configure-Reject packets sent.
-session.<session ID>.lcp_cfg_ack_rx
The number of Configure-Acknowledge packets received.
-session.<session ID>.lcp_cfg_ack_tx
The number of Configure-Acknowledge packets sent.
-session.<session ID>.lcp_cfg_nak_rx
The number of Configure-Negative Acknowledge packets received.
-session.<session ID>.lcp_cfg_nak_tx
The number of Configure-Negative Acknowledge packets sent.
-session.<session ID>.ipcp_tx
The number of IPCP packets sent.
-session.<session ID>.ipcp_rx
The number of IPv6CP packets received.
-session.<session ID>.ipv6cp_tx
The number of IPv6CP packets sent.
-session.<session ID>.ipv6cp_rx
The number of IPv6CP packets received.
-session.<session ID>.padi_rx
The number of PPPoE Active Discovery Initialized packets
received.
-session.<session ID>.pado_tx
The number of PPPoE Active Discovery Request packets sent.
-session.<session ID>.padr_rx
The number of PPPoE Active Discovery Request packets received.
-session.<session ID>.pads_tx
The number of PPPoE Active Discovery Session-confirmation
packets sent.
-session.<session ID>.padt_rx
The number of PPPoE Active Discovery Terminate
packets received.
-session.<session ID>.padt_tx
The number of PPPoE Active Discovery Terminate
packets sent.
-session.<session ID>.term_req_rx
The number of Terminate-Request packets received.
-session.<session ID>.term_req_tx
The number of Terminate-Request packets sent.
-session.<session ID>.term_ack_rx
The number of Configure-Acknowledge packets received.
-session.<session ID>.term_ack_tx
The number of Configure-Acknowledge packets sent.
-session.<session ID>.echo_req_rx
The number of Echo Request packets received.
-session.<session ID>.echo_req_tx
The number of Echo Request packets sent.
-session.<session ID>.echo_rsp_rx
The number of Echo Reply packets received.
-session.<session ID>.echo_rsp_tx
The number of Echo Reply packets sent.
-session.<session ID>.pap_auth_tx
The number of PAP authentication packets sent.
-session.<session ID>.pap_auth_rx
The number of PAP authentication packets received.
-session.<session ID>.chap_auth_tx
The number of CHAP authentication packets sent.
-session.<session ID>.chap_auth_rx
The number of CHAP authentication packets received.
Description¶
The sth::pppox_server_stats
function retrieves a list of aggregate
statistics for the PPPoE session configured on the specified port.
Examples¶
#### HLTAPI for Tcl ####
The following example retrieves aggregate results:
sth::pppox_server_stats -mode aggregate \
-handle $serverHandle
Sample Output:
{port_handle port1} {aggregate {{connecting 0} {connected 1}
{disconnecting 0} {abort 0} {idle 0} {atm_mode 0} {ipcpv6_cfg_rx 0}
{term_req_rx 0} {term_ack_tx 0} {ipcp_cfg_rx 30} {chap_auth_rx 10}
{padr_rx 10} {lcp_cfg_rej_tx 0} {echo_rsp_rx 0} {padt_tx 0} {pado_tx 10}
{ipcpv6_cfg_tx 0} {connect_success 10} {term_req_tx 0} {lcp_cfg_ack_rx 10}
{num_sessions 10} {ipcp_cfg_tx 30} {echo_req_rx 0} {chap_auth_tx 20}
{padr_tx 0} {disconnect_success 0} {max_setup_time 0} {echo_rsp_tx 0}
{pads_rx 0} {sessions_up 10} {pap_auth_rx 0} {disconnect_failed 0}
{lcp_cfg_req_rx 10} {lcp_cfg_ack_tx 10} {padi_rx 10} {lcp_cfg_nak_rx 0}
{echo_req_tx 0} {min_setup_time 0} {success_setup_rate 0}
{term_ack_rx 0} {session_retried 0} {pads_tx 10} {pap_auth_tx 0}
{sessions_down 0} {lcp_cfg_rej_rx 0} {lcp_cfg_req_tx 10} {padi_tx 0}
{lcp_cfg_nak_tx 0} {padt_rx 0} {connect_attempts 0} {avg_setup_time 0}
{pado_rx 0}}} {status 1}
The following example retrieves session results:
sth::pppox_server_stats -mode session \
-handle $serverHandle
Sample Output:
{session {{host3 {{connecting 0} {connected 1} {disconnecting 0}
{abort 0} {idle 0} {atm_mode 0} {ipcpv6_cfg_rx 0} {term_req_rx 0}
{term_ack_tx 0} {ipcp_cfg_rx 30} {chap_auth_rx 10} {padr_rx 10}
{lcp_cfg_rej_tx 0} {echo_rsp_rx 0} {padt_tx 0} {pado_tx 10}
{ipcpv6_cfg_tx 0} {connect_success 10} {term_req_tx 0} {lcp_cfg_ack_rx 10}
{ipcp_cfg_tx 30} {echo_req_rx 0} {chap_auth_tx 20} {disconnect_success 0}
{echo_rsp_tx 0} {sessions_up 10} {pap_auth_rx 0} {disconnect_failed 0}
{lcp_cfg_req_rx 10} {lcp_cfg_ack_tx 10} {padi_rx 10} {lcp_cfg_nak_rx 0}
{echo_req_tx 0} {term_ack_rx 0} {pads_tx 10} {pap_auth_tx 0}
{sessions_down 0} {lcp_cfg_rej_rx 0} {lcp_cfg_req_tx 10} {lcp_cfg_nak_tx 0}
{padt_rx 0}}}}} {status 1}
#### HLTAPI for Python ####
The following example retrieves aggregate results:
results_ret1 = sth.pppox_server_stats (
handle = device,
mode = 'aggregate');
Sample Output:
{'aggregate': {'num_sessions': '1', 'lcp_cfg_ack_tx': '0', 'echo_rsp_tx': '0',
'term_ack_rx': '0', 'lcp_cfg_ack_rx': '0', 'pado_rx': '0', 'padr_rx': '0',
'pads_rx': '0', 'padr_tx': '0', 'abort': '0', 'disconnect_success': '0',
'max_setup_time': '0', 'disconnect_failed': '0', 'padt_rx': '0',
'term_ack_tx':'0', 'pap_auth_tx': '0', 'min_setup_time': '0', 'avg_setup_time': '0',
'session_retried': '0', 'padt_tx': '0', 'ipcp_rx': '0', 'pads_tx': '0',
'lcp_cfg_rej_rx': '0', 'connecting': '0', 'ipcp_tx': '0', 'lcp_cfg_req_tx': '0',
'connect_success': '0', 'disconnecting': '0', 'lcp_cfg_rej_tx': '0',
'lcp_cfg_req_rx': '0', 'echo_req_tx': '0', 'echo_req_rx': '0',
'chap_auth_tx':'0', 'sessions_up': '0', 'ipcpv6_tx': '0', 'pado_tx': '0',
'connect_attempts': '0', 'chap_auth_rx': '0', 'atm_mode': '0', 'ipcpv6_rx': '0',
'term_req_tx': '0', 'pap_auth_rx': '0', 'lcp_cfg_nak_rx': '0',
'term_req_rx':'0', 'padi_tx': '0', 'echo_rsp_rx': '0', 'idle': '1', 'padi_rx': '0',
'sessions_down': '0', 'connected': '0', 'success_setup_rate': '0',
'lcp_cfg_nak_tx': '0'}, 'status': '1', 'port_handle': 'port1'}
#### HLTAPI for Perl ####
The following example retrieves aggregate results:
my %results_ret1 = sth::pppox_server_stats (
handle => "$device",
mode => 'aggregate');
Sample Output:
$VAR1 = 'port_handle';
$VAR2 = 'port1';
$VAR3 = 'status';
$VAR4 = '1';
$VAR5 = 'aggregate';
$VAR6 = {
'echo_req_rx' => '0',
'term_req_tx' => '0',
'lcp_cfg_req_rx' => '0',
'sessions_up' => '0',
'ipcpv6_tx' => '0',
'padi_tx' => '0',
'term_ack_tx' => '0',
'pads_tx' => '0',
'disconnect_success' => '0',
'lcp_cfg_nak_rx' => '0',
'pado_rx' => '0',
'echo_rsp_tx' => '0',
'abort' => '0',
...
End of Procedure Header