Showing results for 
Search instead for 
Did you mean: 

Ask the Expert- SD-WAN


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


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: ... 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 . corresponding to the BRIDGE-MIB as it follows:

snmpwalk -v2c -c myrouter .

it returns:

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

SNMPv2-SMI::mib- = INTEGER: 0

SNMPv2-SMI::mib- = 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


Re: Cannot find Port Number from MAC address using SNMP with Cis

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


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

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.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards