ANCP Functions

emulation ancp config

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

Purpose:
Creates, modifies, or deletes emulated Access Node Control Protocol(ANCP. Also known as L2CP or L2C) client devices on a Spirent HLTAPI chassis. When a device is created or modified, the user can specify configuration option. ANCP facilitates the tasks of subscriber port discovery and configuration. It operates between a service oriented network access server (e.g., Broadband Network Gateway, Broadband Remote Access Server) and an access node (e.g., Digital Subscriber Line Access Multiplexer) in order to convey subscriber line information and policies.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    emulation ancp config
        mode= {create|modify|delete} M
        port_handle= <port_handle>
        handle= <handle>
        ancp_standard= {ietfancp-protocol2|gsmp-l2control-config2|rfc_6320}
        bulk_transaction= {0|1}
        code= <0-4095>
        device_count= <integer>
        encap_type= {ETHERNETII|VC_MUX|LLC_SNAP|ATM_LLC_SNAP_ETHERNETII|
                       ATM_VC_MUX_ETHERNETII}]
        gateway_ip_addr= <a.b.c.d>
        gateway_ip_repeat= <integer>
        gateway_ip_step= <a.b.c.d>
        gateway_ip_prefix_len= <1-32>
        gateway_ip_prefix= <integer>
        intf_ip_addr= <a.b.c.d>
        intf_ip_repeat= <integer>
        intf_ip_step= <a.b.c.d>
        intf_ip_prefix_len= <1-32>
        intf_ip_prefix= <integer>
        keep_alive= <1-25>
        local_mac_addr= <aa:bb:cc:dd:ee:ff>
        local_mac_step= <aa:bb:cc:dd:ee:ff>
        local_mac_repeat= <integer>
        partition_type= {NO_PARTITION|FIXED_PARTITION_REQUEST|
                           FIXED_PARTITION_ASSIGNED}]
        partition_flag= {NEW_ADJACENCY|RECOVERED_ADJACENCY}
        partition_id= <0-255>
        sut_ip_addr= <a.b.c.d>
        sut_ip_repeat= <integer>
        sut_ip_step= <a.b.c.d>
        sut_ip_prefix_len= <integer>
        sut_ip_prefix= <integer>
        tcp_port= <integer>
        topology_discovery= {0|1}
        vci= <0-65535>
        vci_step= <0-65535>
        vci_repeat= <0-65535>
        vlan_id= <0-4095>
        vlan_id_count= <integer>
        vlan_id_repeat= <integer>
        vlan_id_step= <integer>
        vlan_id_inner= <0-4095>
        vlan_id_count_inner= <integer>
        vlan_id_repeat_inner= <integer>
        vlan_id_step_inner= <integer>
        vpi= <0-255>
        vpi_step= <0-255>
        vpi_repeat= <0-255>

Arguments:

mode
                Specifies the action to perform on the test port. This is a
                `Mandatory` argument. Possible values are create, modify, and
                delete. Every mode except create requires a valid
                ANCP device handle. You can delete multiple devices once, but you
                can only modify one device once. The modes are described below::


                 create   Creates one or more ANCP devices on the port specified
                          with the port_handle argument. You must specified the
                          port_handle argument.

                 modify   Changes the configuration for the ANCP device identified
                          by the handle argument. You must specify the handle
                          argument.

                 delete   Deletes all of the ANCP devices specified in the
                          port_handle argument, or delete the device specified by
                          handle. You must specify either of the two. If both are
                          configured, Spirent HLTAPI uses port_handle for this mode.

                Note: The enable, disable, enable_all, and disable_all modes
                      are not supported.

port_handle
                Specifies the port on which to create the ANCP device when mode
                is set to "create". This argument is `Mandatory` only for create
                mode.

handle
                Identifies the device to be modified or deleted. This argument is
                `Mandatory` only for modify or delete modes. You must specify either
                handle or -port_handle, but not both.

ancp_standard
                Specifies the ANCP standard to be used. Possible values are
                ietfancp-protocol2, gsmp-l2control-config2, and rfc_6320.

bulk_transaction
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables or disables bulk transaction capabilities. In a bulk
                transaction, several messages can be bundled together in a single
                transaction. Possible values are 0 (disabled) and 1 (enabled).
                The default value is 0. You can specify this argument only when
                ancp_standard is set to ietfancp-protocol2.

code
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the Code field for the Adjacency Update message.
                Possible values range from 0 to 4095. The default value is 0. You
                can specify this argument when ancp_standard is set to
                rfc_6320.

device_count
                Specifies the number of emulated ANCP devices to create. The
                default value is 1.

encap_type
                Specifies the type of Layer 2 encapsulation. Possible values are::


                 ETHERNETII   Specifies the Layer 2 encapsulation to be Ethernet II
                              frame. This option is available for Ethernet cards.

                 VC_MUX   Specifies ATM encapsulation to VC Multiplexed. Virtual
                          Circuit Multiplexing (VC_MUX) is one of the two mechanisms
                          for identifying the protocol carried in ATM Adaptation Layer5
                          (AAL5) frame. This option is available for ATM cards.

                 LLC_SNAP   Specifies ATM encapsulation to LLC Encapsulated.
                           LLC_SNAP is the other mechanism for identifying
                           the protocol carried in AAL5 frame. This option is available
                           for ATM cards.

                 ATM_LLC_SNAP_ETHERNETII   Specifies the Layer 2 encapsulation
                         to Ethernet over VC Multiplexed ATM which will encapsulate
                         the Ethernet packets inside AAL5 LLC_SNAP frames. This
                         option is available for ATM cards.

                 ATM_VC_MUX_ETHERNETII   Specifies the Layer 2 encapsulation to
                         Ethernet over LLC Encapsulated ATM which will encapsulate
                         the Ethernet packets inside AAL5 VC_MUX frames.
                         This option is available for ATM cards.

                The default value is ETHERNETII.

                Note: SAF (IEEE 802.3/802.2) type and SNAP
                     (IEEE 802.3/802.2 SNAP) type are .

gateway_ip_addr
                Configures the IPv4 gateway address of the ANCP device. You must
                specify this argument in IPv4 format. The default is 192.85.1.1.
                This is the default gateway for routing the IPv4 address you
                specified in the intf_ip_addr argument. The default gateway is
                the device that Spirent HLTAPI will use to reach hosts not on its
                local network. The value of this argument may be an IPv4 address
                or multiple IPv4 addresses in a list. When the value is a list,
                the number of IPv4 addresses in the list should be equal to the
                number of devices specified by device_count. Meanwhile, the
                related step, the repeat, and the count options are invalid.

gateway_ip_repeat
                Specifies the number of times the gateway IPv4 address should
                be repeated, before the step that is specified by the
                gateway_ip_step argument is applied to the gateway IP address
                for incrementing. The default value is the number you specified
                by device_count.

gateway_ip_step
                Defines the increment used to generate gateway IPv4 addresses
                (gateway_ip_addr) for emulated devices. The default value is
                0.0.0.1.

gateway_ip_prefix_len
                Specifies the gateway IPv4 mask for the IPv4 devices advertised.
                Possible values range from 1 to 32. The default value is 24. This
                argument determines the network ID and the subnet.

gateway_ip_prefix
                Defines the prefix of gateway IPv4 addresses.

intf_ip_addr
                Specifies the IPv4 address of the interface for the ANCP
                emulated device that will establish an adjacency with the
                DUT. It may be an IPv4 address or multiple IPv4 addresses
                in a list. When the value is a list, the number of IPv4 addresses
                in the list should be equal to the number of devices specified by
                device_count. Meanwhile, the related step, the repeat, and the
                count options are invalid. The default is 192.85.1.3.

intf_ip_repeat
                Defines the number of times an interface IPv4 address should be
                repeated before applying the step (intf_ip_step).

intf_ip_step
                Specifies the difference between interface IPv4 addresses of
                consecutive devices when multiple ANCP devices are created.
                The default increment is 0.0.0.1. This argument is only
                applicable in create mode.

intf_ip_prefix_len
                Specifies the prefix length of the emulated device. Possible
                values for IPv4 addresses range from 1 to 32; the default is
                24.

intf_ip_prefix
                Specifies the prefix of interface IPv4 addresses.

keep_alive
                Specifies the intervals (in seconds) between two keep alive
                messages sent from ANCP devices. Possible values range from
                1 to 25.

local_mac_addr
                Specifies the first MAC address of the emulated ANCP devices
                to use when emulating multiple devices. The default is
                00:10:94:00:00:01.You must specify the value in MAC address
                format. It may be a MAC address or multiple MAC addresses in a
                list. When the value is a list, the number of MAC addresses in
                the list should be equal to the number of devices specified by
                device_count. Meanwhile, the related step, the repeat, and the
                count options are invalid.

local_mac_step
                Specifies the increment to use to generate additional MAC
                addresses for multiple devices. The default is
                00.00.00.00.00.01. You must specify the value in the format of
                the MAC address.

local_mac_repeat
                Specifies the number of times a MAC address should be repeated,
                before the step you specified by local_mac_step is applied to
                the MAC address for incrementing. The default value is 1.

partition_type
                Spirent Extension (for Spirent HLTAPI only).
                Specifies the partition type. You can specify this argument when
                ancp_standard is set to rfc_6320. Possible values are::


                 NO_PARTITION                No partition
                 FIXED_PARTITION_REQUEST     Fixed partition request
                 FIXED_PARTITION_ASSIGNED    Fixed partition assigned

                The default value is NO_PARTITION.


partition_flag
                Spirent Extension (for Spirent HLTAPI only).
                Specifies the partition flag. You can specify this argument when
                ancp_standard is set to rfc_6320. Possible values are::


                  NEW_ADJACENCY          New adjacency

                  RECOVERED_ADJACENCY   Recovered adjacency

                 The default value is NEW_ADJACENCY.



partition_id
                Spirent Extension (for Spirent HLTAPI only).
                Specifies the partition ID. You can specify this argument when
                ancp_standard is set to rfc_6320. Possible values range from 0
                to 255. The default value is 0.

sut_ip_addr
                Defines the IPv4 address of System Under Test (SUT) that is
                adjacent to the test interface or the emulated ANCP device.
                It may be an IPv4 address or multiple IPv4 addresses in a list.
                When the value is a list, the number of IPv4 addresses in the
                list should be equal to the number of devices specified by
                device_count. Meanwhile, the related step, repeat, and count
                options are invalid.

sut_ip_repeat
                Specifies the number of times a SUT address should be repeated,
                before the step (sut_ip_step) is applied to the SUT address for
                incrementing. The default value is the number defined by
                device_count.

sut_ip_step
                Specifies the step size in which the IPv4 address of the SUT is
                incremented. The default is 0.0.0.1.

sut_ip_prefix_len
                Specifies the IPv4 subnet mask for the SUT specified by the
                sut_ip_addr argument. Possible values range from 1 to 32.
                The default value is 24.

sut_ip_prefix
                Specifies the prefix of the SUT addresses.

tcp_port
                Spirent Extension (for Spirent HLTAPI only).
                Specifies the Transfer Control Protocol (TCP) port to be
                used in ANCP/TCP connection. ANCP uses TCP for exchanging
                protocol messages. The default value is 6068.

topology_discovery
                Enables or Disables the topology discovery functionality.
                When you enable this argument, the DUT can use topology
                discovery to get the information about the access network and
                subscriber traffic from the emulated ANCP device. Possible
                values are 0 (disabled) and 1 (enabled).

vci
                Specifies the Virtual Circuit Identifier (VCI) of the first ATM
                PVC pool. Possible values range from 0 to 65535. The default is
                100. You can specify this argument when encap_type is set to
                VC_MUX, LLC_SNAP, ATM_LLC_SNAP_ETHERNETII or
                ATM_VC_MUX_ETHERNETII.

vci_step
                Specifies the step size in which the VCI value is incremented.
                Possible values range from 0 to 65535. The default is 1.
                You can specify this argument when encap_type is set
                to VC_MUX, LLC_SNAP, ATM_LLC_SNAP_ETHERNETII
                or ATM_VC_MUX_ETHERNETII.

vci_repeat
                Specifies the number of times the VCI value should be repeated,
                before the step (vci_step) is applied to the VCI value for
                incrementing. Possible values range from 0 to 65535. The default
                is 0. You can specify this argument when encap_type is set to
                VC_MUX, LLC_SNAP, ATM_LLC_SNAP_ETHERNETII or
                ATM_VC_MUX_ETHERNETII.

vlan_id
                Defines the Virtual LAN (VLAN) ID of the first VLAN
                subinterface. Possible values range from 0 to 4095. It may be
                a VLAN ID or multiple VLAN IDs in a list. When the value is
                a list, the number of VLAN IDs in the list should be equal to the
                number of devices specified by device_count. Meanwhile, the
                related step, repeat, and count options are invalid. You can
                specify this argument when encap_type is set to ETHERNETII,
                ATM_LLC_SNAP_ETHERNETII or ATM_VC_MUX_ETHERNETII.

                Note: If arguments about Inner VLAN are specified,
                      vlan_id, vlan_id_count, vlan_id_repeat, and
                      vlan_id_step indicate the ID, number, repeat, and
                      step of Outer VLAN.

vlan_id_count
                Specifies the number of VLAN IDs to use when generating
                ANCP devices. The default value is 1. Please refer to the
                note in the vlan_id argument.

vlan_id_repeat
                Specifies the number of times a VLAN ID should be repeated,
                before the step (vlan_id_step) is applied to the VLAN
                ID for incrementing. The default value is the number you
                specified by device_count. Please refer to the note in the
                vlan_id argument.

vlan_id_step
                Specifies the increment to use for generating additional VLAN
                IDs. When you specify the vlan_id_repeat argument or the
                vlan_id_count argument, the default value of this argument is 1.
                Please refer to the note in the vlan_id argument.

vlan_id_inner
                Defines the VLAN ID of the first Inner VLAN subinterface.
                Possible values range from 0 to 4095. You can specify this
                argument when encap_type is set to ETHERNETII ,
                ATM_LLC_SNAP_ETHERNETII or ATM_VC_MUX_ETHERNETII.

vlan_id_count_inner
                Specifies the number of the Inner VLAN IDs to use when
                generating ANCP devices. The default value is 1.

vlan_id_repeat_inner
                Specifies the number of times an Inner VLAN ID should be
                repeated, before the step (vlan_id_step_inner) is applied
                to the Inner VLAN ID for incrementing. The default value
                is the number of devices you specified by device_count.

vlan_id_step_inner
                Specifies the increment to use for generating additional Inner
                VLAN IDs. The default value is 1.

vpi
                Specifies the Virtual Path Identifier (VPI) of the first ATM PVC
                pool (for an ATM connection). Possible values are 0 to 255. The
                default is 100. You can specify this argument when encap_type is
                set to VC_MUX, LLC_SNAP, ATM_LLC_SNAP_ETHERNETII or
                ATM_VC_MUX_ETHERNETII.

vpi_step
                Specifies the step size in which the VPI value is
                incremented. Possible values are 0 to 255. The default is 1.
                You can specify this argument when encap_type is set
                to VC_MUX, LLC_SNAP, ATM_LLC_SNAP_ETHERNETII
                or ATM_VC_MUX_ETHERNETII.

vpi_repeat
                Specifies the number of times the VPI value should be repeated,
                before the step (vpi_step) is applied to the VPI value for
                incrementing. Possible values range from 0 to 255. The default is
                0. You can specify this argument when encap_type is specified to
                VC_MUX, LLC_SNAP, ATM_LLC_SNAP_ETHERNETII or
                ATM_VC_MUX_ETHERNETII.

Arguments Unsupported by Save as HLTAPI:

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


  gateway_ip_repeat
  intf_ip_repeat
  local_mac_repeat
  sut_ip_repeat
  vlan_id_repeat
  vlan_id_repeat_inner
Ciscospecific Arguments:

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

intf_ip_prefix
session_count
remote_mac_addr
remote_mac_step
remote_mac_repeat
gateway_ipv6_addr
gateway_ipv6_repeat
gateway_ipv6_step
gateway_ip_prefix
gateway_ip_prefix_len
gateway_ipv6_prefix_len
gateway_ipv6_prefix
gsmp_standard
return_receipt
events_per_interval
interval
line_config
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    Identifies the list of created ANCP devices
status    Success (1) or failure (0) of the operation
log       An error message (if the operation failed).
Description:

The emulation ancp config function creates or deletes a list of emulated ANCP client device. This function can modify one emulated device once. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

Before using this function, you must specify “mode create” when configuring emulated ANCP devices on a port and initialize the port handle argument (using the emulation ancp config function).

You can call this function once to create multiple devices on a port. The number of devices to create is specified by the device_count argument.

Once the ANCP devices have been configured, a handle is created, which can be used to modify the parameters. You can call this function once to modify one created device. If you want to modify multiple devices, you can call this function multiple times to do this. (See the mode argument description for more information).

You must specify the mode (create, modify, or delete) argument.

For information about the protocol, see “Protocol for Access Node Control Mechanism in Broadband Networks.”

Examples:

The following example configures ANCP devices on a port:

emulation ancp config mode=      create
                  port_handle=        $port1
                  local_mac_addr=     00:10:94:A0:00:02
                  local_mac_step=     00:00:00:00:00:01
                  intf_ip_addr=       192.168.4.2
                  intf_ip_step=       0.0.0.1
                  gateway_ip_addr=    192.168.4.1
                  sut_ip_addr=        192.168.4.1
                  keep_alive=         10
                  ancp_standard=      "ietfancp-protocol2"

Output:

{handle router1} {status 1}

emulation ancp subscriber lines config

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

Purpose:
Creates, modifies, or deletes emulated subscriber lines behind an ANCP enabled Access Node on a Spirent HLTAPI chassis. When a subscriber line is created or modified, the user can specify the configuration option.

Synopsis:

Note: M indicates the argument is `Mandatory`.

      emulation_ancp_subscriber_lines_config
        mode= {create|modify|delete} M
        ancp_client_handle= <ancp_session_handle>
        ancp_subscriber_lines_handle= <ancp_subscriber_lines_handle>
        handle= <handle>
        subscriber_lines_per_access_node= <integer>
        subscriber_protocol= {ppp|dhcp }
        circuit_id= <circuit ID>
        remote_id= <remote ID>
        circuit_id_suffix= <integer>
        circuit_id_suffix_step= <integer>
        circuit_id_suffix_repeat= <integer>
        vlan_allocation_model= {1_1|N_1}
        enable_c_vlan= {0|1}
        customer_vlan_id= <VLAN ID>
        customer_vlan_id_step= <0-4095>
        customer_vlan_id_repeat= <integer>
        include_encap= {0|1}
        data_link= { ethernet|atm_aal5}
        encap1= {na|untagged_ethernet|single_tagged_ethernet}
        encap2= {na|pppoa_llc|pppoa_null|ipoa_llc|ipoa_null|aal5_llc_w_fcs|
                 aal5_llc_wo_fcs|aal5_null_w_fcs|aal5_null_wo_fcs}]
        dsl_type= { adsl1|adsl2|adsl2_plus|vdsl1|vdsl2|sdsl|unknown}
        actual_rate_upstream= <integer>
        actual_rate_upstream_step= <integer>
        actual_rate_upstream_repeat= <integer>
        upstream_min_rate= <integer>
        upstream_max_rate= <integer>
        upstream_attainable_rate= <integer>
        upstream_min_low_power_rate= <integer>
        upstream_max_interleaving_delay= <integer>
        upstream_act_interleaving_delay= <integer>
        actual_rate_downstream= <integer>
        actual_rate_downstream_step= <integer>
        actual_rate_downstream_repeat= <integer>
        downstream_min_rate= <integer>
        downstream_max_rate= <integer>
        downstream_attainable_rate= <integer>
        downstream_min_low_power_rate
        downstream_max_interleaving_delay= <integer>
        downstream_act_interleaving_delay= <integer>
        remote_id_suffix= <integer>
        remote_id_suffix_step= <integer>
        remote_id_suffix_repeat= <integer>
        tlv_service_vlan_id= <integer|wildcard>
        tlv_service_vlan_id_wildcard= {0|1}
        tlv_customer_vlan_id= <integer|wildcard>
        tlv_customer_vlan_id_wildcard= {0|1}

Arguments:

mode
                Creates, modifies or deletes the subscriber line connected with
                the created ANCP client device. This is a `Mandatory` argument.
                Possible values are create, modify, and delete. Every mode except
                create requires a valid ANCP subscriber line pool handle. The
                modes are described below::


                 create   Creates one or more ANCP subscriber lines on
                          the ANCP device specified by the ancp_client_handle
                          argument. You must specified the ancp_client_handle
                          argument.

                 modify  Changes the configuration for the ANCP subscriber
                         line identified by the ancp_subscriber_lines_handle argument.
                         In modify mode, you must specify both ancp_client_handle and
                         ancp_subscriber_lines_handle.

                         You can modify one subscriber line (ancp_subscriber_lines_handle) once.
                         If you want to modify multiple subscriber lines, you must call this
                         command multiple times.

                 delete   Deletes all of the ANCP subscriber lines configurations
                          specified in the handle argument. You must specify the
                          handle argument.
                          You must provide ANCP subscriber line return handle
                          as handle.
                          Example:
                          emulation ancp subscriber lines config
                          mode                             delete
                          handle                           ancpaccessloopblockconfig1

                Note: The enable, disable, enable_all, and disable_all modes
                      are .

ancp_client_handle
                Defines the handle of the emulated ANCP client device
                connected with the subscriber lines to be created and modified.
                You must specify both ancp_client_handle and -handle in modify
                mode when a host is attached to ANCP subscriber line configuration.

handle
                Specifies the subscriber lines to be created, modified, or deleted. This
                argument is `Mandatory` for create or modify modes when there is a
                host (DHCP/PPP) attached to ANCP subscriber line configuration.

ancp_subscriber_lines_handle
                Specifies the ancp subscriber lines to be modified. This
                argument is only for modify mode. You must specify
                both ancp_client_handle and -handle when a host is attached to
                ANCP subscriber line configuration.

subscriber_lines_per_access_node
                Specifies the number of subscriber lines per emulated ANCP device,
                that is, the Access Node. The default value is 1.

subscriber_protocol
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the type of subscriber session protocol to use.
                Possible values are ppp and dhcp. The default value is dhcp. This
                argument is available when mode is set to modify.

circuit_id
                Specifies the Circuit ID which identifies each subscriber line
                connected with one device.

remote_id
                Specifies the Remote Circuit ID which identifies each subscriber
                line connected with the remote device. You can specify this
                argument when the ancp_standard argument is set to
                ietfancp-protocol2.

circuit_id_suffix
                Defines the suffix to append to the circuit ID specified in the
                circuit_id argument.

circuit_id_suffix_step
                Defines the increment used to generate circuit ID suffixes
                (circuit_id_suffix). The default is 1.

circuit_id_suffix_repeat
                Specifies the number of times a circuit ID suffix should
                be repeated, before the step that is specified in the
                circuit_id_suffix_step argument is applied to the
                circuit ID suffix for incrementing. The default is 1.

vlan_allocation_model
                Defines the VLAN allocation model used to identify the
                subscriber lines. Possible values are 1_1 and N_1::


                 1_1 - Specifies the 1:1 VLAN allocation model. Stacked
                     VLAN tags provide one possible way to create
                     equivalent of "virtual paths" and "virtual circuits"
                     in the aggregation network. The "outer" VLAN could
                     be used to create a form of "virtual path" between a given
                     NAS and a given DSLAM. And "inner" VLAN tags to
                     create a form of "virtual circuit" on a per DSL line basis.

                 N_1 - Specifies the N:1 VLAN allocation model that is to bridge
                     sessions from multiple subscriber line behind a DSLAM
                     into a single VLAN in the aggregation network.

enable_c_vlan
                Enables or disables customer VLAN ID that is the unique public
                network VLAN ID provided by QinQ protocol. Possible values
                are 0 (disabled) and 1 (enabled). When the value is set to 1,
                customer VLAN ID is enabled. You can specify this argument
                when vlan_allocation_model is set to 1_1.

customer_vlan_id
                Specifies the starting customer VLAN ID to use when generating
                ANCP devices. You can specify this argument only
                when vlan_allocation_model is set to 1_1 and -enable_c_vlan is
                set to 1. The default value is 1.

customer_vlan_id_step
                The value that Spirent HLTAPI uses to increment the
                customer VLAN ID. Possible step values range from 0 to 4095.
                The default is 1. You can specify this argument only
                when vlan_allocation_model is set to 1_1 and
                enable_c_vlan is set to 1.

customer_vlan_id_repeat
                Specifies the number of times a customer VLAN ID should be
                repeated, before the step (customer_vlan_id_step) is applied to
                the customer VLAN ID for incrementing. You can specify this
                argument only when vlan_allocation_model is set
                to 1_1 and enable_c_vlan is set to 1.

include_encap
                Specifies whether or not Access Loop Encapsulation Threshold
                Limit Value (TLV) is included in ANCP messages. Access Loop
                Encapsulation TLV is an optional TLV for ANCP. This TLV includes
                the Data Link Protocol (data_link) and, optionally the
                encapsulation (encap1 and encap2) overhead on the Access Loop.
                Possible values are 0 and 1. When you specify this argument to 1,
                Access Loop Encapsulation TLV will be included in ANCP messages.
                When this TLV is present, the data link protocol must be
                indicated. Optionally, the encapsulation overhead can be
                indicated. You can specify this argument when ancp_standard is
                set to ietfancp-protocol2.

data_link
                Defines the Access Loop Data Link. Possible values are
                ethernet and atm_aal5. You must use this argument when
                include_encap is set to 1. Please refer to include_encap.

encap1
                Defines the Access Loop Encapsulation 1. Possible values
                are na, untagged_ethernet, and single_tagged_ethernet.
                You can use this argument when include_encap is set to 1.
                Please refer to include_encap.

encap2
                Defines the Access Loop Encapsulation 2. Possible
                values are na, pppoa_llc, pppoa_null, ipoa_llc, ipoa_null,
                aal5_llc_w_fcs, aal5_llc_wo_fcs, aal5_null_w_fcs, and
                aal5_null_wo_fcs. You can use this argument when include_encap
                is set to 1. Please refer to include_encap.

dsl_type
                Defines the type of Digital Subscriber Line (DSL) transmission
                system to use. Possible values are adsl1, adsl2, adsl2_plus,
                vdsl1, vdsl2, sdsl, and unknown. The default value is adsl1.

actual_rate_upstream
                Specifies the starting value of actual upstream (from the
                subscriber line to the server) net data rates on a DSL line. The
                value is measured in kbps. The default is 0.

actual_rate_upstream_step
                Specifies the difference between the actual upstream net data
                rates. The value is measured in kbps.

actual_rate_upstream_repeat
                Specifies the number of times an actual upstream net data rate
                should be repeated, before the step (actual_rate_upstream_step)
                is applied to the actual upstream net data rates for incrementing.

upstream_min_rate
                Specifies the minimum net data upstream rate desired by
                the service provider. The value is measured in kbps.

upstream_max_rate
                Specifies the maximum net data upstream rate desired
                by the service provider. The value is measured in kbps.

upstream_attainable_rate
                Specifies the maximum net upstream rate that can be attained
                on the DSL Line. The value is measured in kbps.

upstream_min_low_power_rate
                Defines the minimum net upstream rate desired by the service
                provider in low power state. The value is measured in kbps.

upstream_max_interleaving_delay
                Defines the maximum one way interleaving delay. The value
                is measured in milliseconds.

upstream_act_interleaving_delay
                Specifies the value corresponding to the upstream interleaver
                setting. The value is measured in milliseconds.

actual_rate_downstream
                Specifies the starting value of actual downstream (from the
                server to the subscriber line) net data rates on a DSL line. The
                value is measured in kbps. The default is 0.

actual_rate_downstream_step
                Specifies the difference between the actual downstream net data
                rates. The value is measured in kbps.

actual_rate_downstream_repeat
                Specifies the number of times an actual downstream net data rate
                should be repeated, before the step
                (actual_rate_downstream_step) is applied to the actual
                downstream net data rates for incrementing.

downstream_min_rate
                Specifies the minimum net data downstream rate desired by
                the service provider. The value is measured in kbps.

downstream_max_rate
                Specifies the maximum net data downstream rate desired
                by the service provider. The value is measured in kbps.

downstream_attainable_rate
                Specifies the maximum net downstream rate that can be attained
                on the DSL Line. The value is measured in kbps.

downstream_min_low_power_rate
                Defines the minimum net downstream rate desired by the service
                provider in low power state. The value is measured in kbps.

downstream_max_interleaving_delay
                Defines the maximum one way interleaving delay. The value
                is measured in milliseconds.

downstream_act_interleaving_delay
                Specifies the value corresponding to the downstream interleaver
                setting. The value is measured in milliseconds.

remote_id_suffix
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the starting suffix to append to the remote ID
                specified in the remote_id argument.

remote_id_suffix_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the increment value used to generate subsequent remote
                ID suffixes. The default value is 1.

remote_id_suffix_repeat
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the number of times a remote ID suffix should be
                repeated, before the step specified by remote_id_suffix_step is
                applied to the remote ID suffix for incrementing. The default
                value is 0.

tlv_service_vlan_id
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the service VLAN ID in the Access Aggregation Circuit
                ID Binary TLV. The default value is 0. When
                tlv_service_vlan_id_wildcard is enabled, You can use this
                argument to define a wildcard expression for the service VLAN ID.

tlv_service_vlan_id_wildcard
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables or disables service VLAN wildcard for the Access
                Aggregation Circuit ID Binary TLV. Possible values are 0
                (disable) and 1 (enable). If it is set to 1, service VLAN ID
                wildcard is enabled and assigned with the wide expression
                specified in tlv_service_vlan_id. The default value is 0.

tlv_customer_vlan_id
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the customer VLAN ID in the Access Aggregation Circuit
                ID Binary TLV. The default value is 0. When
                tlv_customer_vlan_id_wildcard is enabled, You can use this
                argument to define a wildcard expression for the customer VLAN
                ID.

tlv_customer_vlan_id_wildcard
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables or disables customer VLAN wildcard for the Access
                Aggregation Circuit ID Binary TLV. Possible values are 0
                (disable) and 1 (enable). If it is set to 1, customer VLAN ID
                wildcard is enabled and assigned with the wide expression
                specified in tlv_customer_vlan_id. The default value is 0.
Ciscospecific Arguments:

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

downstream_rate_tolerance
remote_id_suffix
remote_id_suffix_step
remote_id_suffix_repeat
service_vlan_id
service_vlan_id_step
service_vlan_id_repeat
upstream_rate_tolerance
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    Identifies the list of created ANCP subscriber lines
status    Success (1) or failure (0) of the operation
log       An error message (if the operation failed).
ancp_subscriber_lines_handle Identifies the handle of created ANCP subscriber lines.
Description:

The emulation ancp subscriber lines config function creates, modifies or deletes a list of emulated ANCP subscriber lines. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

Before using this function, you must specify “mode create” when configuring emulated ANCP subscriber lines on a device and initializes the device handle argument.

You can call this function once to create multiple subscriber lines on one device.The number of subscriber lines to create is specified by the subscriber_lines_per_access_node argument.

Once the ANCP subscriber lines have been configured, a handle is created, which can be used to modify the parameters.

You must specify the mode (create, modify, or delete) argument.

For information about the protocol, see “Protocol for Access Node Control Mechanism in Broadband Networks”.

Examples:

The following two examples create ANCP subscriber lines on a device:

#ANCP subscriber lines with PPP protocol

pppox config port_handle=$port1
                  mode= create
                  protocol= pppoe
                  encap= ethernet_ii
                  auth_mode= pap
                  include_id= 1
                  num_sessions= 1
                  mac_addr= 00.00.12.00.01.02
                  mac_addr_step= 00.00.00.00.00.01
                  username= spirent
                  password= spirent

set host1 [keylget ret handles]

emulation ancp subscriber lines config mode=create
                   ancp_client_handle= $anRouter1
                   handle= $host1
                   subscriber_lines_per_access_node= 1
                   circuit_id= "test"
                   remote_id= "cf"
                   circuit_id_suffix= 2
                   circuit_id_suffix_step= 1
                   circuit_id_suffix_repeat= 2
                   include_encap= 1
                   data_link= "ethernet"
                   dsl_type= "adsl2"
                   actual_rate_upstream= "444"
                   upstream_min_rate= "22"
                   actual_rate_downstream= "555"

puts "ret of ancp subscriber config for $anRouter1 : $ret2 \n\n"

Sample output for example shown above:

{handle host1}  {ancp_subscriber_lines_handle ancpaccessloopblockconfig1} {status 1}

#ANCP subscriber lines with DHCP protocol

set ret emulation dhcp config mode=create port_handle port2
                       request_rate= 25
                       release_rate= 300
                       retry_count= 4]

set dhcpgrp [keylget ret handles]

set ret emulation dhcp group config mode=create handle $dhcpgrp
    encap ethernet_ii num_sessions 1 mac_addr= 00.10.94.01.00.01]
set host2 [keylget ret handles]

set ret2 [emulation ancp subscriber lines config mode=create
               ancp_client_handle= $anRouter2
               subscriber_lines_per_access_node= 1
               handle= $host2
               circuit_id= "test"
               remote_id= "cf"
               circuit_id_suffix= 2
               circuit_id_suffix_step= 1
               circuit_id_suffix_repeat= 2
               vlan_allocation_model= "1_1"
               enable_c_vlan= 1
               customer_vlan_id= 1001
               include_encap= 1
               data_link= "ethernet"
               dsl_type= "adsl2"
               actual_rate_upstream= "444"
               upstream_min_rate= "22"
               actual_rate_downstream= "555"]

puts "ret of ancp subscriber config for $anRouter2 : $ret2 \n\n"

set status [keylget ret2 status]
if {$status} {
set anHost1 [keylget ret2 handle]

Sample output for example shown above:

{handle host2}  {ancp_subscriber_lines_handle ancpaccessloopblockconfig2} {status 1}

The following example modifies ANCP subscriber lines on a device:

emulation ancp subscriber lines config mode=modify
                     handle= $hostHnd
                     ancp_client_handle= $anRouter2
                     ancp_subscriber_lines_handle= ancpaccessloopblockconfig2
                     subscriber_lines_per_access_node= 50
                     circuit_id= "modify"
                     remote_id= "spirent"
                     circuit_id_suffix= 3
                     circuit_id_suffix_step= 3
                     circuit_id_suffix_repeat= 4
                     vlan_allocation_model= "1_1"
                     enable_c_vlan= 1
                     customer_vlan_id= 1000
                     customer_vlan_id_step= 2
                     customer_vlan_id_repeat= 1
                     include_encap= 1
                     data_link= "ethernet"
                     dsl_type= "adsl1"
                     actual_rate_upstream= "100"
                     upstream_min_rate= "20"
                     actual_rate_downstream= "200"
                     actual_rate_upstream_repeat= 25
                     actual_rate_downstream_repeat= 25
                     actual_rate_upstream_step= 500
                     actual_rate_downstream_step= 500
                     upstream_attainable_rate= 88

Sample output for example shown above:

{handle host2}  {ancp_subscriber_lines_handle ancpaccessloopblockconfig2} {status 1}

The following example creates ANCP subscriber lines on a device without handle:

set ret2 [emulation ancp subscriber lines config mode=create
               ancp_client_handle= $anRouter2
               subscriber_lines_per_access_node= 1
               circuit_id= "test"
               remote_id= "cf"
               circuit_id_suffix= 2
               circuit_id_suffix_step= 1
               circuit_id_suffix_repeat= 2
               vlan_allocation_model= "1_1"
               enable_c_vlan= 1
               customer_vlan_id= 1001
               include_encap= 1
               data_link= "ethernet"
               dsl_type= "adsl2"
               actual_rate_upstream= "444"
               upstream_min_rate= "22"
               actual_rate_downstream= "555"]

puts "ret of ancp subscriber config for $anRouter2 : $ret2 \n\n"

set status [keylget ret2 status]
if {$status} {
set anHost1 [keylget ret2 handle]

Sample output for example shown above:

{handle {}}  {ancp_subscriber_lines_handle ancpaccessloopblockconfig2} {status 1}

The following example modifies ANCP subscriber lines on a device without handle:

emulation ancp subscriber lines config mode=modify
                     ancp_client_handle= $anRouter2
                     ancp_subscriber_lines_handle= ancpaccessloopblockconfig2
                     subscriber_lines_per_access_node= 50
                     circuit_id= "modify"
                     remote_id= "spirent"
                     circuit_id_suffix= 3
                     circuit_id_suffix_step= 3
                     circuit_id_suffix_repeat= 4
                     vlan_allocation_model= "1_1"
                     enable_c_vlan= 1
                     customer_vlan_id= 1000
                     customer_vlan_id_step= 2
                     customer_vlan_id_repeat= 1
                     include_encap= 1
                     data_link= "ethernet"
                     dsl_type= "adsl1"
                     actual_rate_upstream= "100"
                     upstream_min_rate= "20"
                     actual_rate_downstream= "200"
                     actual_rate_upstream_repeat= 25
                     actual_rate_downstream_repeat= 25
                     actual_rate_upstream_step= 500
                     actual_rate_downstream_step= 500
                     upstream_attainable_rate= 88

Sample output for example shown above:

{handle {}}  {ancp_subscriber_lines_handle ancpaccessloopblockconfig2} {status 1}

emulation ancp control

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

Purpose:
Controls ANCP emulation on a specified port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

       emulation ancp control
           action= {initiate|send|connect|flap|flap_start|flap_stop} M
           ancp_subscriber= {<subscriber_line_handle>|all} M
           action_control= {start|stop} M
           ancp_handle= {<ancp_device_handle>|all}
           subscriber_line_up_time= <integer>
           subscriber_line_down_time= <integer>
           flap_count= <integer>

Arguments:

ancp_handle
                Identifies the handle(s) of the ANCP device(s) to be used.
                Possible values are::


                 <ancp_device_handle> - Defines the handle(s) of ANCP devices
                       to be used. <ancp_device_handle> can be a device
                       handle or a list of device handles.
                       <ancp_device_handle>, the value of this argument, is
                       returned from the
                       ``emulation ancp config`` function when creating
                       ANCP devices. The handle of an ANCP device can be a
                       string of characters except "all". Please refer to the
                       examples for more details.

                  all - Indicates all the devices under the current project.
                       When you specify ancp_handle all, the command will
                       perform the action specified by action on all the
                       devices under the current project. Compared with
                       ancp_handle <ancp_device_handle>,
                       ancp_handle all will make the connection of ANCP
                       sessions faster in largescale tests.

                You must specify this argument when you specify
                action initiate or action send.

ancp_subscriber
                Identifies the handle(s) of the ANCP subscriber line(s) to be
                used. Possible values are::


                 <subscriber_line_handle> - Defines the handle(s) of the ANCP
                      subscriber line(s) to be used.
                      <subscriber_line_handle>, the value of this
                      argument, can be a subscriber line handle or a list of
                      subscriber line handles. <subscriber_line_handle> is
                      returned from the
                      emulation ancp subscriber lines config
                      function when creating ANCP subscriber lines. The
                      handle of an ANCP subscriber line can be a string of
                      characters except "all". Please refer to the examples
                      for more details.

                 all - Indicates all the subscriber lines under the current
                      project. When you specify ancp_subscriber all, the
                      command will perform the action specified by action on
                      all the subscriber lines under the current project.
                      Compared with ancp_subscriber <subscriber_line_handle>,
                      ancp_subscriber all will make the connection of ANCP
                      sessions faster in largescale tests.

                This argument is `Mandatory`.

action
                Specifies the action to perform. Possible values are initiate,
                send, connect, flap, flap_start, and flap_stop. You must specify
                one of these values. The modes are described below::


                 initiate - Initiates the ANCP adjacency. For example:

                    emulation ancp control ancp_handle=$anRouter1
                            ancp_subscriber $anHost1
                            action initiate
                            action_control start

                 send  -  Sends ANCP port up messages.

                 connect - Connects PPPoX or binds DHCP hosts. For example:

                           emulation ancp control ancp_handle=$anRouter1
                                   ancp_subscriber $anHost1
                                   action connect
                                   action_control start

                 flap - Enables flapping on the subscriber line handles specified
                        by the ancp_subscribe argument. This attribute withdraws
                        the subscriber lines for the time defined
                        by subscriber_line_down_time and then readvertises
                        the subscriber lines for the time defined
                        by subscriber_line_up_time.

                        If you specify "flap" for the action argument without
                        defining flap_count, Spirent HLTAPI will perform the
                        flapping operation only once. If you define flap_count
                        while you specify action flap, Spirent HLTAPI will perform
                        the flapping operation the number of times defined by the
                        flap_count argument.

                        For example, if there is a subscriber line $anHost1, a
                        10time flapping of this subscriber line can be processed
                        by calling the following command.

                         emulation ancp control
                            action             flap
                            action_control start
                            ancp_subscriber  $anHost1
                            subscriber_line_up_time  160
                            subscriber_line_down_time      20
                            flap_count          10 \

                 flap_start - Starts the flapping operation on the subscriber line
                        specified by the ancp_subscriber argument.

                 flap_stop - Stops the flapping operation on the subscriber line
                     specified by the ancp_subscriber argument.
                     For example, if there is a subscriber line $anHost1, you can
                     control the flapping operation of this subscriber line by calling
                     the following command:

                      emulation ancp control
                          ancp_subscriber $anHost1
                          action_control start
                          action flap_start

                      # after 1000
                       emulation ancp control
                           ancp_subscriber $anHost1
                           action_control start
                           action flap_stop

                Note: The flap option is a Spirent Extension.

action_control
                Starts or stops the action specified by the action option.
                This argument is `Mandatory`. Possible values are described below::

                 start - Starts the action.

                 stop - Stops the action.

subscriber_line_up_time
                Specifies the amount of time, in milliseconds, that
                the subscriber line remains UP. The value you specify should be
                greater than 100 milliseconds.

subscriber_line_down_time
                Specifies the amount of time, in milliseconds, that
                the subscriber line remains DOWN.
                The value you specify should be greater than 100 milliseconds.

flap_count
                Specifies the number of flaps. This argument can be used when you
                specify action flap. Each flap includes one advertise and one
                withdraw.
Ciscospecific Arguments:

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

peer_count
batch_size
interval
interval_unit
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    Identifies the ANCP device handle.
status     Success (1) or failure (0) of the operation.
log       An error message (if the operation failed).
Description:
The emulation ancp control function connects or disconnects the DUT with ANCP devices, sends port up or port down messages. This function can also control the flapping operation of the subscriber lines.

Examples:

To start the flapping operation:

emulation ancp control
    ancp_handle= $anRouter1
    ancp_subscriber= $anHost1
    action= flap_start
    action_control= start

Sample Output:

{status 1}

emulation ancp stats

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

Purpose:
Returns the statistics about ANCP configuration. Statistics are displayed as a keyed list.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     emulation ancp stats
        handle= <ancp_device_handle> M
        reset= {1}

Arguments:

handle
                Specifies the device from which to extract ANCP session data.
                This argument is `Mandatory`.

reset
                Removes all device configurations for the specified ANCP devices.
                The only value you can specify is 1.
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).
statistics list  The ANCP statistics for the specified device (see below).

The following keys are returned when you call this command:

rx_adj_syn_pkts                The number of received adjacency SYN packets.
rx_adj_syn_ack_pkts            The number of received adjacency SYNACK
                               packets.
rx_adj_ack_pkts                The number of received adjacency ACK packets.
rx_adj_rst_ack_pkts            The number of received adjacency RSTACK
                               packets.

rx_line_config_req             The number of received subscriber line
                               configuration requests.
tx_adj_syn_pkts                The number of sent adjacency SYN packets.
tx_adj_syn_ack_pkts            The number of sent adjacency SYNACK
                               packets.
tx_adj_ack_pkts                The number of sent adjacency ACK packets.
tx_adj_rst_ack_pkts            The number of sent RSTACK packets.

The following returned values are Spirent extensions (for Spirent HLTAPI only):

tx_port_up_count       The number of Port UP packets.
tx_port_down_count     The number of Port DOWN packets.
rx_management_count    The number of received Port Management
                       packets.
tx_keepalive_count     The number of sent keepalive packets.
rx_keepalive_count     The number of received keepalive packets.
keepalive_timeout_count  The number of adjacency timeout packets.
subscribers_up         The number of subscriber lines remains UP.
subscribers_down       The number of subscriber lines remains DOWN.

Ciscospecific Returned Values:

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

  rx_total_pkts
  rx_top_disc_receipt_pkts
  rx_dropped_sub_not_found
  rx_dropped_no_cap
  rx_dropped_adj_not_stsab
  rx_dropped_malformed
  tx_total_pkts
  tx_top_disc_port_up_events
  tx_top_disc_port_down_events
  tx_line_config_receipts
  adj_estab_time_min
  adj_estab_time_avg
  adj_estab_time_max
  adj_estab_count
  adj_estab_percent
  adj_estab_rate
  agg_sub_line_down_bw
  agg_sub_line_up_bw
Description:

The emulation ancp stats function provides information about the availability of the specified device.

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

Examples:

To obtain device information:

emulation ancp stats handle=$anRouter1

Sample Output:

{rx_adj_syn_ack_pkts 0} {tx_adj_ack_pkts 0} {rx_adj_syn_pkts 0}
{tx_adj_syn_ack_pkts 0} {tx_adj_syn_pkts 0} {tx_port_up_count 0}
{rx_management_count 0} {rx_keepalive_count 0} {rx_adj_rst_ack_pkts 0}
{tx_port_down_count 0} {tx_keepalive_count 0} {tx_adj_rst_ack_pkts 0}
{subscribers_up 0} {keepalive_timeout_count 0} {subscribers_down 1}
{rx_adj_ack_pkts 0} {status 1}

End of Procedure Header