m_merged_arp_to_csv

m_merged_arp_to_csv.script_main(script)
MULTIPLE device script
Author: Jamie Caesar

This script will pull the ARP tables from multiple devices and combine their data into a single ARP CSV file.

The main intention for this script is to be used with the ‘s_switchport_mapping’ script, which will prompt for an ARP table CSV file to list IPs connected to switch ports. This script is intended to speed up the collection of ARP data in cases such as:

1) There are 2 core switches running a first hop redundancy protocol (HSRP, GLBP, etc) and both devices are actively passing traffic so we need both ARP tables

2) The switch has VLANs that are being used in multiple upstream VRFs (not all with SVIs on the same devices) so the ARP tables from many devices may be needed to fully map the switch.

NOTE: Since this script merges ARP tables of multiple devices which may have duplicate entries, the interface is NOT written to the output file like it is with the single device version of this script.

This script checks that it will NOT be run in a connected tab. This script initiates the connection to all devices based on the input of the device CSV file that the script requests.

Parameters:script (scripts.Script) – A subclass of the scripts.Script object that represents the execution of this particular script (either CRTScript or DirectScript)
m_merged_arp_to_csv.per_device_work(session, selected_vrf, add_header)

This function contains the code that should be executed on each device that this script connects to. It is called after establishing a connection to each device in the loop above.

This function gathers the ARP table information and returns it (in list format) to the calling program.