Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Check out NeDi and NetDisco. 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 0: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 2: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 3:48
add comment

1 Answer

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

http://netdbtracking.sourceforge.net/

share|improve this answer
    
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 5: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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.