cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1434
Views
0
Helpful
2
Replies

Cannot find Port Number from MAC address using SNMP with Cisco 3725

Lopes1990
Level 1
Level 1

Greetings,

Right now I'm developing a project where I use the SNMP protocol to discover the network. By discovering the network I mean go through all the routers and switches and retrieve the IP routing table from routers and the forwarding table from switches. With the routers I have no problem. For the switches I need to know for each port the MAC addresses and the Vlans. Basically it's use SNMP to find a port number from a MAC address. To do that i followed this tutorial:

http://www.cisco.com/en/US/tech/tk648/t ... 9199.shtml

The problem is that I'm using a Cisco 3725 Router with IOS 12.4 (21) and a NM-16ESW module to work as a Switch and when I use the OID .1.3.6.1.2.1.17 corresponding to the BRIDGE-MIB as it follows:

snmpwalk -v2c -c myrouter 10.1.1.5 .1.3.6.1.2.1.17

it returns:

SNMPv2-SMI::mib-2.17.1.1.0 = Hex-STRING: 00 00 00 00 00 00

SNMPv2-SMI::mib-2.17.1.2.0 = INTEGER: 0

SNMPv2-SMI::mib-2.17.1.3.0 = INTEGER: 4

From this I guess there's no information on the router about Vlans or anything. Other thing is that when I use community string indexing it returns a timeout. My theory is that this version doesn't support indexing but I don't know.

Can anyone help me or have any suggestion about how can I get the Port Number from a MAC address from this "switch" (it's a router working as a switch) using SNMP?

Paulo Lopes

2 Replies 2

Jeff Van Houten
Level 5
Level 5

Are you using dhcp on the network? If you are you could enable dhcp snooping and just periodically download and parse the dhcp snooping table.

Sent from Cisco Technical Support iPad App

No, I'm defining the IP addresses device by device. Everytime a device is connected it's supposed to be configured with the IP address and Default Gateway but without using DHCP.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: