

Ĭhapter 7.3 has information that illustrates how to log data to a file using the FileSystemObject. ' Parse data for IP address and assign to variable strHost '. Ĭrt.Screen.Send "sho cdp nei " & strResult & vbcr ' Parse data for string to use in next command and assign to variable strResult '.

Interface: GigabitEthernet1/8, Port ID (outgoing port): GigabitEthernet0/1Ĭisco IOS Software, C3560 Software (C3560-IPBASE-M), Version 12.2(25)SEE3, RELEASE SOFTWARE (fc2)Ĭopyright (c) 1986-2007 by Cisco Systems, Inc. Platform: cisco WS-C3560-48PS, Capabilities: Switch IGMP (Assume already connected via telnet to a core switch) Here is a real example (I bolded the commands, and the parts of the returned data that are needed to complete the next step): In terms of output, I would love to have a report that shows the path taken, as well as the ports identified along the way. You will know you have completed your journey when either the "show cdp nei" command returns nothing, or when the telnet command to the next device fails. What I am hoping for is a script that will prompt the user to enter a string (mac address), and then use that to hop around the network until the final switchport is identified. To do this, I start at one of the core switches and use a series of two commands to get the next hop IP address, and then telnet to that address.

One of the more tedious things I have to do is to track down switchports for various reasons using a computer's MAC address. new to SecureCRT, new to vbscript as well.
