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 when store_vrfs is on. Reads show vrf, then the global show ip arp and show ipv6 neighbors and, for each listed VRF, show ip arp vrf NAME and, when the VRF lists ipv6 and the global show ipv6 neighbors answered, 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 list ipv6 has 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 or show vrf times out. families is [4] when the global show ipv6 neighbors did not answer cleanly (IPv6 is unsupported or unreached), and then vrf_read covers 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 in families was read whole, so a VRF whose IPv6 table fails is 0 though its IPv4 entries are reported. A show vrf is 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's Interfaces column); a reply without the header (an error, a denial, nothing) makes vrf_list_complete 0 and the global tables are still read. A VRF named all or with an unusual name is 0 and is never queried. Only a VRF named exactly default is the global table; Default is 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 arpnip must also override arpnip_by_vrf, or with store_vrfs on this arpnip_by_vrf is used instead of the override.