ARP/ND Functions¶
sth::arp_nd_config¶
Purpose¶
This is a Spirent Extension created to configure Address Resolution Protocol (ARP) ARP/Network Discovery (ND). ARP/ND resolves the MAC address of the gateway/destination for the specified streamblocks or emulated devices. ARP is used for IPv4 address resolution and ND is used with IPv6.
Synopsis¶
Note
M indicates that the argument is Mandatory .
sth::arp_nd_config [-apply_configured_gw_mac {true|false}] [-duplicate_gw_detection {true|false}] [-auto_arp_enable {true|false}] [-cyclic_arp_enable {true|false}] [-unique_mac_addr_in_reply_enable {true|false}] [-unique_mac_pattern {0-65535}] [-ignore_failures {true|false}] [-learning_rate <integer>] [-max_burst <integer>] [-process_gratuitous_arp_requests {true|false}] [-process_unsolicited_arp_replies {true|false}] [-retry_count <0-100>] [-time_out <integer>] [-update_dest_mac {true|false}] [-use_configured_link_local_addr {true|false}] [-use_gw_for_target {true|false}] [-use_link_layer_cache_in_stack {true|false}] [-use_link_local_addr {true|false}]
Arguments¶
-
-apply_configured_gw_mac
¶
Once enabled, Spirent HLTAPI will use the gateway MAC address configured on the emulated device interface instead of using ARP/ND to resolve the address. Possible values are true (enable) and false (disable). The default value is false.
-
-duplicate_gw_detection
¶
Once enabled, Spirent HLTAPI will perform ARP/ND suppression for a duplicate gateway. Possible values are true (enable) and false (disable). The default value is true.
-
-auto_arp_enable
¶
Determines whether to resolve IPv4 or IPv6 addresses before transmitting. Possible values are true and false. When it is set to true, Spirent HLTAPI will resolve IPv4 or IPv6 addresses before transmitting. The default value is false.
-
-cyclic_arp_enable
¶
Enables or disables cyclic ARP. Possible values are true (enable) and false (disable). The default value is true.
-
-unique_mac_addr_in_reply_enable
¶
Enables or disables the firmware to respond with a unique MAC address. Possible values are true (enable) and false (disable). The default value is false.
-
-unique_mac_pattern
¶
Defines the response pattern for the first two octets of the MAC address to be sent to the firmware. You must set -unique_mac_addr_in_reply_enable to true. Possible values range from 0 to 65535. The default value is 2222.
-
-ignore_failures
¶
Once enabled, Spirent HLTAPI will ignore ARP/ND failures and proceed to transmit. Possible values are true (enable) and false (disable). The default value is true.
-
-learning_rate
¶
Specifies the learning rate for ARP/ND in packets per second. The default value is 250.
-
-max_burst
¶
Specifies the maximum burst size in packets allowed for ARP/ND. The default value is 16.
-
-process_gratuitous_arp_requests
¶
Once enabled, Spirent HLTAPI allows gratuitous ARP requests from the DUT. Possible values are true (enable) and false (disable). The default value is true.
-
-process_unsolicited_arp_replies
¶
Once enabled, Spirent HLTAPI allows unsolicited ARP replies from the DUT. Possible values are true (enable) and false (disable). The default value is true.
-
-retry_count
¶
Specifies the retry count of ARP/ND. Possible values range from 0 to 100. The default value is 3.
-
-time_out
¶
Specifies the timeout interval in milliseconds for ARP/ND. The default value is 1000.
-
-update_dest_mac
¶
Enables/disables destination MAC address learning on receiving non-gratuitous ARP requests. Possible values are true (enable) and false (disable). The default value is false.
-
-use_configured_link_local_addr
¶
Once enabled, the IPv6 device will use the configured link local IPv6 address as the source address for neighbor discovery. Possible values are true (enable) and false (disable). The default value is false.
-
-use_gw_for_target
¶
Once enabled, the gateway address will be used as the ARP target, whether or not the destination address is in the same subnet as the source IP address. Possible values are true (enable) and false (disable). The default value is false.
-
-use_link_layer_cache_in_stack
¶
Once enabled, Spirent HLTAPI will check the ARP/ND cache first and use any item it finds there. If there is no item in the cache, the system sends an ARP/ND request. Possible values are true (enable) and false (disable). The default value is false.
-
-use_link_local_addr
¶
Once enabled, the IPv6 device will use the configured link local IPv6 address as the source address for neighbor discovery. Possible values are true (enable) and false (disable). The default value is false.
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::arp_nd_config
function configures ARP/ND to resolve the MAC address of
the gateway/destination in the specified streamblocks or emulated devices. The
returned keyed list displays whether the operation was successful.
Examples¶
Sample Input:
set device_ret0 [sth::arp_nd_config\
-apply_configured_gw_mac true\
-duplicate_gw_detection false\
-auto_arp_enable true\
-cyclic_arp_enable false\
-unique_mac_addr_in_reply_enable true\
-unique_mac_pattern_enable 1111\
-ignore_failures false\
-learning_rate 0\
-max_burst 0\
-process_gratuitous_arp_requests false\
-process_unsolicited_arp_replies false\
-retry_count 5\
-time_out 1500\
-update_dest_mac true\
-use_configured_link_local_addr true\
-use_gw_for_target true\
-use_link_layer_cache_in_stack true\
-use_link_local_addr true]
Sample Output:
{status 1}