wrgeorge1983 / Pystol

Collection of network management tools written in Python
GNU Lesser General Public License v2.1
6 stars 0 forks source link

macsearch.py is dependent on access to default gateway #1

Closed wrgeorge1983 closed 9 years ago

wrgeorge1983 commented 9 years ago

Most environments this is okay, my environment this is not.

For whatever reason, I can't get Ping {subnetbroadcastaddress} .... wait.... sh arp to work. Replies come in, but arp table entries are not made. Could be an IOS version or device limitation/feature. whatever. That route was considered for a different module (interfacedescriptions.py, I believe).

for macsearch.py, however, this will work just fine for resolving an IP: ping {ip} --- wait --- sh arp | i {ip}

So add that, and factor out the the default-gatway entirely, as it should never be needed here. That's dumb, and I'm leaving this here so I remember why it's dumb. Knowing the default gateway will be necessary for any environment that properly isolates the switch management IPs onto a separate VLAN. One day, hopefully, that will be my environment...

So add that functionality. Leave default-gateway as an option.

One day, perhaps rename-refactor that option from current pull existing ARP table assumed to have all talking hosts, and search it to resolve IPs

to Connect to THAT host to do ping/wait/arp lookup, so it doesn't have to actually be the default gateway, but rather simply have an interface on the right vlan.