Micro BFD Functions¶
sth::emulation_micro_bfd_config¶
Purpose¶
Spirent Extension (for Spirent HLTAPI only).
Creates, modifies, or deletes an emulated Bidirectional Forwarding Detection (BFD) router on link aggregation group (LAG) ports. You must configure LAG before using this function.
Synopsis¶
Note
M indicates that the argument is Mandatory .
sth::emulation_micro_bfd_config [-mode {create|{modify|reset} M] [-port_handle <port_handle>] [-handle <bfd_router_handle>] [-detect_multiplier <2-255>] [-echo_rx_interval <NUMERIC>] [-enable_my_discriminator_ipv4 {true|false}] [-enable_my_discriminator_ipv6 {true|false}] [-interval_time_unit {msec | usec}] [-ipv4_dest_addr <a.b.c.d>] [-ipv4_src_addr <a.b.c.d>] [-ipv6_mask <1-128>] [-ipv6_dest_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>] [-ipv6_src_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>] [-my_discriminator_ipv4 <NUMERIC>] [-my_discriminator_ipv6 <NUMERIC>] [-router_role {active|passive}] [-rx_interval <NUMERIC>] [-source_mac <aa:bb:cc:dd:ee:ff>] [-tx_interval <NUMERIC>] [-udp_dst_port <NUMERIC>] [-authentication {md5|none|simple}] [-md5_key_id <NUMERIC>] [-password <ANY>]
Arguments¶
-
-mode
¶
Specifies the action to perform. This argument is Mandatory .
Values:
create Creates one or more BFD routers on the LAG port specified with the -port_handle argument modify Changes the configuration for the BFD router identified by the -handle argument reset Deletes all BFD routers specified by the -handle argument
-
-port_handle
¶
Specifies the LAG port on which to create the BFD router when -mode is set to create
-
-handle
¶
Specifies the BFD router handle to use when -mode is set to modify or reset
-
-detect_multiplier
¶
The negotiated transmit interval multiplied by this value is the detection time for this session
Values: 2-255
Default: 3
-
-echo_rx_interval
¶
Minimum interval in milliseconds that the emulated router wants between received BFD Echo packets
Default: 0
-
-enable_my_discriminator_ipv4
¶
Determines whether to manually override the discriminator values that Spirent TestCenter generates for IPv4 sessions
Values: true, false
Default: false
-
-enable_my_discriminator_ipv6
¶
Determines whether to manually override the discriminator values that Spirent TestCenter generates for IPv6 sessions
Values: true, false
Default: false
-
-interval_time_unit
¶
Time unit for all interval configurations
Values:
msec Milliseconds (ms) usec Microseconds (us)
Default: msec
-
-ipv4_dest_addr
¶
Specifies the destination IP address for the first LAG
Default: 192.0.0.1
-
-ipv4_src_addr
¶
Specifies the source IP address for the first LAG
Default: 190.0.0.1
-
-ipv6_mask
¶
Specifies the IPv6 network mask
Default: 128
-
-ipv6_dest_addr
¶
Specifies the destination IPv6 address for the first LAG
Default: 2001::1
-
-ipv6_src_addr
¶
Specifies the source IPv6 address for the first LAG
Default: 2000::1
-
-my_discriminator_ipv4
¶
Specifies the starting discriminator value for IPv4 sessions
Dependency: -enable_my_discriminator_ipv4 true
Default: 1
-
-my_discriminator_ipv6
¶
Specifies the starting discriminator value for IPv6 sessions
Dependency: -enable_my_discriminator_ipv6 true
Default: 1
-
-router_role
¶
Specifies the role for the router to take
Values:
- active
- Take the active role. A system taking the active role must send BFD Control packets for a particular session.
- passive
- Take the passive role. A system taking the passive role must not begin sending BFD packets for a particular session until it has received a BFD packet for that session.
-
-rx_interval
¶
Specifies the interval in milliseconds that the emulated router wants between received BFD Control packets
Default: 50
-
-source_mac
¶
Specifies the source MAC address for the first aggregation group
Default: 00:10:94:00:00:02
-
-tx_interval
¶
Specifies the interval in milliseconds that the emulated router wants between transmitted BFD Control packets
Default: 50
-
-udp_dst_port
¶
Specifies the UDP destination port
Default: 6784
-
-authentication
¶
Type of authentication to use
Values:
md5 MD5 authentication
none No authentication
simple Simple password authentication
Default: none
-
-md5_key_id
¶
Specifies the MD5 key ID for the session
Dependency: -md5_key_id md5
Default: 1
-
-password
¶
Specifies the password for the session
Dependency: -md5_key_id simple
Default: Spirent
Return Values¶
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
- handle
- A list of handles that identify the routers created by the
sth::emulation_micro_bfd_config
function - status
- Success (1) or failure (0) of the operation
- log
- An error message (if the operation failed)
Description¶
The sth::emulation_micro_bfd_config
function creates, modifies, or deletes an
emulated Bidirectional Forwarding Detection (BFD) router on LAG ports. (See the
-mode argument description for information about the actions.)
The routers can be further configured with modify mode, or removed with reset mode.
You must configure LAG before using this function.
Examples¶
Sample Input:
set device_ret0 [sth::emulation_micro_bfd_config\
-mode create\
-port_handle $port1\
-detect_multiplier 3\
-echo_rx_interval 0\
-enable_my_discriminator_ipv4 false\
-enable_my_discriminator_ipv6 false\
-interval_time_unit msec\
-ipv4_session_addr 10.10.10.20\
-ipv4_src_addr 10.10.10.10\
-ipv6_mask 128\
-ipv6_session_addr "2001::88"\
-ipv6_src_addr "2000::99"\
-my_discriminator_ipv4 1\
-my_discriminator_ipv6 1\
-name micro_bfd_1\
-router_role active\
-rx_interval 50\
-source_mac "00:10:94:00:00:01"\
-tx_interval 50\
-udp_dst_port 6784\
-authentication none\
-md5_key_id 1\
-password "Spirent" ]
Sample Output:
{handle lagbfdportconfig1} {status 1}
sth::emulation_micro_bfd_control¶
Purpose¶
Spirent Extension (for Spirent HLTAPI only).
Starts, flaps, or stops BFD routers or sessions for the specified ports or device handles.
Synopsis¶
Note
M indicates that the argument is Mandatory .
sth::emulation_micro_bfd_control [-mode {admin_up|admin_down|initiate_poll|start|stop|resume_pdus| stop_pdus|set_diagnostic_state} M] [-handle <bfd_router_handle_list>] [-port_handle <port_handle_list>]
Arguments¶
-
-handle
¶
Identifies a list of router handles or session handles on which to stop or start the router. You must specify either -handle or -port_handle, but not both.
-
-mode
¶
Specifies the action to be taken. This argument is Mandatory .
Values:
- admin_up
- Administratively starts a BFD session for one or more routers running BFD
- admin_down
- Administratively stops a BFD session for one or more routers running BFD
- initiate_poll
- Initiates polling on one or more BFD sessions with Demand mode enabled
- stop
- Stops the router for the specified port
- start
- Starts the router for the specified port
- resume_pdus
- Resumes sending BFD PDUs for one or more BFD sessions
- stop_pdus
- Stops sending BFD PDUs for one or more BFD sessions
- set_diagnostic_state
- Sets the code to be sent to specify the reason for the last session state change
-
-port_handle
¶
Specifies a list of ports on which BFD emulation will start, stop, flap, suspend, or resume. You must specify either -handle or -port_handle, but not both.
-
-bfd_diagnostic_code
¶
Specifies the diagnostic code to use
Dependency: -mode set_diagnostic_state
Values:
- no_diagnostic
- No diagnostic (0)
- cd_time_expire
- Control detection time expired (1)
- echo_function_failed
- Echo function failed (2)
- nbor_sig_session_down
- Neighbor signaled session down (3)
- for_plane_reset
- Forwarding plane reset (4)
- path_down
- Path down (5)
- concat_path_down
- Concatenated path down (6)
- admin_down
- Administratively down (7)
- reverse_concat_path_down
- Reverse concatenated path down (8)
Return Values¶
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
- status
- Success (1) or failure (0) of the operation
- log
- An error message (if the operation failed)
Description¶
The sth::emulation_micro_bfd_control
function controls the BFD operations
through the specified ports. Use the -mode argument to specify the
action to perform. (See the -mode argument description for information
about the actions.)
Examples¶
To start all BFD routers on the specified LAG port:
sth::emulation_bfd_control -mode start -port_handle $port1
Sample Output:
{status 1}
sth::emulation_micro_bfd_info¶
Purpose¶
Spirent Extension (for Spirent HLTAPI only).
Returns information about the Micro BFD configuration
Synopsis¶
Note
M indicates that the argument is Mandatory .
sth::emulation_micro_bfd_info [-mode {port|session} M] [-handle <bfd_router_handle>] [-port_handle <port_handle>]
Arguments¶
-
-handle
¶
Specifies the router from which to retrieve BFD session results. You must specify either -handle or -port_handle, but not both.
-
-mode
¶
Specifies the kind of information you want to see. This argument is Mandatory .
Values:
- port
- Returns BFD results for the LAG
- session
- Returns BFD results for the IPv4 session from the port
You can combine the two modes using “|”.
-
-port_handle
¶
Specifies the ports from which to retrieve BFD session results. You must specify either -handle or -port_handle, but not both.
Return Values¶
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
- status
- Success (1) or failure (0) of the operation
- log
- An error message (if the operation failed)
The following keys are returned when you specify -mode port:
- port.<bfd port config handle>.flap_count
- Number of times a flap event was detected by BFD on this port
- port.<bfd port config handle>.rx_count
- Number of BFD packets received on this port
- port.<bfd port config handle>.timeout_count
- Number of timeout conditions detected by BFD on this port
- port.<bfd port config handle>.tx_count
- Number of BFD packets sent on this port
- port.<bfd port config handle>.sessions_up_count
- Number of BFD sessions in Up state
- port.<bfd port config handle>.sessions_down_count
- Number of BFD sessions in Down and AdminDown states
The following keys are returned when you specify -mode session:
- session.<bfd port config handle>.bfd_control_bits
- A bit mask of the PFCADR bits in the BFD Control packet
- session.<bfd port config handle>.bfd_diagnostic_code
- Local reason for the last session state change
- session.<bfd port config handle>.bfd_session_state
- Current BFD session state as seen by the transmitting system
- session.<bfd port config handle>.flap_count
- Number of times a flap event was detected by BFD on this LAG
- session.<bfd port config handle>.ipv4dst_addr
- IPv4 destination address
- session.<bfd port config handle>.ipv4src_addr
- IPv4 source address
- session.<bfd port config handle>.last_bfd_diagnostic_error_rx
- Value of the last diagnostic error received by the LAG
- session.<bfd port config handle>.my_discriminator
- Transmitted discriminator identifier
- session.<bfd port config handle>.rx_avg_rate
- Average rate (packets per second) at which BFD packets were received
- session.<bfd port config handle>.rx_count
- Number of BFD control packets received
- session.<bfd port config handle>.rx_desired_min_rx_interval
- Desired minimum receive interval for Control packets received from the DUT
- session.<bfd port config handle>.rx_max_rate
- Maximum rate (packets per second) at which BFD packets were received
- session.<bfd port config handle>.rx_min_rate
- Minimum rate (packets per second) at which BFD packets were received
- session.<bfd port config handle>.timeout_count
- Number of timeout conditions detected by BFD on this LAG
- session.<bfd port config handle>.tx_avg_rate
- Average rate (packets per second) at which BFD packets were transmitted
- session.<bfd port config handle>.tx_count
- Number of BFD Control packets sent
- session.<bfd port config handle>.tx_interval
- Negotiated transmit interval in milliseconds
- session.<bfd port config handle>.tx_max_rate
- Maximum rate (packets per second) at which BFD packets were transmitted
- session.<bfd port config handle>.tx_min_rate
- Minimum rate (packets per second) at which BFD packets were transmitted
- session.<bfd port config handle>.your_discriminator
- Discriminator identifier received from the DUT
Description¶
The
sth::emulation_micro_bfd_info
function provides information about either the routers or ports specified for the BFD 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¶
Sample Input:
set results_ret1 [sth::emulation_micro_bfd_info\
-port_handle "$port1 $port2"\
-mode "session|port"]
Sample Output:
{status 1} {session {{lagbfdportconfig1 {{tx_interval 1000} {rx_min_rate 0}
{rx_desired_min_rx_interval 1000} {tx_min_rate 0.88} {rx_avg_rate 0} {rx_count 0}
{rx_max_rate 0} {flap_count 0} {tx_max_rate 1.227} {tx_count 7} {tx_avg_rate
1.05} {bfd_control_bits 8} {ipv4src_addr 10.10.10.10}
{last_bfd_diagnostic_error_rx NO_DIAGNOSTIC} {timeout_count 0} {bfd_session_state
DOWN} {ipv4dst_addr 10.10.10.20} {bfd_diagnostic_code NO_DIAGNOSTIC}
{my_discriminator 49152} {your_discriminator 0}}} {lagbfdportconfig2
{{tx_interval 1000} {rx_min_rate 0} {rx_desired_min_rx_interval 1000}
{tx_min_rate 0.881} {rx_avg_rate 0} {rx_count 0} {rx_max_rate 0} {flap_count 0}
{tx_max_rate 1.265} {tx_count 7} {tx_avg_rate 1.066} {bfd_control_bits 8}
{ipv4src_addr 20.10.10.10} {last_bfd_diagnostic_error_rx NO_DIAGNOSTIC}
{timeout_count 0} {bfd_session_state DOWN} {ipv4dst_addr 20.10.10.20}
{bfd_diagnostic_code NO_DIAGNOSTIC} {my_discriminator 49153} {your_discriminator
0}}}}} {port {{lagbfdportconfig1 {{tx_count 7} {rx_count 0} {sessions_down_count
1} {timeout_count 0} {flap_count 0} {sessions_up_count 0}}} {lagbfdportconfig2
{{tx_count 7} {rx_count 0} {sessions_down_count 1} {timeout_count 0} {flap_count
0} {sessions_up_count 0}}}}}