NAME
App::Netdisco::SSHCollector::Platform::IOSXE
DESCRIPTION
CLI collectors for Cisco IOS-XE.
ARP: IOS-XE does not always support "show ip arp vrf all". This module collects the global ARP table and, when VRFs are present, enumerates VRFs from "show vrf" and collects "show ip arp vrf <vrf>" for each. With store_vrfs on, arpnip_by_vrf also reads IPv6 neighbors and keeps each entry's VRF.
MAC: Collects forwarding entries from "show mac address-table" via an interactive PTY (Expect) to avoid BRIDGE/Q-BRIDGE MIB gaps seen on some IOS-XE builds and controller-managed deployments.
Both collectors normalise MAC formatting for Netdisco.
PUBLIC METHODS
- arpnip_by_vrf($host, $ssh, $args)
-
As
arpnip, used whenstore_vrfsis on. Readsshow vrf, then the globalshow ip arpandshow ipv6 neighborsand, for each listed VRF,show ip arp vrf NAMEand, when the VRF listsipv6and the globalshow ipv6 neighborsanswered,show ipv6 neighbors vrf NAME. Each entry's VRF is the one it was read from (the global table is''). A VRF that does not listipv6has no IPv6 table, so its IPv6 counts as read whole and empty.Returns
{ entries => [ { ip, mac, vrf } ], vrf_read => { VRF => 0|1 }, vrf_list_complete => 0|1, families => [4, 6] }, or undef when the session fails orshow vrftimes out.familiesis[4]when the globalshow ipv6 neighborsdid not answer cleanly (IPv6 is unsupported or unreached), and thenvrf_readcovers IPv4 only; otherwise it is[4, 6]. A table is read whole when it returned to the prompt with no%error and every line was a header or an entry. A VRF is 1 only when its table for every family infamilieswas read whole, so a VRF whose IPv6 table fails is 0 though its IPv4 entries are reported. Ashow vrfis a whole list only when it holds the header line and every other line is a VRF row or an interface-only continuation (one name in the header'sInterfacescolumn); a reply without the header (an error, a denial, nothing) makesvrf_list_complete0 and the global tables are still read. A VRF namedallor with an unusual name is 0 and is never queried. Only a VRF named exactlydefaultis the global table;Defaultis a user VRF. After a timeout the rest of the session is not read, and that VRF and every one not yet read are 0.A subclass that overrides
arpnipmust also overridearpnip_by_vrf, or withstore_vrfson thisarpnip_by_vrfis used instead of the override.