0

I work at an organisation that has a few thousand computers and around 100 switches. To help with the stock take for the computers I would like to programmatically access the managed switches to find what plugs are being used and if it is possible the ip address of the computer that is connected to that plug.

I haven't done much with networking or connection to managed switches before so I am hoping someone could tell me where I should start for trying to get this information out of the switch?

user802599
  • 101
  • 1
  • Check out [NeDi](http://www.nedi.ch/) and [NetDisco](http://www.netdisco.org/). Both tools can inventory your switches and attached nodes. You can also use them to do things like up/down ports, etc. – jscott Apr 18 '13 at 00:53
  • Expect is pretty handy for dealing with Cisco gear. The answer given might help more with your current question though. – cpt_fink Apr 18 '13 at 02:57
  • I have done some more research into this and I think I should be able to run a "Cisco IOS CLI command", "(switch# show mac-address-table) and that will give me a mac address to port list and there I can try and map mac address to ip and ip to Computer name. I don't know what a CLI command is or how to run one but I am hopping it is comething like command prompt. Does anyone know how I can run a CLI command, is this something I am going to need to find out the username and password for each switch to be able to use? – user802599 Apr 22 '13 at 03:48

1 Answers1

2

Use NetDB - it's awesome and does what you want.

http://netdbtracking.sourceforge.net/

ETL
  • 6,443
  • 1
  • 26
  • 47
  • I have had a look at this and looks like if would do what I needed. Do you know if there is a a windows version or something similar that would work on windows. – user802599 Apr 19 '13 at 05:18
  • I don't know exactly but it's written in perl so it may work but they don't say so that probably means nobody tried it or nobody tried and told the world. You could run it in a VM. It's not particularly resources consuming. – ETL Apr 19 '13 at 13:39