Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Folks, I've got a doozy here. I'll explain the circumstances first, then the problem. I have a batch file that uses TST10.exe to script a telnet session into a managed switch. It retrieves the MAC addresses of all active devices on the network, then it sends one ping to every possible IP so it can then retrieve the ARP table of the PC. It then deduces which device is in which port by way of comparing MAC and IP addresses. (This bit of magic was IVO's handiwork.) Here's the problem: if I run this batch file remotely (i.e. via PsExec), the end report looks great (I've actually been doing the parsing locally after retrieving the information from the remote system). If I parse everything on the local machine, it doubles the IPs and MACs. Here's an example:
Port 3 192.168.0.3
Port 3 192.168.0.3
Port 4 192.168.0.4
Port 4 192.168.0.4
Port 5 192.168.0.5
Port 5 192.168.0.5
Port 6 192.168.0.6
Port 6 192.168.0.6
Port 15 192.168.0.25
Port 15 192.168.0.25
Port 12 192.168.0.34
Port 12 192.168.0.34
Port 13 192.168.0.251
Port 13 192.168.0.251
Port 10 192.168.0.253
Port 10 192.168.0.253Here's the message that IVO left his code on (with my explaining what I was originally trying to do):
http://www.computing.net/programmin...I have used the same computer both times (dialed in remotely and physically sitting at it). Any ideas as to why it doubles the lines when parsed locally?

Hello keridbey,
before we go ahead along exoteric lanes, please, can you verify if the ARP table contains the same entries either locally or remotely constructed?
As the issue may be due to a data collection trouble more than the parsing procedure.
Sorry, but that is the first thing to be inspected before carring on any debugging.

Argh.. I had gone through my code several times yesterday and couldn't find anything wrong with it. Today I took one look and see that I had somehow copied and pasted two lines twice, doubling up on the information it was parsing. I think my ancient CRT has been cooking my brain.
Thanks for your help!!!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |