SwitchScan

This software scans Cisco switch log files to detect ports numbers that are free or busy.

+============================================+

| SwitchScan (c)Frederic PONT 2017 |

| Free Software - GNU General Public License |

+============================================+

Enter the total port number of the switch (48 by default):

Switch [ 48 ]

_________________________________________________________________

-- tes1.txt --

-- test2.txt --

_________________________________________________________________

switch N° 1 [======== ] 37 / 11 (busy/free)

switch N° 2 [======== ] 40 / 8 (busy/free)

switch N° 3 [======= ] 35 / 13 (busy/free)

switch N° 4 [======== ] 41 / 7 (busy/free)

_________________________________________________________________

Detailed results are in "results"

Computation time 906.179µs.

Press enter to close window

Date : 2017-05-24

switch #1 37/11 77% busy

busy ports : [1 2 3 4 5 7 8 11 12 15 (...) 40 41 42 43 44 45 46 47 48]

free ports : [6 9 10 13 14 16 18 20 23 24 34]

switch #2 40/8 83% busy

busy ports : [1 2 3 4 5 6 7 8 9 10 11 (...) 38 40 41 43 45 46 47 48]

free ports : [14 20 26 29 34 39 42 44]

Manual :

The sofware is written in GO and compiled for Linux and windows 64 bits.

1- Unzip the zip file

2- copy your log files in the "data" directory

the file must contains this string :

switch number/number/port number

example :

----------

GigabitEthernet1/0/2

GigabitEthernet1/0/3

GigabitEthernet1/0/5

GigabitEthernet1/0/7

GigabitEthernet1/0/11

GigabitEthernet1/0/12

GigabitEthernet1/0/15

3- start the sofware by clicking on "SwitchScan_11_win64.exe" for windows or in a Linux terminal : ./SwitchScan_11_linux64.bin

4- detailed results with all ports numbers are in the "results" directory.

Important: SwitchScan can analyze multiple log files of the same switches at different times. In that case, busy port have priority over free ports. In other words, if the port #1 of switch #1 is open in all files except one, the port #1 will appear as busy.

Tip from Nicolas Buigues to obtain the busy port list of a Cisco switch :

log server IP = 192.168.0.10

switch IP = 192.168.0.20

command to enable logs on the switch :

conf terminal

logging 192.168.0.10

Then, on the log server to obtain the list of busy ports :

cat /var/log/clients/192.168.020/syslog.log* | grep -E "GigabitEthernet[1-4]/0/[0-9]{1,2}" -o | sort --version-sort | uniq