LLDP and DCBX Functions

sth::emulation_lldp_config

Purpose

Creates, modifies, or deletes emulated Link Layer Discovery Protocol (LLDP) routers and resets the optional TLVs on a Spirent HLTAPI chassis.

The LLDP is a vendor-neutral Data Link Layer protocol used by network devices to advertise their identity, capabilities, and interconnections on an IEEE 802 LAN network. Please refer to the standards document 802.1AB for more details.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_lldp_config
      [-mode {create|enable|modify|reset_tlv|delete}  M]
      [-port_handle <port_handle>]
      [-handle <lldp_router_handle|device_handle>]
      [-count <integer>]
      [-loopback_ip_addr <a.b.c.d>]
      [-loopback_ip_addr_step <a.b.c.d>]
      [-local_mac_addr <aa:bb:cc:dd:ee:ff>]
      [-local_mac_addr_step <aa:bb:cc:dd:ee:ff>]
      [-vlan_id <1-4095>]
      [-vlan_id_step <1-4095>]
      [-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>]
      [-gateway_ip_addr_step <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_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
      [-enable_ipv6_gateway_learning {1|0}]
      [-intf_ipv6_link_local_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
      [-msg_tx_interval <5-32768>]
      [-msg_tx_hold_multiplier <2-10>]
      [-reinitialize_delay <1-10>]
      [-tx_delay <1-8192>]
      [-tlv_chassis_id_subtype {chassis_component|intf_alias|port_component|mac_addr|
                network_addr_4|network_addr_6|intf_name|locally_assigned|customized}]
      [-tlv_chassis_id_value <chassis_id>]
      [-tlv_port_id_subtype {intf_alias|port_component|mac_addr|network_addr_4|
                network_addr_6|intf_name|agent_circuit_id|locally_assigned|customized}]
      [-tlv_port_id_value <port_id>]
      [-tlv_ttl_value <0-65535>]
      [-reset_tlv_type {lldp|dcbx|both}]
      [-lldp_optional_tlvs <ANY>]
      [-dcbx_tlvs <ANY>]

Arguments

-mode

Specifies the action to be taken. Possible values are described below:

create - Creates the LLDP devices on the port specified by the
         -port_handle argument.

enable - Creates emulated Link Layer Discovery Protocol (LLDP)
       routers on the device specified with the -handle argument.

modify - Modifies the LLDP devices specified by the -handle argument.

reset_tlv - Deletes the optional TLVs included in the LLDP messages.

delete - Deletes the created LLDP devices.
-handle

Specifies the LLDP handle returned from sth::emulation_lldp_config. This argument is Mandatory in the mode of modify, enable, delete, or reset_tlv. When -mode is set to either modify, delete or reset_tlv, the value is the device handle returned by the sth::emulation_lldp_config function. When -mode is set to enable, the value is the device handle returned by other protocol emulation functions with mode create.

-count

Defines the number of devices to create on the interface. This argument is used when you increment these addresses:

intf_ip_addr
gateway_ip_addr
loopback_ip_addr
local_mac_addr
vlan_id
intf_ipv6_addr
gateway_ipv6_addr

The default value is 1.

-loopback_ip_addr

Defines the starting Loopback IPv4 address for the emulated LLDP devices. The default value is 192.0.0.1. The value must be in IPv4 format.

-loopback_ip_addr_step

Defines the increment used to generate Loopback IPv4 addresses of multiple LLDP devices. The default value is 0.0.0.1.

-local_mac_addr

Specifies the starting local interface MAC address for the emulated LLDP devices. The value must be in MAC address format. The default value is 00:10:94:00:00:01.

-local_mac_addr_step

Defines the increment used to generate the MAC addresses of the multiple emulated LLDP devices. The value must be in MAC address format. The default value is 00:00:00:00:00:01.

-vlan_id

Indicates the VLAN ID of the local logical interface of the emulated LLDP devices. Possible values range from 1 to 4095. The default value is 1.

-vlan_id_step

Defines the increment used to generate the VLAN ID of multiple emulated LLDP devices. This argument is used with the -vlan_id argument.

-intf_ip_addr

Defines the starting Ipv4 address of the local interface of the emulated LLDP device. The default value is 192.85.1.3.

-intf_ip_addr_step

Defines the increment used to generate the IPv4 addresses for multiple emulated devices. The default value is 0.0.0.1.

-intf_ip_prefix_length

Specifies the prefix length for the IPv4 address of local interface on emulated LLDP device. Possible values range from 0 to 32. The default value is 24.

-gateway_ip_addr

Spirent Extension (for Spirent HLTAPI only).

Configures the gateway under IP interface object of the device. The default value is 192.85.1.1.

-gateway_ip_addr_step

Defines the increment used to generate gateway addresses for multiple devices. The default value is 0.0.0.0.

-intf_ipv6_addr

Specifies the local Interface IPv6 addresses of the emulated LLDP devices. The value must be in IPv6 format. The default value is 2000::2.

-intf_ipv6_addr_step

Defines the increment used to generate the local Interface IPv6 addresses of the emulated LLDP devices. The default value is 0000::1.

-intf_ipv6_prefix_length

Defines the prefix length for the IPv6 address of local interface on emulated LLDP device. Possible values range from 0 to 128. The default value is 64.

-gateway_ipv6_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the gateway under IP interface object of the device. The default value is ::0.

-gateway_ipv6_addr_step

Defines the increment used to generate the gateway addresses for multiple emulated devices. The default value is 0000::0000.

-enable_ipv6_gateway_learning

Determines whether to enable IPv6 learning for the gateway IP and MAC addresses or not. Possible values are 1 and 0. The default value is 0. When it is set to 1, the learning begins when the ARP/ND command is issued. If the learned value is not as same as the configured IPv6 gateway address, the learned value is used instead of the configured IPv6 gateway address.

Specifies the IPv6 link-local address for emulated LLDP devices. The value must be in IPv6 format.

-msg_tx_interval

Defines the interval (in seconds) between successive transmit cycles. Possible values range from 5 to 32768. The default value is 30.

-msg_tx_hold_multiplier

Used to calculate how long to retain information. This value is multiplied by the Message Tx Interval (-msg_tx_interval) to establish the Time To Live value. Possible values range from 2 to 10. The default value is 4.

-reinitialize_delay

Specifies the delay (in seconds) after LLDP adminStatus becomes disabled before re-initialization is attempted. Possible values range from 1 to 10. The default value is 2.

-tx_delay

Specifies the minimum delay (in seconds) between successive LLDP message transmissions. Possible values range from 1 to 8192. The default value is 2.

-tlv_chassis_id_subtype

Specifies the Subtype Field value in LLDP Chassis ID TLV. The Chassis ID TLV is a Mandatory TLV that identifies the chassis containing the IEEE 802 LAN station associated with the transmitting LLDP agent. The Subtype field defines the type of LLDP chassis ID which would be given in the Value Field in this TLV. The default value is network_addr_4. Possible values described below:

chassis_component - Chassis component, subtype ID is 1.

intf_alias        - Interface alias, subtype ID is 2.

port_component    - Port component, subtype ID is 3.

mac_addr          - MAC address, subtype ID is 4.

network_addr_4    - IPv4 network address, subtype ID is 5.

network_addr_6    - IPv6 network address, subtype ID is 5.

intf_name         - Interface name, subtype ID is 6.

locally_assigned  - Locally assigned, subtype ID is 7.

customized        - Subtype id is 0.
-tlv_chassis_id_value

Defines the Value Field value in LLDP Chassis ID TLV. This argument defines the value of the chassis ID.

-tlv_port_id_subtype

The Subtype Field value in LLDP Port ID TLV. The Port ID TLV is a Mandatory TLV that identifies the port component of the MAC service access point (MSAP) identifier associated with the transmitting LLDP agent. The Subtype Field value defines the type of LLDP port ID which would be given in the Value Field in this TLV.

Possible values are:

intf_alias        - Interface alias, subtype ID is 1.

port_component    - Port component, subtype ID is 2.

mac_addr          - MAC address, subtype ID is 3.

network_addr_4    - IPv4 network address, subtype ID is 4.

network_addr_6    - IPv6 network address, subtype ID is 4.

intf_name         - Interface name, subtype ID is 5.

agent_circuit_ID  - Agent circuit ID, subtype ID is 6.

locally_assigned  - Locally assigned, subtype ID is 7.

customized        - Subtype ID is 0.

The default value is mac_addr.

-tlv_port_id_value

Value Field value in LLDP Port ID TLV. Defines the value of port ID.

-tlv_ttl_value

Value Field value in LLDP TTL TLV. Defines the TTL value. Possible value range from 0 to 65535.

-reset_tlv_type

Defines the type of TLVs when you reset optional TLVs in reset_tlv mode. This argument is available when you set mode -reset_tlv. Possible values are described below:

lldp - Deletes all LLDP optional TLVs configured in the session.

dcbx - Deletes all Data Center Bridging Capability Exchange Protocol
      (DCBX) TLVs configured.

both - Both of LLDP Optional TLVs and DCBX TLVs will be removed..
-lldp_optional_tlvs

Defines the optional LLDP TLVs. The value should be the returned handle of the sth::emulation_lldp_optional_tlv_config command. This argument is available when you set the -mode argument to create or modify.

-dcbx_tlvs

Defines the DCBX TLVs. The value should be the returned handle of the sth::emulation_lldp_dcbx_tlv_config command.

Arguments Unsupported by Save as HLTAPI

None

Return Values

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

SUCCESS
     {{status 1} {handle XXX}}

FAILURE
     {{status 0} {log XXX}}

Description

The sth::emulation_lldp_config command configures LLDP emulation on the specified test port. This command can create, modify, and delete an emulated LLDP router and resets optional TLVs on a Spirent HLTAPI chassis.

In create mode, you can create and configure one or more routers with LLDP protocol. And the handle of LLDP router will be returned. The LLDP devices can be further configured in modify mode and removed in delete mode. You can modify only one router once, but you can create or delete one or more routers at one time. Use the -mode argument to specify the action to perform.(See the -mode argument description for information about the actions.)

If the performed action fails, Spirent HLTAPI returns an error message. For example, if the user tries to configure a nonexistent session handle in modify mode, Spirent HLTAPI will return an error message.

Examples

#### HLTAPI for Tcl ####

To create and configure a new LDP router:

#There must be a port with the handle of port_handle1. The following
#examples use the port with the handle of port_handle1.
  set returnKlist [::sth::emulation_lldp_config
                       -port_handle port_handle1\
                       -mode create\
                       -count 1\
                       -loopback_ip_addr 192.2.0.1\
                       -loopback_ip_addr_step 0.0.0.1\
                       -local_mac_addr 00:94:01:00:00:01\
                       -local_mac_addr_step 00:00:00:00:00:01\
                       -vlan_id 110\
                       -vlan_id_step 2\
                       -intf_ip_addr 192.168.1.254\
                       -intf_ip_addr_step 0.0.1.0\
                       -intf_ip_prefix_length 24\
                       -gateway_ip_addr 192.168.1.1\
                       -gateway_ip_addr_step 0.0.1.0\
                       -intf_ipv6_addr 2000::100]

  set lldpRouterHandle [lindex [keylget returnKlist handle] 0]

To modify the created LLDP router(s):

set returnKlist [::sth::emulation_lldp_config -handle $lldpRouterHandle \
                    -msg_tx_interval 5 \
                    -mode modify]

To reset optional TLVs in the created LLDP router:

set returnKlist [::sth::emulation_lldp_config -handle $lldpRouterHandle \
                   -mode reset_tlv]

To delete the created LLDP router:

set returnKlist [::sth::emulation_lldp_config -handle $lldpRouterHandle \
                   -mode delete]

Sample output:

{{status 1} {handle $lldpRouterHandle}}

#### HLTAPI for Python ####

The following example creates and configures a LLDP router:

#There must be a port with handle port_handle[0], an optional LLDP TLV with
#handle lldp_optional_tlv_hdl, and a DCBX TLV ith handle lldp_dcbx_tlv_hdl.
  device_ret0 = sth.emulation_lldp_config (
                mode                = 'create',
                lldp_optional_tlvs  = lldp_optional_tlv_hdl,
                dcbx_tlvs           = lldp_dcbx_tlv_hdl,
                reset_tlv_type      = 'both',
                tlv_chassis_id_subtype= 'network_addr_4',
                tlv_chassis_id_value= '192.168.1.1',
                tlv_port_id_subtype = 'mac_addr',
                tlv_port_id_value   = '00:00:00:00:00:00',
                tlv_ttl_value       = '0',
                port_handle         = port_handle[0],
                tx_delay            = '2',
                msg_tx_hold_mutiplier= '4',
                msg_tx_interval     = '30',
                reinitialize_delay  = '2',
                loopback_ip_addr    = '192.0.0.1',
                local_mac_addr      = '00:10:94:00:00:01',
                intf_ip_prefix_length= '24',
                intf_ip_addr        = '192.85.1.3',
                gateway_ip_addr     = '192.85.1.1');

Sample Output:

{'status': '1', 'handle': 'router1'}

#### HLTAPI for Perl ####

The following example creates and configures a LLDP router:

#There must be a port with handle port_handle[0], an optional LLDP TLV with
#handle lldp_optional_tlv_hdl, and a DCBX TLV ith handle lldp_dcbx_tlv_hdl.

  my %device_ret1 = sth::emulation_lldp_config (
                mode                => 'create',
                lldp_optional_tlvs  => "$lldp_optional_tlv_hdl",
                dcbx_tlvs           => "$lldp_dcbx_tlv_hdl",
                reset_tlv_type      => 'both',
                tlv_chassis_id_subtype=> 'network_addr_4',
                tlv_chassis_id_value=> '192.168.1.1',
                tlv_port_id_subtype => 'mac_addr',
                tlv_port_id_value   => '00:00:00:00:00:00',
                tlv_ttl_value       => '0',
                port_handle         => "$hport[2]",
                tx_delay            => '2',
                msg_tx_hold_mutiplier=> '4',
                msg_tx_interval     => '30',
                reinitialize_delay  => '2',
                loopback_ip_addr    => '192.0.0.2',
                local_mac_addr      => '00:10:94:00:00:02',
                intf_ip_prefix_length=> '24',
                intf_ip_addr        => '193.85.1.3',
                gateway_ip_addr     => '193.85.1.1');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'router1';
$VAR3 = 'status';
$VAR4 = '1';

End of Procedure Header

sth::emulation_lldp_optional_tlv_config

Purpose

Configures the LLDP optional TLVs. The LLDP Optional TLVs are organizationally specific extension sets of TLVs that are defined by standards groups such as IEEE 802.1, IEEE 802.3, and others, to enhance management of network stations that are operating with particular media and/or protocols.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_lldp_optional_tlv_config
    [-tlv_port_description_enable {1|0}]
    [-tlv_port_description_value {alphanum}]
    [-tlv_system_name_enable {1|0}]
    [-tlv_system_name_value <ANY>]
    [-tlv_system_description_enable {1|0}]
    [-tlv_system_description_value <ANY>]
    [-tlv_system_capabilities_enable {1|0}]
    [-tlv_system_capabilities_value <8-bit binary>]
    [-tlv_enabled_capabilities_value <8-bit binary>]
    [-tlv_management_addr_enable {1|0}]
    [-tlv_management_addr_count <integer>]
    [-tlv_management_addr_subtype_list <ANY>]
    [-tlv_management_addr_value_list <ANY>]
    [-tlv_management_addr_intf_numbering_subtype_list <ANY>]
    [-tlv_management_addr_intf_number_value_list <ANY>]
    [-tlv_management_addr_oid_value_list <ANY>]
    [-tlv_port_vlanid_enable {1|0}]
    [-tlv_port_vlanid_value <hexadecimal>]
    [-tlv_port_and_protocol_vlanid_enable {1|0}]
    [-tlv_port_and_protocol_vlanid_count <integer>]
    [-tlv_port_and_protocol_vlanid_value_list <hexadecimal>]
    [-tlv_port_and_protocol_vlanid_enabled_flag_list <list of flags>]
    [-tlv_port_and_protocol_vlanid_supported_flag_list <list of flags>]
    [-tlv_vlan_name_enable {1|0}]
    [-tlv_vlan_name_count <integer>]
    [-tlv_vlan_name_vid_list <ANY>]
    [-tlv_vlan_name_value_list <ANY>]
    [-tlv_protocol_identity_enable {1|0}]
    [-tlv_protocol_identity_count <integer>]
    [-tlv_protocol_identity_value_list <ANY>]
    [-tlv_mac_phy_config_status_enable {1|0}]
    [-tlv_mac_phy_config_status_auto_negotiation_supported_flag {1|0}]
    [-tlv_mac_phy_config_status_auto_negotiation_status_flag {1|0}]
    [-tlv_mac_phy_config_status_auto_negotiation_advertised_capability
         <hexadecimal>]
    [-tlv_mac_phy_config_status_operational_mau_type <hexadecimal>]
    [-tlv_power_via_mdi_enable {1|0}]
    [-tlv_power_via_mdi_power_support_bits <4-bit binary>]
    [-tlv_power_via_mdi_pse_power_pair {signal | spare}]
    [-tlv_power_via_mdi_pse_power_class
                  {class1|class2|class3|class4|class5}
    [-tlv_link_aggregation_enable {1|0}]
    [-tlv_link_aggregation_status_flag {1|0}]
    [-tlv_link_aggregation_capability_flag {1|0}]
    [-tlv_link_aggregation_aggregated_port_id  <hexadecimal>]
    [-tlv_maximum_frame_size_enable {1|0}]
    [-tlv_maximum_frame_size_value <integer>]
    [-tlv_customized_enable {1|0}]
    [-tlv_customized_type <integer>]
    [-tlv_customized_value <hexadecimal>]

Arguments

-tlv_port_description_enable

Determines whether to enable Port Description TLVs in the created LLDP devices. The Port Description TLVs allows network management to advertise the IEEE 802 LAN station’s port description. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will add or enable the Port Description TLVs in the created LLDP devices. The default value is 0.

-tlv_port_description_value

Specifies the Value Field of Port Description TLVs. The default value is “Spirent Port”.

-tlv_system_name_enable

Determines whether to enable System Name TLVs in the created LLDP devices. The System Name TLVs allows network management to advertise the system’s assigned name. Possible values are 1 and 0. When it is set to 1, Spirent HLTAPI adds or enables System Name TLVs in the created LLDP devices. The default value is 0.

-tlv_system_name_value

Specifies the Value Field of System Name TLVs. The default value is “Spirent Test Center”.

-tlv_system_description_enable

Determines whether to enable System Description TLVs in the created LLDP devices. The System Description TLVs allows network management to advertise the system’s description. Possible values are 1 and 0. The default value is 0.

-tlv_system_description_value

Specifies the Value Field of System Description TLVs. The default value is “Spirent Test Center”.

-tlv_system_capabilities_enable

Determines whether to enable System Capabilities TLVs in the created LLDP devices. The System Capabilities TLVs is an optional TLV that identifies the primary function(s) of the system and whether or not these primary functions are enabled. Possible values are 1 and 0. When it is set to 1, the System Capabilities TLVs is enabled. The default value is 0.

-tlv_system_capabilities_value

Specifies the Value Field of System Capabilities Flags in System Capabilities TLVs. The System Capabilities Flags has 16 binary bits (two bytes). The bit position is listed below:

Bit Capability Reference
  0   Other
  1   Repeater
  2   Bridge
  3   WLAN Access Point
  4   Router
  5   Telephone
  6   DOCSIS cable device
  7   Station Only
  8-15 Reserved

Spirent HLTAPI supports the first 8 bits. Please input an 8-bit binary number according to the bit position. The default value is 10000.

-tlv_enabled_capabilities_value

Specifies the Value Field of Enabled Capabilities Flags in System Capabilities TLVs. The Enabled Capabilities Flags has 16 binary bits (two bytes). The bit position is listed below:

Bit Capability Reference
  0   Other
  1   Repeater
  2   Bridge
  3   WLAN Access Point
  4   Router
  5   Telephone
  6   DOCSIS cable device
  7   Station Only
  8-15 Reserved

Spirent HLTAPI supports the first 8 bits, please input an 8-bit binary number for this argument according to the bit position above. The default value is 10000.

-tlv_management_addr_enable

Determines whether to enable Management Address TLVs in the created LLDP devices. The Management Address TLVs identifies an address associated with the local LLDP agent that may be used to reach higher layer entities to assist discovery by network management. The TLV also provides room for the inclusion of both the system interface number and an object identifier (OID) that are associated with this management address, if either or both are known. Possible values are 1 and 0. When it is set to 1, Spirent HLTAPI enables Management Address TLVs in the created LLDP devices. The default value is 0.

-tlv_management_addr_count

Defines the number of Management Address TLVs. The default value is 1.

-tlv_management_addr_subtype_list

Defines the list of Address Subtype Field values in Management Address TLVs. The number of listed values must be equal to the value of -tlv_management_addr_count. Each of the values will be set to one Management Address TLVs according to the list order. Possible Values for each Subtype Field are listed below:

Value     Description
00        Other
01        IPv4
02        IPv6
03        nsap
04        hdlc
05        bbn1822
06        All 802
07        e163
08        e164
09        f69
0A        x121
0B        IPX
0C        Apple Talk
0D        DEC Net IV
0E        Banyan Vines
0F        E164 with NSAP
10        DNS
11        Distinguished Name
12        AS Number
13        XTP over IPv4
14        XTP over IPv6
15        XTP native mode XTP
16        Fibre Channel WWPN
17        Fibre Channel WWNN
18        Gateway Identifier
19        AFI
-tlv_management_addr_value_list

Defines the list of Address Field values in Management Address TLVs. The number of listed values must be equal to the value of -tlv_management_addr_count. Each value on the list will be set to one Management Address TLVs according to the list order. If the corresponding address subtype is a value in IPv4 or IPv6 format, please input the relevant IPv4 or IPv6 address value; if not, please input a hexadecimal value.

-tlv_management_addr_intf_numbering_subtype_list

Defines the list of Interface Numbering Subtype Field values in Management Address TLVs. The number of listed values must be equal to the number defined by the -tlv_management_addr_count argument. Each the value on the list will be set to one Management Address TLVs according to the list order. Possible values and their descriptions are listed below:

Value          Description
01             Unknown
02             IfIndex
03             SystemPortNumber
-tlv_management_addr_intf_number_value_list

Specifies Interface Number Field values in Management Address TLVs. The value of this argument can be an integer or a list of integers. Each integer defined by this argument indicates an interface number that is an assigned number within the system identifying the specific interface associated with this management address. The number of integers defined by this argument must be equal to the number defined by -tlv_management_addr_count. Each integer will be set to the corresponding Management Address TLV according to the list order.

-tlv_management_addr_oid_value_list

Specifies the list of Object Identifier (OID) Field values in Management Address TLVs. The number of values on the list must be equal to the number defined by -tlv_management_addr_count. Each value on the list will be set to one Management Address TLVs according to the order. The individual OID Field value must be an octet string.

-tlv_port_vlanid_enable

Determines whether to enable Port VLAN ID TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will enable the Port VLAN ID TLVs in the created LLDP devices. The default value is 0.

-tlv_port_vlanid_value

Specifies the Value Field of Port VLAN ID TLVs. The value should be a hexadecimal value. The value length may be from 1 to 4 bits. The default value is 1.

-tlv_port_and_protocol_vlanid_enable

Determines whether to enable Port and Protocol VLAN ID TLVs in the created LLDP devices. Possible values are 1 and 0. When it is set to 1, Spirent HLTAPI will enable Port and Protocol VLAN ID TLVs in the created LLDP devices. The default value is 0.

-tlv_port_and_protocol_vlanid_count

Specifies the number of Port VLAN ID TLVs to be added. The value of this argument must be an integer. The default value is 1.

-tlv_port_and_protocol_vlanid_value_list

Specifies Value Field values in Port and Protocol VLAN ID TLVs. The value of this argument can be a hexadecimal value or a list of hexadecimal values. The number of hexadecimal values defined by this argument must be equal to the number defined by -tlv_port_and_protocol_vlanid_count. You should use spaces to separate the hexadecimal values on the list. Each value on the list will be set to one Port and Protocol VLAN ID TLV according to the order of values on the list. The possible length of the hexadecimal values are from 1 to 4 bits. The default value is 0.

-tlv_port_and_protocol_vlanid_enabled_flag_list

Specifies the Enabled Flag Field values in the Port and Protocol VLAN ID TLVs. The value of this argument can be a flag or a list of flags. The flags indicate whether the corresponding Port and Protocol VLAN is enabled or not. The number of values defined by this argument must be equal to the number defined by -tlv_port_and_protocol_vlanid_count. You must use spaces to separate the flags on the list. Each value on the list must be 0 or 1. The flags will be set to the corresponding Protocol VLAN ID TLV according to the order of the Port and Protocol VLAN ID on the list defined by the -tlv_port_and_protocol_vlanid_value_list argument. The default value is 1.

-tlv_port_and_protocol_vlanid_supported_flag_list

Indicates the Supported Flag Field values in Port and Protocol VLAN ID TLVs. The value of this argument can be a flag (0 or 1) or a list of flags. The number of flags defined by this argument must be equal to the number defined by the -tlv_port_and_protocol_vlanid_count argument. You should use spaces to separate the flags on the list. Each flag on the list indicates whether the corresponding Port and Protocol VLAN ID is supported or not. The default value is 1.

-tlv_vlan_name_enable

Determines whether to enable VLAN Name TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, the VLAN Name TLVs will be enabled. The default value is 0.

-tlv_vlan_name_count

Defines the number of VLAN Name TLVs to be enabled. The value of this argument must be an integer. The default value is 1.

-tlv_vlan_name_vid_list

Specifies the VLAN ID Field values in VLAN Name TLVs. The value of this argument can be an integer or a list of integers. Each integer indicates a VLAN ID. The number of integers on the list must be equal to the number defined by -tlv_vlan_name_count. You should use spaces to separate the integers on the list. Each integer on the list indicates the VLAN ID Field value in its corresponding VLAN Name TLV.

-tlv_vlan_name_value_list

Specifies the VLAN Name Field values in VLAN Name TLVs. The value of this argument can be an alphanumeric value or a list of alphanumeric values. Each alphanumeric value defines a VLAN Name. The number of alphanumeric values defined by this argument must be equal to the number defined by -tlv_vlan_name_count. You should use spaces to separate the alphanumeric values on the list.

-tlv_protocol_identity_enable

Determines whether to enable Protocol Identity TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will enable Protocol Identity TLVs in the created LLDP devices. The default value is 0.

-tlv_protocol_identity_count

Defines the number of Protocol Identity TLVs to be enabled. The value of this argument must be an integer. The default value is 1.

-tlv_protocol_identity_value_list

Defines the Value Field values in Protocol Identity TLVs. The value of this argument can be a hexadecimal value or a list of hexadecimal values. Each hexadecimal value defines a protocol identity. The number of hexadecimal values defined by this argument must be equal to the number defined by -tlv_protocol_identity_count. You should use spaces to separate the hexadecimal values on the list.

-tlv_mac_phy_config_status_enable

Determines whether to enable MAC/PHY Configuration/Status TLVs in the created LLDP devices. PHY indicates the physical sublayer. Possible values are 1 and 0. When it is set to 1, the MAC/PHY Configuration/Status TLVs are enabled. The default value is 0.

-tlv_mac_phy_config_status_auto_negotiation_supported_flag

Specifies the Auto-negotiation support Flag Field of MAC/PHY Configuration/Status TLVs. Possible values are 1 and 0. When it is set to 1, the Auto-negotiation function is supported. The default value is 0.

-tlv_mac_phy_config_status_auto_negotiation_status_flag

Specifies the Auto-negotiation status Flag Field of MAC/PHY Configuration/Status TLVs. Possible values are 1 and 0. When it is set to 1, the Auto-negotiation is enabled. The default value is 0.

-tlv_mac_phy_config_status_auto_negotiation_advertised_capability

Specifies the PMD auto-negotiation advertised capability Field of MAC/PHY Configuration/Status TLVs. PMD indicates the physical media dependent sublayer. The value of this argument must be a 4-bit hexadecimal value. The default value is 800.

-tlv_mac_phy_config_status_operational_mau_type

Specifies the Operational MAU Type Field of MAC/PHY Configuration/Status TLVs. MAU indicates the Medium Attachment Unit. The value of this argument must be a 4-bit hexadecimal value. The default value is 0000.

-tlv_power_via_mdi_enable

Determines whether to enable Power Via Media Dependent Interface (MDI) TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will enable Power Via MDI TLVs in the created LLDP devices. The default value is 0.

-tlv_power_via_mdi_power_support_bits

Specifies the MDI power support Field of Power Via MDI TLVs. The value of this argument must be a 4-bit binary. The default value is 0. The MDI power support field shall contain a bit-map of the MDI power capabilities and status as defined below:

Bit Function Value/meaning  0 Port class 1 = PSE  0 = PD
1   PSE MDI power support   1 = supported
                            0 = not supported
2   PSE MDI power state     1 = enabled
                            0 = disabled
3   PSE pairs control       1 = pair selection can be controlled
    ability                 0 = pair selection cannot be controlled
4-7 Reserved

Spirent HLTAPI supports the first 4 bits.

-tlv_power_via_mdi_pse_power_pair

Specifies the power sourcing equipment (PSE) power pair Field of Power Via MDI TLVs. Possible values are:

signal - Type value of 0x01. Indicates only the signal pairs are in
         use.

spare -Type value of 0x02. Indicates only the spare pairs are in use.

The default value is signal.

-tlv_power_via_mdi_pse_power_class

Specifies the PSE power class Field of Power Via MDI TLVs. Possible values are:

class1 - class type of 0x01 (Default) class2 - class type of 0x02 class3 - class type of 0x03 class4 - class type of 0x04 class5 - class type of 0x05

Determines whether to enable Link Aggregation TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will enable Link Aggregation TLVs in the created LLDP devices. The default value is 0.

Specifies the status Field of Link Aggregation TLVs. The Link Aggregation TLV informs the remote port whether or not the sending port believes it is currently in a link aggregation. It also provides Port ID information for the aggregated port so a management station can efficiently access the link aggregation management objects. Possible values are 0 and 1. When it is set to 1, the link is currently in aggregation. When it is set to 0, the link is not currently in aggregation. The default value is 1.

Specifies the capability Field of Link Aggregation TLV. Possible values are 0 and 1. When it is set to 1, the link is capable of being aggregated. When it is set to 0, the link is capable of being aggregated. The default value is 1.

Specifies the port ID Field of Link Aggregation TLVs. The value of this argument must be an 8-bit hexadecimal value. The default value is 0000000E.

-tlv_maximum_frame_size_enable

Determines whether to enable Maximum Frame Size TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will enable Maximum Frame Size TLVs. The default value is 0.

-tlv_maximum_frame_size_value

Specifies the Maximum Frame Size Field of Link Aggregation TLVs. Possible values range from 0 to 65535. The default value is 1518.

-tlv_customized_enable

Determines whether to enable customized TLVs in the created LLDP devices. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will enable customized TLVs in the created LLDP devices. The default value is 0.

-tlv_customized_type

Specifies the type Field of customized TLV. Possible values range from 0 to 127. The default value is 9.

-tlv_customized_value

Specifies the value Field of customized TLV. The default value is 0. The value of this argument must be hexadecimal.

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

SUCCESS::
     {{status 1} {handle xxxxx}}

FAILURE::
     {{status 0} {log XXX}}

Description

The sth::emulation_lldp_optional_tlv_config configures LLDP optional TLVs. You can use this command to specify the content of the following TLVs for a test:

Port Description TLV
System Name TLV
System Description TLV
System Capabilities TLV
Management Address TLV
Port VLAN ID TLV
Port and Protocol VLAN ID TLV
VLAN Name TLV
Protocol Identity TLV
MAC/PHY Configuration/Status TLV
Power Via MDI TLV
Link Aggregation TLV
Maximum Frame Size TLV
Customized TLV

All the arguments of this command are optional.

Please refer to 802.1AB-2005, “Station and Media Access Control Connectivity Discovery”, for more information.

Examples

#### HLTAPI for Tcl ####

Sample Input:

sth::emulation_lldp_optional_tlv_config -tlv_port_description_enable 1\
          -tlv_port_description_value "AT Test Port"\
          -tlv_system_name_enable 1\
          -tlv_system_name_value "AT Test System"\
          -tlv_system_description_enable 1\
          -tlv_system_description_value "AT Test"\
          -tlv_system_capabilities_enable 1\
          -tlv_system_capabilities_value "11111111"\
          -tlv_enabled_capabilities_value "11111111"\
          -tlv_management_addr_enable 1\
          -tlv_management_addr_count 2\
          -tlv_management_addr_subtype_list "ipv4 ipv6"\
          -tlv_management_addr_value_list "192.168.1.1 2000::1"\
          -tlv_management_addr_intf_numbering_subtype_list "01 02"\
          -tlv_management_addr_intf_number_value_list "100 101"\
          -tlv_management_addr_oid_value_list "0e 0a"

Sample output:

{{status 1} {handle XXXXX}}

#### HLTAPI for Python ####

The following example creates multiple LLDP optional TLVs:

device_ret0_optional_tlv_config = sth.emulation_lldp_optional_tlv_config (
               tlv_enabled_capabilities_value= '00001000',
               tlv_management_addr_count= '2',
               tlv_management_addr_enable= '1',
               tlv_management_addr_intf_number_value_list= ['0','0'],
               tlv_management_addr_intf_numbering_subtype_list= ['01','01'],
               tlv_management_addr_oid_value_list= ['0A','0'],
               tlv_management_addr_subtype_list= ['ipv4','ipv4'],
               tlv_management_addr_value_list= ['00','00'],
               tlv_port_and_protocol_vlanid_count= '2',
               tlv_port_and_protocol_vlanid_enable= '1',
               tlv_port_and_protocol_vlanid_enabled_flag_list= ['1','1'],
               tlv_port_and_protocol_vlanid_supported_flag_list= ['1','1'],
               tlv_port_and_protocol_vlanid_value_list= ['0000','0000'],
               tlv_port_description_enable= '1',
               tlv_port_description_value= ['Spirent','Port'],
               tlv_port_vlanid_enable= '1',
               tlv_port_vlanid_value= '0001',
               tlv_protocol_identity_count= '2',
               tlv_protocol_identity_enable= '1',
               tlv_protocol_identity_value_list= ['0000','0000'],
               tlv_system_capabilities_enable= '1',
               tlv_system_capabilities_value= '00001000',
               tlv_system_description_enable= '1',
               tlv_system_description_value= ['Spirent','Test','Center'],
               tlv_system_name_enable= '1',
               tlv_system_name_value= ['Spirent','Test','Center']);

Sample Output:

{'status': '1', 'handle': 'XXXXX'}

#### HLTAPI for Perl ####

The following example creates multiple LLDP optional TLVs:

my %device_ret2_optional_tlv_config = sth::emulation_lldp_optional_tlv_config (
               tlv_enabled_capabilities_value=> '11111111',
               tlv_management_addr_count=> '1',
               tlv_management_addr_enable=> '1',
               tlv_management_addr_intf_number_value_list=> '10',
               tlv_management_addr_intf_numbering_subtype_list=> '01',
               tlv_management_addr_oid_value_list=> '01',
               tlv_management_addr_subtype_list=> 'ipv4',
               tlv_management_addr_value_list=> '0.0.0.1',
               tlv_port_description_enable=> '1',
               tlv_port_description_value=> 'Spirent Port ',
               tlv_port_vlanid_enable=> '1',
               tlv_port_vlanid_value=> '0002',
               tlv_system_capabilities_enable=> '1',
               tlv_system_capabilities_value=> '11111111',
               tlv_system_description_enable=> '1',
               tlv_system_description_value=> 'Spirent Test Center ',
               tlv_system_name_enable=> '1',
               tlv_system_name_value=> 'Spirent Test Center ');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'XXXXX';
$VAR3 = 'status';
$VAR4 = 1;

End of Procedure Header

sth::emulation_lldp_dcbx_tlv_config

Purpose

Configures the DCBX TLVs.

The data center discovery and capability exchange protocol(DCBX) is a protocol that is used by DCB devices to exchange configuration information with directly connected peers. The protocol may also be used for misconfiguration detection and for configuration of the peer.

You can use the DCBX to achieve the following goals: Discovery of DCB capability in a peer, DCB feature misconfiguration detection, and Peer configuration of DCB features.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_lldp_dcbx_tlv_config
      [-version_num {Ver_100 | Ver_103}]
      [-control_tlv_oper_version <0-255>]
      [-control_tlv_max_version <0-255>]
      [-pg_feature_tlv1_enable {1|0}]
      [-pg_feature_tlv1_oper_version <0-255>]
      [-pg_feature_tlv1_max_version <0-255>]
      [-pg_feature_tlv1_enabled_flag {1|0}]
      [-pg_feature_tlv1_willing_flag {1|0}]
      [-pg_feature_tlv1_error_flag {1|0}]
      [-pg_feature_tlv1_subtype <0-255>]
      [-pg_feature_tlv1_bwg_percentage_list <list of integers>]
      [-pg_feature_tlv1_prio_alloc_bwg_id_list <list of integers>]
      [-pg_feature_tlv1_prio_alloc_strict_prio_list <list of integers>]
      [-pg_feature_tlv1_prio_alloc_bw_percentage_list <list of integers>]
      [-pfc_feature_tlv1_enable {1|0}]
      [-pfc_feature_tlv1_oper_version <0-255>]
      [-pfc_feature_tlv1_max_version <0-255>]
      [-pfc_feature_tlv1_enabled_flag {1|0}]
      [-pfc_feature_tlv1_willing_flag {1|0}]
      [-pfc_feature_tlv1_error_flag {1|0}]
      [-pfc_feature_tlv1_subtype <0-255>]
      [-pfc_feature_tlv1_admin_mode_bits <8-bit binary>]
      [-application_feature_tlv1_enable {1|0}]
      [-application_feature_tlv1_oper_version <0-255>]
      [-application_feature_tlv1_max_version <0-255>]
      [-application_feature_tlv1_enabled_flag {1|0}]
      [-application_feature_tlv1_error_flag {1|0}]
      [-application_feature_tlv1_subtype <0-255>]
      [-application_feature_tlv1_prio_map <8-bit binary>]
      [-bcn_feature_tlv1_enable {1|0}]
      [-bcn_feature_tlv1_oper_version <0-255>]
      [-bcn_feature_tlv1_max_version <0-255>]
      [-bcn_feature_tlv1_enabled_flag {1|0}]
      [-bcn_feature_tlv1_willing_flag {1|0}]
      [-bcn_feature_tlv1_error_flag {1|0}]
      [-bcn_feature_tlv1_subtype <0-255>]
      [-bcn_feature_tlv1_bcna_value <hexadecimal>]
      [-bcn_feature_tlv1_cp_admin_mode_list <list of flags>]
      [-bcn_feature_tlv1_rp_admin_mode_list <list of flags>]
      [-bcn_feature_tlv1_rp_oper_mode_list <list of flags>]
      [-bcn_feature_tlv1_rem_tag_oper_mode_list <list of flags>]
      [-bcn_feature_tlv1_rp_w <integer>]
      [-bcn_feature_tlv1_rp_tmax <integer>]
      [-bcn_feature_tlv1_rp_rmin <integer>]
      [-bcn_feature_tlv1_rp_td <integer>]
      [-bcn_feature_tlv1_rp_rd <integer>]
      [-bcn_feature_tlv1_cp_sf <integer>]
      [-lld_feature_tlv1_enable {1|0}]
      [-lld_feature_tlv1_oper_version <0-255>]
      [-lld_feature_tlv1_max_version <0-255>]
      [-lld_feature_tlv1_enabled_flag {1|0}]
      [-lld_feature_tlv1_willing_flag {1|0}]
      [-lld_feature_tlv1_error_flag {1|0}]
      [-lld_feature_tlv1_subtype <0-255>]
      [-lld_feature_tlv1_status_value {1|0}]
      [-customized_feature_tlv1_enable {1|0}]
      [-customized_feature_tlv1_oper_version <0-255>]
      [-customized_feature_tlv1_max_version <0-255>]
      [-customized_feature_tlv1_enabled_flag {1|0}]
      [-customized_feature_tlv1_willing_flag {1|0}]
      [-customized_feature_tlv1_error_flag {1|0}]
      [-customized_feature_tlv1_subtype <0-255>]
      [-customized_feature_tlv1_type <0-255>]
      [-customized_feature_tlv1_value <hexadecimal>]
      [-pg_feature_tlv2_enable {1|0}]
      [-pg_feature_tlv2_oper_version <0-255>]
      [-pg_feature_tlv2_max_version <0-255>]
      [-pg_feature_tlv2_enabled_flag {1|0}]
      [-pg_feature_tlv2_willing_flag {1|0}]
      [-pg_feature_tlv2_error_flag {1|0}]
      [-pg_feature_tlv2_subtype <0-255>]
      [-pg_feature_tlv2_prio_alloc_pgid_list <list of integers>]
      [-pg_feature_tlv2_pg_alloc_bw_percentage_list <list of integers>]
      [-pg_feature_tlv2_num_tcs_supported <0-7>]
      [-pfc_feature_tlv2_enable {1|0}]
      [-pfc_feature_tlv2_oper_version <0-255>]
      [-pfc_feature_tlv2_max_version <0-255>]
      [-pfc_feature_tlv2_enabled_flag {1|0}]
      [-pfc_feature_tlv2_willing_flag {1|0}]
      [-pfc_feature_tlv2_error_flag {1|0}]
      [-pfc_feature_tlv2_subtype <0-255>]
      [-pfc_feature_tlv2_admin_mode_bits <8-bit binary>]
      [-pfc_feature_tlv2_num_tcpfcs_supported <0-7>]
      [-app_protocol_tlv2_enable {1|0}]
      [-app_protocol_tlv2_oper_version <0-255>]
      [-app_protocol_tlv2_max_version <0-255>]
      [-app_protocol_tlv2_enabled_flag {1|0}]
      [-app_protocol_tlv2_willing_flag {1|0}]
      [-app_protocol_tlv2_error_flag {1|0}]
      [-app_protocol_tlv2_subtype <0-255>]
      [-app_protocol_tlv2_protocol_count <integer>]
      [-app_protocol_tlv2_app_id_list <list of integers>]
      [-app_protocol_tlv2_oui_upper_6_bits_list <list of binaries>]
      [-app_protocol_tlv2_sf_list <list of binaries>]
      [-app_protocol_tlv2_oui_lower_2_bytes_list <list of binaries>]
      [-app_protocol_tlv2_prio_map_list <list of binaries>]
      [-customized_feature_tlv2_enable {1|0}]
      [-customized_feature_tlv2_oper_version <0-255>]
      [-customized_feature_tlv2_max_version <0-255>]
      [-customized_feature_tlv2_enabled_flag {1|0}]
      [-customized_feature_tlv2_willing_flag {1|0}]
      [-customized_feature_tlv2_error_flag {1|0}]
      [-customized_feature_tlv2_subtype <0-255>]
      [-customized_feature_tlv2_type <0-255>]
      [-customized_feature_tlv2_value <hexadecimal>

Arguments

-version_num

Specifies the standard version of DCBX Protocol (CIN-DCBX). Possible values are described below:

Ver_100 - version 1.00 whose TLV subtype is 1. This is the default
        value.

Ver_103 - version 1.03 whose TLV subtype is 2.
-control_tlv_oper_version

Defines the Operation Version value in DCBX Control TLVs. Possible values range from 0 to 255. The default value is 0.

-control_tlv_max_version

Defines the Max Version value in DCBX Control TLVs. Possible values range from 0 to 255. The default value is 0.

-pg_feature_tlv1_enable

Determines whether to enable Priority Group Feature TLVs. Possible values are 1 and 0. When it is set to 1, the Priority Group Feature TLVs will be enabled. The default value is 0. This argument is available when -version_num is set to ver_100.

-pg_feature_tlv1_oper_version

Defines the Operation Version value in DCBX Priority Group TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-pg_feature_tlv1_max_version

Defines the Max Version value in DCBX Priority Group TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-pg_feature_tlv1_enabled_flag

Defines the Enabled Flag value in DCBX Priority Group TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled in the DCBX Priority Group TLVs. This argument is available when -version_num is set to ver_100. The default value is 1.

-pg_feature_tlv1_willing_flag

Defines the Willing Flag value in DCBX Priority Group TLVs. This argument indicates whether this feature accepts its configuration from the peer or not. Possible values are 1 and 0. When it is set to 1, this feature accepts its configuration from the peer. This argument is available when -version_num is set to ver_100. The default value is 0.

-pg_feature_tlv1_error_flag

Defines the Error Flag value in DCBX Priority Group TLVs. Possible values are 1 and 0. When it is set to 1, it indicates an error has occurred during the configuration exchange with the peer. This argument is available when -version_num is set to ver_100. The default value is 0.

-pg_feature_tlv1_subtype

Defines the Subtype Field value in DCBX Priority Group TLVs. The value of this argument must be an integer. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-pg_feature_tlv1_bwg_percentage_list

Defines the list of Bandwidth (BW) Percentages Field values in DCBX Priority Group TLVs. The list should have 8 elements. Each element is the bandwidth percentage value for the BW group (BWG) which has same ID as the element’s index in the list. Each value on the list should range from 0 to 100. This argument is available when -version_num is set to ver_100.

-pg_feature_tlv1_prio_alloc_bwg_id_list

Defines the list of Bandwidth Group ID values in Priority Allocation Field in DCBX Priority Group (PG) TLV. The list should have 8 elements. Each element is the BWG ID value for the group which has the same priority value as the element’s index in the list. The individual value should range from 0 to 7. This switch is available when -version_num is ver_100.

-pg_feature_tlv1_prio_alloc_strict_prio_list

Defines the list of Strict Priority values in Priority Allocation Field in DCBX Priority Group TLV. The list should have 8 elements. Each element is the strict priority value for the group which has the same priority value as the element’s index in the list. Each value should range from 0 to 2.

Strict priority possible values are:

0 - no strict priority
1 - Group Strict Priority (GSP)
2 - Link Strict Priority (LSP)

This switch is available when -version_num is set to ver_100.

-pg_feature_tlv1_prio_alloc_bw_percentage_list

Defines the list of Bandwidth Percentage values in Priority Allocation Field in DCBX Priority Group TLV. The list should have 8 elements. Each element is the BWG Percentage value for the group which has same priority value as the element’s index in the list. Each value in the list should range from 0 to 100. This switch is available when -version_num is set to ver_100.

-pfc_feature_tlv1_enable

Determines whether to enable Priority Flow Control (PFC) TLVs. Possible values are 1 and 0. When it is set to 1, the PFC TLVs will be enabled. The default value is 0.

-pfc_feature_tlv1_oper_version

Defines the Operation Version value in DCBX PFC TLVs. Possible values range from 0 to 255. The default value is 0. The argument is available when -version_num is set to ver_100.

-pfc_feature_tlv1_max_version

Defines the Max Version value in DCBX PFC TLVs. Possible values range from 0 to 255. The default value is 0. The argument is available when -version_num is set to ver_100.

-pfc_feature_tlv1_enabled_flag

Defines the Enabled Flag value in DCBX PFC TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled in the DCBX PFC TLVs. This switch is available when -version_num is ver_100.

-pfc_feature_tlv1_willing_flag

Defines the Willing Flag value in DCBX PFC TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-pfc_feature_tlv1_error_flag

Defines the Error Flag value in DCBX PFC TLVs. Possible values are 1 and 0. The default value is 0. This switch is available when -version_num is set to ver_100.

-pfc_feature_tlv1_subtype

Defines the Subtype Field value in DCBX PFC TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-pfc_feature_tlv1_admin_mode_bits

Specifies the Admin Mode Field Value in PFC TLVs. The value of the Admin Mode Field is a 8-bit binary. The binary value of each bit means the flow control on flow, which has the priority as the bit’s position index, is enabled or disabled. If the flow control is enabled, it means the flow control is in both directions (received and sent) is enabled. The input value should be an 8-bit binary. This argument is available when -version_num is set to ver_100. The default value is 0.

-application_feature_tlv1_enable

Determines whether to enable Application TLVs. Possible values are 0 and 1. When it is set to 1, Application TLVs are enabled. The default value is 0. This switch is available when -version_num is set to ver_100.

-application_feature_tlv1_oper_version

Defines the Operation Version values in DCBX Application TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-application_feature_tlv1_max_version

Defines the Max version value in DCBX Application TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-application_feature_tlv1_enabled_flag

Defines the Enabled Flag value in DCBX Application TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled. This switch is available when -version_num is ver_100. The default value is 1.

-application_feature_tlv1_error_flag

Defines the Error Flag value in DCBX Application TLVs. Possible values are 1 and 0. The default value is 0. This switch is available when -version_num is set to ver_100.

-application_feature_tlv1_subtype

Defines the Subtype Field value in DCBX Application TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-application_feature_tlv1_prio_map

Specifies the Priority Map Field value in DCBX Application TLVs. The value of this argument must be an 8-bit binary. This argument is available when -version_num is set to ver_100. The default value is 1000.

-bcn_feature_tlv1_enable

Determines whether to enable Backward Congestion Notification (BCN) TLVs. Possible values are 1 and 0. The default value is 0. This switch is available when -version_num is set to ver_100.

-bcn_feature_tlv1_oper_version

Defines the Operation Version value in DCBX BCN TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_max_version

Defines the Max Version value in DCBX BCN TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_enabled_flag

Defines the Enabled Flag value in DCBX BCN TLVs. Possible values are 1 and 0. The default value is 1. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_willing_flag

Defines the Willing Flag value in DCBX BCN TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_error_flag

Defines the Error Flag value in DCBX BCN TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_subtype

Defines the Subtype Field value in DCBX BCN TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_bcna_value

Defines the BCNA Field value in DCBX BCN TLVs. The value of this argument must be a hexadecimal value. Possible length for the value is from 1 to 16 bits. The default value is 0. The argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_cp_admin_mode_list

Defines the list of Congestion Point (CP) Admin Mode values of BCN Mode Field in DCBX BCN TLVs. There must be 8 elements in the list. Each element is the CP Admin Mode value which has the same index in BCN Mode Field as the index of the element in the list. Each element must be a flag value. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_admin_mode_list

Defines the list of Reaction Point (RP) Admin Mode values of BCN Mode Field in DCBX BCN TLVs. There must be 8 elements in the list. Each element is the RP Admin Mode value which has the same index in BCN Mode Field as the element’s index on the list. Each element must be a flag value. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_oper_mode_list

Defines the list of RP Operation Mode values of BCN Mode Field in DCBX BCN TLVs. There must be 8 elements in the list. Each element is the RP Admin Mode value which has the same index in BCN Mode Field as the element’s index in the input list. Each element must be a flag value. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rem_tag_oper_mode_list

Defines the list of the Remove Tag Oper Mode values of BCN Mode Field in DCBX BCN TLVs. There must be 8 elements in the list. Each element is the Remove Tag Oper Mode value which has the same index in BCN Mode Field as the element’s index in the input list. Each element must be a flag value. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_w

Defines the Derivative Weight value in DCBX BCN TLVs. The value of this argument must be an integer. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_tmax

Defines the Maximum Time to backoff after BCN0 value in DCBX BCN TLVs. The value of this argument must be an integer. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_rmin

Defines the Default Rate to resume after first BCN0 value in DCBX BCN TLVs. The value of this argument must be an integer. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_td

Defines the Drift Interval value in DCBX BCN TLVs. The value of this argument must be an integer. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_rp_rd

Defines the Drift factor value in DCBX BCN TLVs. The value of this argument must be an integer. The default value is 0. This argument is available when -version_num is set to ver_100.

-bcn_feature_tlv1_cp_sf

Defines the Random portion of the sampling interval Fixed (as a % of Sf) value in DCBX BCN TLVs. The value of this argument must be an integer. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_enable

Determines whether to enable Logic Link Down (LLD) TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_oper_version

Defines the Operation Version value in DCBX LLD TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_max_version

Defines the Max Version value in DCBX LLD TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_enabled_flag

Defines the Enabled Flag value in DCBX LLD TLVs. Possible values are 1 and 0. The default value is 1. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_willing_flag

Defines the Willing Flag value in DCBX LLD TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_error_flag

Defines the Error Flag value in DCBX LLD TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_subtype

Defines the Subtype Field value in DCBX LLD TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-lld_feature_tlv1_status_value

Specifies the Status Field value in DCBX LLD TLVs. Possible values are 1 and 0. The default value is 1. The argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_enable

Determines whether to enable customized TLV. Possible values are 1 and 0. When it is set to 1, the customized TLVs are enabled. The default value is 0.

-customized_feature_tlv1_oper_version

Defines the Operation Version value in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_max_version

Defines the Max Version value in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_enabled_flag

Defines the Enabled Flag value in DCBX customized TLVs. Possible values are 1 and 0. The default value is 1. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_willing_flag

Defines the Willing Flag value in DCBX customized TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_error_flag

Defines the Error Flag value in DCBX customized TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_subtype

Defines the Subtype Field value in DCBX BCN TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_type

Defines the Type Field value in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 10. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv1_value

Defines the Value Field value in DCBX customized TLVs. The value of this argument must be a hexadecimal. The default value is 0. This argument is available when -version_num is set to ver_100.

-pg_feature_tlv2_enable

Determines whether to enable Priority Group Feature TLVs. Possible values are 1 and 0. When it is set to 1, the Priority Group Feature TLVs will be enabled. The default value is 0. This argument is available when -version_num is set to ver_103.

-pg_feature_tlv2_oper_version

Defines the Operation Version value in DCBX Priority Group TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-pg_feature_tlv2_max_version

Defines the Max Version value in DCBX Priority Group TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-pg_feature_tlv2_enabled_flag

Defines the Enabled Flag value in DCBX Priority Group TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled. This argument is available when -version_num is set to ver_103. The default value is 1.

-pg_feature_tlv2_willing_flag

Defines the Willing Flag value in DCBX Priority Group TLVs. This argument indicates whether this feature accepts its configuration from the peer or not. Possible values are 1 and 0. When it is set to 1, this feature accepts its configuration from the peer. This argument is available when -version_num is set to ver_103. The default value is 0.

-pg_feature_tlv2_error_flag

Defines the Error Flag valueq in DCBX Priority Group TLVs. Possible values are 1 and 0. When it is set to 1, it indicates an error has occurred during the configuration exchange with the peer. This argument is available when -version_num is set to ver_103. The default value is 0.

-pg_feature_tlv2_subtype

Defines the Subtype Field value in DCBX Priority Group TLVs. The value of this argument must be an integer. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-pg_feature_tlv2_prio_alloc_pgid_list

Defines the list of Priority Group ID values in DCBX Priority Group TLV. There must be 8 elements on the list. Each element is the Priority Group ID and must be within the range from 0 to 15. This argument is available when -version_num is set to ver_103.

-pg_feature_tlv2_pg_alloc_bw_percentage_list

Defines the list of Priority Group Percentage values in DCBX Priority Group TLV. There must be 8 elements on the list. Each element is the PG Percentage and must be within the range from 0 to 100. This argument is available when -version_num is set to ver_103.

-pg_feature_tlv2_num_tcs_supported

Defines the Num TCs Supported Field value in DCBX Priority Group TLVs. The value of this argument indicates the number of TCs that can simultaneously support PFC. Possible values range from 0 to 7. The default value is 0. This argument is available when -version_num is set to ver_103.

-pfc_feature_tlv2_enable

Determines whether to enable Priority Flow Control (PFC) TLVs. Possible values are 1 and 0. When it is set to 1, the Priority Group Feature TLVs will be enabled. The default value is 0. This argument is available when -version_num is set to ver_103.

-pfc_feature_tlv2_oper_version

Defines the Operation Version value in DCBX PFC TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-pfc_feature_tlv2_max_version

Defines the Max Version value in DCBX PFC TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-pfc_feature_tlv2_enabled_flag

Defines the Enabled Flag value in DCBX PFC TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled in the DCBX PFC TLVs. This argument is available when -version_num is set to ver_103. The default value is 1.

-pfc_feature_tlv2_willing_flag

Defines the Willing Flag value in DCBX PFC TLVs. This argument indicates whether this feature accepts its configuration from the peer or not. Possible values are 1 and 0. When it is set to 1, this feature accepts its configuration from the peer. This argument is available when -version_num is set to ver_103. The default value is 0.

-pfc_feature_tlv2_error_flag

Defines the Error Flag value in DCBX PFC TLVs. Possible values are 1 and 0. When it is set to 1, it indicates an error has occurred during the configuration exchange with the peer. This argument is available when -version_num is set to ver_103. The default value is 0.

-pfc_feature_tlv2_subtype

Defines the Subtype Field value in DCBX PFC TLVs. The value of this argument must be an integer. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-pfc_feature_tlv2_admin_mode_bits

Specifies the Admin Mode Field Value in PFC TLVs. The value of the Admin Mode Field is an 8-bit binary. The binary value of each bit means the flow control, which has the priority as the bit’s position index, is enabled or disabled. If the flow control is enabled, it means the flow control is in both directions (received and sent) is enabled. This argument is available when -version_num is set to ver_103. The default value is 0.

-pfc_feature_tlv2_num_tcpfcs_supported

Indicates the Num TC PFC Supported Field value in DCBX PFC TLVs. It Indicates the Number of TCs supported by device. Possible values range from 0 to 7. The default value is 0. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_enable

Determines whether to enable Application Protocol TLVs. This TLV allows DCB node to announce upper layer protocols and associated priority map over DCB link. Possible values are 1 and 0. When it is set to 1, Application Protocol TLVs are enabled. The default value is 0. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_oper_version

Defines the Operation Version value in DCBX Application Protocol TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_max_version

Defines the Max Version value in DCBX Application Protocol TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_enabled_flag

Defines the Enabled Flag value in DCBX Application Protocol TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled. This argument is available when -version_num is set to ver_103. The default value is 1.

-app_protocol_tlv2_willing_flag

Defines the Willing Flag value in DCBX Application Protocol TLVs. This argument indicates whether this feature accepts its configuration from the peer or not. Possible values are 1 and 0. When it is set to 1, this feature accepts its configuration from the peer. This argument is available when -version_num is set to ver_103. The default value is 0.

-app_protocol_tlv2_error_flag

Defines the Error Flag value in DCBX Application Protocol TLVs. Possible values are 1 and 0. When it is set to 1, it indicates an error has occurred during the configuration exchange with the peer. This argument is available when -version_num is set to ver_103. The default value is 0.

-app_protocol_tlv2_subtype

Defines the Subtype Field value in DCBX Application Protocol TLVs. The value of this argument must be an integer. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_protocol_count

Defines the number of Application Protocol Parameters Structure Field in DCBX Application Protocol TLVs. The value of this argument must be an integer. This switch is available when -version_num is set to ver_103. The default value is 0.

-app_protocol_tlv2_app_id_list

Defines Application Protocol ID values of Application Protocol parameters structure Field in DCBX Application Protocol TLVs. The value of this argument can be an integer or a list of integers. Each integer identifies the protocol supported by DCB nodes. The number of integers on the list must be equal to the number defined by -app_protocol_tlv2_protocol_count. Possible Application Protocol ID values range from 0 to 65535. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_oui_upper_6_bits_list

Defines the upper 6 bits values of OUI of Application Protocol parameters structure Field in DCBX Application Protocol TLVs. The value of this argument can be a list. The number of elements on the list must be equal to the number defined by -app_protocol_tlv2_protocol_count. Each element must be a 6-bit binary which indicates the upper 6 bits of OUI for each Application Protocol parameters structure. This argument is available when -version_num is set to ver_103.

-app_protocol_tlv2_sf_list

Defines the Selector Field values of Application Protocol Parameters Structure Field in DCBX Application Protocol TLVs. The value of this argument can be a 2-bit binary or a list of 2-bit binaries. The number of 2-bit binaries must be equal to the number defined by -app_protocol_tlv2_protocol_count. Each 2-bit binary is set to the Selector Field for each Application Protocol Parameters Structure. This switch is available when -version_num is set to ver_103.

-app_protocol_tlv2_oui_lower_2_bytes_list

Defines the upper 2 bits values of OUI of Application Protocol Parameters Structure Field in DCBX Application Protocol TLVs. The value of this argument can be a 2-bit binary or a list of 2-bit binaries. The number of binaries on the list must be equal to the number defined by -app_protocol_tlv2_protocol_count. Each binary on the list is the upper 2 bits of OUI for each Application Protocol Parameters Structure. This switch is available when -version_num is set to ver_103.

-app_protocol_tlv2_prio_map_list

Defines Priority Map values of Application Protocol Parameters Structure Field in DCBX Application Protocol TLVs. The value of this argument can be an 8-bit binary or a list of 8-bit binaries. The number of list elements must be equal to the number defined by -app_protocol_tlv2_protocol_count. Each binary is the Priority Map value for the corresponding Application Protocol Parameters Structure. This argument is available when -version_num is set to ver_103.

-customized_feature_tlv2_enable

Determines whether to enable customized TLVs. Possible values are 0 and 1. When it is set to 1, customized TLVs were enabled. The default value is 0. This argument is available when -version_num is set to ver_100.

-customized_feature_tlv2_oper_version

Defines the Operation Version values in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-customized_feature_tlv2_max_version

Defines the Max version value in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-customized_feature_tlv2_enabled_flag

Defines the Enabled Flag value in DCBX customized TLVs. Possible values are 1 and 0. When it is set to 1, the DCB feature is enabled. This switch is available when -version_num is ver_103. The default value is 1.

-customized_feature_tlv2_willing_flag

Defines the Willing Flag value in DCBX customized TLVs. Possible values are 1 and 0. The default value is 0. This argument is available when -version_num is set to ver_103.

-customized_feature_tlv2_error_flag

Defines the Error Flag value in DCBX customized TLVs. Possible values are 1 and 0. The default value is 0. This switch is available when -version_num is set to ver_103.

-customized_feature_tlv2_subtype

Defines the Subtype Field value in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 0. This argument is available when -version_num is set to ver_103.

-customized_feature_tlv2_type

Defines the Type Field value in DCBX customized TLVs. Possible values range from 0 to 255. The default value is 10. This argument is available when -version_num is set to ver_103.

-customized_feature_tlv2_value

Defines the Value Field value in DCBX customized TLVs. The value of this argument must be a hexadecimal. The default value is 0. This argument is available when -version_num is set to ver_103.

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

SUCCESS::
     {{status 1} {handle XXXXX}}

FAILURE::
     {{status 0} {log XXX}}

Description

The sth::emulation_lldp_dcbx_tlv_config configures DCBX TLVs. You can use this command to specify the content of the following TLVs for a test:

Control TLV
Priority Group Feature TLV
Priority Group TLV
PFC TLV
Application TLV
BCN TLV
LLD TLV
customized TLV
Priority Group Feature TLV

All the arguments of this command are optional.

Please refer to “DCB Capability Exchange Protocol Base Specification Rev 1.0” and “DCB Capability Exchange Protocol Base Specification Rev 1.03” for more information.

Examples

#### HLTAPI for Tcl ####

Sample Input:

sth::emulation_lldp_dcbx_tlv_config
          -version_num "ver_103"\
          -control_tlv_oper_version 1\
          -control_tlv_max_version 1\
          -pg_feature_tlv2_enable 1\
          -pg_feature_tlv2_oper_version 1\
          -pg_feature_tlv2_max_version 1\
          -pg_feature_tlv2_enabled_flag 1\
          -pg_feature_tlv2_willing_flag 1\
          -pg_feature_tlv2_error_flag 1\
          -pg_feature_tlv2_subtype 1\
          -pg_feature_tlv2_prio_alloc_pgid_list "0 1 2 3 0 1 2 3"\
          -pg_feature_tlv2_pg_alloc_bw_percentage_list "0 1 2 3 0 1 2 3"\
          -pg_feature_tlv2_num_tcs_supported 1\
          -pfc_feature_tlv2_num_tcpfcs_supported 1\
          -pfc_feature_tlv2_enable 1\
          -pfc_feature_tlv2_oper_version 1\
          -pfc_feature_tlv2_max_version 1\
          -pfc_feature_tlv2_enabled_flag 1\
          -pfc_feature_tlv2_willing_flag 1\
          -pfc_feature_tlv2_error_flag 1\
          -pfc_feature_tlv2_subtype 1\
          -pfc_feature_tlv2_admin_mode_bits "11111111"

Sample output:

{{status 1} {handle xxxxx}}

#### HLTAPI for Python ####

Sample Input:

device_ret0_dcbx_tlv_config = sth.emulation_lldp_dcbx_tlv_config (
       application_feature_tlv1_enable= '1',
       application_feature_tlv1_prio_map= '00001000',
       bcn_feature_tlv1_cp_admin_mode_list= ['0','0','0','0','0','0','0','0'],
       bcn_feature_tlv1_enable= '1',
       bcn_feature_tlv1_rem_tag_oper_mode_list= ['0','0','0','0','0','0','0','0'],
       bcn_feature_tlv1_rp_admin_mode_list= ['0','0','0','0','0','0','0','0'],
       bcn_feature_tlv1_rp_oper_mode_list= ['0','0','0','0','0','0','0','0'],
       control_tlv_max_version= '0',
       control_tlv_oper_version= '0',
       customized_feature_tlv1_enable= '1',
       customized_feature_tlv1_value= '0',
       lld_feature_tlv1_enable= '1',
       lld_feature_tlv1_status_value= '1',
       pfc_feature_tlv1_admin_mode_bits= '00000000',
       pfc_feature_tlv1_enable= '1',
       pg_feature_tlv1_bwg_percentage_list= ['0','0','0','0','0','0','0','0'],
       pg_feature_tlv1_enable= '1',
       pg_feature_tlv1_prio_alloc_bw_percentage_list= ['0','0','0','0','0','0','0','0'],
       pg_feature_tlv1_prio_alloc_bwg_id_list= ['0','0','0','0','0','0','0','0'],
       pg_feature_tlv1_prio_alloc_strict_prio_list= ['0','0','0','0','0','0','0','0'],
       version_num         = 'ver_100');

Sample Output:

{'status': '1', 'handle': 'XXXXX'}

#### HLTAPI for Perl ####

Sample Input:

my %device_ret2_dcbx_tlv_config = sth::emulation_lldp_dcbx_tlv_config (
          pg_feature_tlv1_oper_version=> '1',
          pg_feature_tlv1_subtype=> '1',
          pg_feature_tlv1_max_version=> '1',
          pg_feature_tlv1_error_flag=> '1',
          pfc_feature_tlv1_max_version=> '1',
          pfc_feature_tlv1_error_flag=> '1',
          pfc_feature_tlv1_oper_version=> '1',
          pfc_feature_tlv1_subtype=> '1',
          application_feature_tlv1_max_version=> '1',
          application_feature_tlv1_oper_version=> '1',
          bcn_feature_tlv1_subtype=> '1',
          bcn_feature_tlv1_error_flag=> '1',
          bcn_feature_tlv1_bcna_value=> '0000000000000011',
          application_feature_tlv1_enable=> '1',
          application_feature_tlv1_prio_map=> '00001000',
          bcn_feature_tlv1_cp_admin_mode_list=> '0 0 0 0 0 0 0 0 ',
          bcn_feature_tlv1_enable=> '1',
          bcn_feature_tlv1_rem_tag_oper_mode_list=> '0 0 0 0 0 0 0 0 ',
          bcn_feature_tlv1_rp_admin_mode_list=> '0 0 0 0 0 0 0 0 ',
          bcn_feature_tlv1_rp_oper_mode_list=> '0 0 0 0 0 0 0 0 ',
          control_tlv_max_version=> '0',
          control_tlv_oper_version=> '0',
          customized_feature_tlv1_enable=> '1',
          customized_feature_tlv1_value=> '0',
          lld_feature_tlv1_enable=> '1',
          lld_feature_tlv1_status_value=> '1',
          pfc_feature_tlv1_admin_mode_bits=> '00000000',
          pfc_feature_tlv1_enable=> '1',
          pg_feature_tlv1_bwg_percentage_list=> '0 0 0 0 0 0 0 0 ',
          pg_feature_tlv1_enable=> '1',
          pg_feature_tlv1_prio_alloc_bw_percentage_list=> '0 0 0 0 0 0 0 0 ',
          pg_feature_tlv1_prio_alloc_bwg_id_list=> '0 0 0 0 0 0 0 0 ',
          pg_feature_tlv1_prio_alloc_strict_prio_list=> '0 0 0 0 0 0 0 0 ',
          version_num         => 'ver_100');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'XXXXX';
$VAR3 = 'status';
$VAR4 = '1';

End of Procedure Header

sth::emulation_lldp_control

Purpose

Starts, stops, pauses or resumes the emulated LLDP devices.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_lldp_control
    [-mode {stop | start | pause | resume}  M]
    [-handle <lldp_device_handle_list>   M]

Arguments

-mode

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

stop - Stops the LLDP protocol on the specified devices
start - Starts the LLDP protocol on the specified devices
pause - Pauses the LLDP protocol on the specified devices
resume - Resumes the LLDP protocol on the specified devices
-handle

Specifies a list of LLDP devices on which to take the actions specified by the -mode argument. This argument is Mandatory .

Return Values

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

handle         The LLDP handle on which to take the action.
status          Success (1) or failure (0) of the operation.
log            An error message (if the operation failed).

Description

The sth::emulation_lldp_control command controls the LLDP emulation on the specified devices. This command can start, stop, pause or resume the LLDP protocol on the emulated LLDP devices.

In the mode of stop, start, pause, or resume, you can stop, start, pause, or resume one or more devices with LLDP protocol. Use the -mode argument to specify the action to perform. (See the -mode argument description for information about the actions.)

If the action performed fails, Spirent HLTAPI returns an error message. For example, if the user tries to configure a nonexistent session handle in start mode, Spirent HLTAPI will return an error message.

Examples

#### HLTAPI for Tcl ####

To start the LLDP router:

set status [::sth::emulation_lldp_control   -mode start \
           -handle $lldpRouterHandle]

To stop the LLDP router:

set status [::sth::emulation_lldp_control   -mode stop \
         -handle $lldpRouterHandle]

To pause the LLDP router:

set status [::sth::emulation_lldp_control   -mode pause \
       -handle $lldpRouterHandle]

To resume the LLDP router:

 set status [::sth::emulation_lldp_control   -mode resume \
-handle $lldpRouterHandle]

Sample output:

{{status 1} {handle $lldpRouterHandle}}

#### HLTAPI for Python ####

To start the LLDP router:

ctrl_ret1 = sth.emulation_lldp_control (
             handle              = device_list,
             mode                = 'start');

Sample Output:

{'status': '1'}

#### HLTAPI for Perl ####

To start the LLDP router:

my %ctrl_ret1 = sth::emulation_lldp_control (
             handle              => "$device_list",
             mode                => 'start');

Sample Output:

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

End of Procedure Header

sth::emulation_lldp_info

Purpose

Returns the status and statistics of an LLDP session.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_lldp_info
    [-handle <LLDP_device_handle>   M]
    [-mode {lldp|dcbx|both}   M]
    [-dcbx_info_type {basic|feature_basic|prio_alloc|bw_alloc|pfc|
                      fcoe_prio|logic_link|bcn_parameter|bcn_mode}]

Arguments

-handle

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

-mode

Specifies the type of results to be fetched. This argument is mandatory. Possible values are described below:

lldp - Returns LLDP session data. This is the default value.
dcbx - Returns DCBX session data.
both - Returns both LLDP and DCBX session data.
-dcbx_info_type

Defines type of DCBX results to be fetched. You can specify one or more values for this argument. When you input a list of values, separate the values with “|”. You can specify this argument when you specify -mode dcbx or -mode both. The default value is “basic|feature_basic”. Possible values are described below:

basic - Basic results (frame/TLV status) of DCBX PDUs and Control TLVs.

feature_basic - Basic feature TLV results (frame/TLV header
         information of local and neighbor node) of DCBX Feature TLVs.

prio_alloc - Priority Group status in Priority Group TLVs.

bw_alloc - Bandwidth allocation status in DCBX Priority Group TLVs.

pfc - Priority Flow Control status.

fcoe_prio - FCOE protocol priority status in Application TLVs.

logic_link - Logic Link status.

bcn_parameter - Parameter Value & status in BCN (Backward Congestion
             Notification) TLVs.

bcn_mode - Mode status in BCN TLVs.

Return Values

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

status    Retrieves a value indicating the success (1) or failure
          (0) of the operation.
log       Retrieves a message describing the last error that
          occurred during the operation. If the operation was
          successful - {status 1} - the log value is null

The following keys are returned if you specify -mode lldp:

*****LLDP Results*****
lldp.lldp_session_state
               LLDP device state. Possible return values are described below::
               LLDP_SESSION_STATE_NONE: No state.
               LLDP_SESSION_STATE_DOWN: The Session is down.
               LLDP_SESSION_STATE_UP: The Session is up.
               LLDP_SESSION_STATE_PAUSE: The Session is paused.
lldp.tx_port_frame_count
               Number of LLDP frames sent from the transmit port.
lldp.rx_port_frame_discarded_count
               Number of LLDP frames discarded on the receive port.
lldp.rx_port_error_frame_count
               Number of LLDP errored frames received on the receive port.
lldp.rx_port_frame_count
               Number of LLDP frames received on the receive port.
lldp.rx_port_tlvs_discarded_count
               Number of LLDP TLVs discarded on the receive port.
lldp.rx_port_tlvs_unrecognized_count
               Number of unrecognized LLDP TLVs received on the receive port.
lldp.rx_port_age_outs_count
               Number of the neighbors whose information is received on the port that
               has aged out (TTL timer expires).

*****LLDP Neighbor Results*****
lldp_neighbor.xxx.neighbor_chassis_id_subtype
               Chassis ID subtype of the neighbor
lldp_neighbor.xxx.neighbor_chassis_id
               Chassis ID of the neighbor
lldp_neighbor.xxx.neighbor_port_id_subtype
               Port ID subtype of the neighbor
lldp_neighbor.xxx.neighbor_port_id
               Port ID of the neighbor
lldp_neighbor.xxx.neighbor_time_to_live
               Number of seconds the neighbor information remains valid without
               receiving an update.

The following keys are returned when basic is indicated in -dcbx_info_type:

*****DCBX Basic Results*****
dcbx.max_version
               Maximum DCBX version supported by the emulated device
dcbx.peer_max_version
               Maximum DCBX version supported by the DUT
dcbx.operating_version
               Negotiated DCBX version for the session
dcbx.seq_number
               Next sequence number for the emulated device
dcbx.ack_number
               Next acknowledge number for the emulated device
dcbx.peer_seq_number
               Next sequence number for the DUT
dcbx.peer_ack_number
               Next acknowledge number for the DUT

The following keys are returned when feature_basic is indicated in -dcbx_info_type:

*****DCBX Feature Basic Results*****
dcbx.feature_basic.xxx.type
               Feature type
dcbx.feature_basic.xxx.subtype
               Feature subtype
dcbx.feature_basic.xxx.max_version
               Maximum supported version for the emulated device
dcbx.feature_basic.xxx.peer_max_version
               Maximum supported version for the DUT
dcbx.feature_basic.xxx.operating_version
               Negotiated operating version for the session
dcbx.feature_basic.xxx.enable
               Value of the enable bit for the emulated device
dcbx.feature_basic.xxx.advertise
               Value of the advertise bit for the emulated device
dcbx.feature_basic.xxx.peer_advertise
               Value of the advertise bit for the DUT
dcbx.feature_basic.xxx.willing
               Value of the willing bit for the emulated device
dcbx.feature_basic.xxx.error
               Value of the error bit for the emulated device
dcbx.feature_basic.xxx.operating_mode
               Value of the operating mode bit for the emulated device
dcbx.feature_basic.xxx.syncd
               Value of the Synced bit for the emulated device
dcbx.feature_basic.xxx.feature_seq_number
               When Synced is false, the value that SeqNo must become equal to before
               Synced can become True
dcbx.feature_basic.xxx.peer_willing
               Value of the willing bit for the emulated device
dcbx.feature_basic.xxx.peer_error
               Value of the error bit for the emulated device
dcbx.feature_basic.xxx.peer_enable
               Value of the enable bit for the emulated device

The following keys are returned when prio_alloc is indicated in -dcbx_info_type:

*****DCBX Priority Allocation Results*****
dcbx.prio_alloc.xxx.priority
               Priority of the session
dcbx.prio_alloc.xxx.priority_group_id
               Operating priority group ID
dcbx.prio_alloc.xxx.desired_priority_group_id
               Desired priority group ID for the emulated device
dcbx.prio_alloc.xxx.peer_priority_group_id
               Priority group ID from the DUT TLV

The following keys are returned when bw_alloc is indicated in -dcbx_info_type:

*****DCBX Bandwidth Allocation Results*****
dcbx.bw_alloc.xxx.priority_group_id
               ID of the priority group
dcbx.bw_alloc.xxx.bandwidth_percentage
               Operating bandwidth allocation of the session
dcbx.bw_alloc.xxx.desired_bandwidth_percentage
               Desired bandwidth allocation of the emulated device
dcbx.bw_alloc.xxx.peer_bandwidth_percentage
               Bandwidth allocation from the peer TLV

The following keys are returned when pfc is indicated in -dcbx_info_type:

*****DCBX Priority Flow Control Results*****
dcbx.pfc.xxx.priority
               Priority Flow Control (PFC) priority
dcbx.pfc.xxx.status
               Operating PFC status of the session
dcbx.pfc.xxx.desired_status
               Desired PFC status of the emulated device
dcbx.pfc.xxx.peer_status
               PFC status of the DUT

The following keys are returned when fcoe_prio is indicated in -dcbx_info_type:

*****DCBX FCOE Priority Results*****
dcbx.fcoe_prio.xxx.selector_field
               Value of the selector field
dcbx.fcoe_prio.xxx.protocol_id
               Value of the protocol ID field
dcbx.fcoe_prio.xxx.priority_map
               Operational priority map for the session
dcbx.fcoe_prio.xxx.desired_priority_map
               Desired priority map for the emulated device
dcbx.fcoe_prio.xxx.peer_priority_map
               Priority map in the TLV from the DUT

The following keys are returned when logic_link is indicated in -dcbx_info_type:

*****DCBX Logic Link results*****
dcbx.logic_link.xxx.type
               Type of link
dcbx.logic_link.xxx.status
               Link status of the emulated device
dcbx.logic_link.xxx.peer_status
               Link status of the DUT

The following keys are returned when bcn_parameter is indicated in -dcbx_info_type:

*****DCBX BCN Parameter Results*****
dcbx.bcn_parameter.xxx.type
               BCN type value
dcbx.bcn_parameter.xxx.bcna
               BCNA Port + MAC Address
dcbx.bcn_parameter.xxx.rp_alpha
               Max Decrease Factor
dcbx.bcn_parameter.xxx.rp_beta
               Max Increase Factor
dcbx.bcn_parameter.xxx.rp_gd
               Decrease Gain
dcbx.bcn_parameter.xxx.rp_gi
               Increase Gain
dcbx.bcn_parameter.xxx.rp_tmax
               Severe Congestion Backoff Timer Range
dcbx.bcn_parameter.xxx.cp_sf
               CP sampling interval fixed
dcbx.bcn_parameter.xxx.rp_td
               Drift Interval Timer
dcbx.bcn_parameter.xxx.rp_rmin
               Severe Congestion Restart Rate
dcbx.bcn_parameter.xxx.rp_w
               Derivative Weight
dcbx.bcn_parameter.xxx.rp_rd
               Drift Increase

The following keys are returned when bcn_mode is indicated in -dcbx_info_type:

*****DCBX BCN Mode results*****
dcbx.bcn_mode.xxx.priority
               BCN priority
dcbx.bcn_mode.xxx.cp_admin_mode
               Cp admin mode in the TLV from the DUT
dcbx.bcn_mode.xxx.rp_admin_mode
               Operating Rp admin mode
dcbx.bcn_mode.xxx.rp_operating_mode
               Operating Rp operating mode
dcbx.bcn_mode.xxx.remove_tag_operational_mode
               Operating remove tag operational mode
dcbx.bcn_mode.xxx.peer_cp_admin_mode
               Cp admin mode in the TLV from the DUT
dcbx.bcn_mode.xxx.peer_rp_admin_mode
               Rp admin mode in the TLV from the DUT
dcbx.bcn_mode.xxx.peer_rp_operating_mode
               Rp operating mode in the TLV from the DUT
dcbx.bcn_mode.xxx.peer_remove_tag_operational_mode
               Remove tag operational mode in the TLV from the DUT
dcbx.bcn_mode.xxx.desired_cp_admin_mode
               Desired Cp admin mode of the emulated device
dcbx.bcn_mode.xxx.desired_rp_admin_mode
               Desired Rp admin mode of the emulated device
dcbx.bcn_mode.xxx.desired_rp_operating_mode
               Desired Rp operating mode of the emulated device
dcbx.bcn_mode.xxx.desired_remove_tag_operational_mode
               Desired remove tag operational mode of the emulated device

Description

The sth::emulation_lldp_info function provides information about devices specified for the LLDP configuration.

This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0) 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. (See Return Values for a description of each key.)

Examples

#### HLTAPI for Tcl ####

Assume we already have the LLDP device handle lldpRouterHandle:

sth::emulation_ldp_info      -mode lldp \
-handle $lldpRouterHandle

Sample output:

{{status 1} {handle $lldpRouterHandle}}

#### HLTAPI for Python ####

Sample Input:

results_ret1 = sth.emulation_lldp_info (
             handle              = device,
             mode                = 'lldp');

Sample Output:

{'lldp': {'rx_port_age_outs_count': '0', 'rx_port_tlvs_unrecognized_count': '0',
'rx_port_error_frame_count': '0', '_session_state': 'LLDP_SESSION_STATE_UP',
'rx_port_frame_discarded_count': '0', 'tx_port_frame_count': '1',
'rx_port_tlvs_discarded_count': '0', 'rx_port_frame_count': '2'},
'lldp_neighbor': {'1': {'neighbor_port_id': 'N/A',
'neighbor_chassis_id_subtype': 'N/A', 'neighbor_chassis_id': 'N/A',
'neighbor_time_to_live': 'N/A', 'neighbor_port_id_subtype': 'N/A'}},
'status': '1'}

#### HLTAPI for Perl ####

Sample Input:

my %results_ret1 = sth::emulation_lldp_info (
             handle              => "$device",
             mode                => 'lldp');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';
$VAR3 = 'lldp_neighbor';
$VAR4 = {
          '1' => {
                   'neighbor_time_to_live' => 'N/A',
                   'neighbor_port_id_subtype' => 'N/A',
                   'neighbor_chassis_id' => 'N/A',
                   'neighbor_chassis_id_subtype' => 'N/A',
                   'neighbor_port_id' => 'N/A'
                 }
        };
$VAR5 = 'lldp';
$VAR6 = {
          'rx_port_age_outs_count' => '0',
          'tx_port_frame_count' => '1',
          'rx_port_tlvs_discarded_count' => '0',
          'rx_port_frame_discarded_count' => '0',
          'lldp_session_state' => 'LLDP_SESSION_STATE_UP',
          'rx_port_tlvs_unrecognized_count' => '0',
          'rx_port_error_frame_count' => '0',
          'rx_port_frame_count' => '2'
        };

Note

The “xxx” in return values are the indexes for the records.

End of Procedure Header