Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am two cisco 2960 switch connected together. Let's assume they are s1 and s2. I am required to show the switch topology, means I need to use snmp to get which ifIndex of s1 is conneted to which ifIndex of s2. I know oids to get mac list and ip address but seems like this can't get me the information I want. How to do that?



share|improve this question

If you have CDP enabled then use one of the oids from there, something like 'cdpCacheEntry' might do the job although it's ages since I used them so that may not be the exact one.

Failing that you can use the arp table to find the IP address & MAC address of the neighbouring switch then that should give you the interface as well.

share|improve this answer

Your Answer


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.