[c-nsp] MAC address from cisco IOS switches

Prabhu Gurumurthy pgurumu at gmail.com
Mon Jan 28 15:50:47 EST 2008


All,

We have close to 15 2960 switches connected to twin 3750's with 15+ VLANs in the
domain. 3750's are stacked and it is the VTP server with 2960's being client.
There are no switches acting in transparent mode.

I want to get the MAC addresses from 3750's and 2960 using SNMP, instead of
logging into each switch and looking up mac address using sh mac address-table.

I looked through Cisco website and stumbled upon this website:
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml

This document deals only with Catalyst not IOS. Is there a easy way to get MAC 
entries using SNMP on IOS switch.

BTW I am using
pgurumur-vm-openbsd (OpenBSD): [~]
10.200.3.0: [1500]$  snmpget -v 1 -c silver4ro c2960-04 sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, C2960 Software 
(C2960-LANBASEK9-M), Version 12.2(37)SE, RELEASE SOFTWARE (fc2)
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Thu 10-May-07 16:43 by antonino

when I query RFC1213-MIB::atPhysAddress I am getting the following entries but 
not the entire list

pgurumur-vm-openbsd (OpenBSD): [~]
10.200.3.0: [1498]$ snmpwalk -v 1 -c silver4ro c2960-04 1.3.6.1.2.1.3.1.1.2   <
RFC1213-MIB::atPhysAddress.93.1.10.42.166.19 = Hex-STRING: 00 1C 0F A6 63 44
RFC1213-MIB::atPhysAddress.93.1.10.57.93.1 = Hex-STRING: 00 1C 0F A6 63 44
RFC1213-MIB::atPhysAddress.93.1.10.57.93.20 = Hex-STRING: 00 1C 0F 9D 26 41
RFC1213-MIB::atPhysAddress.93.1.10.57.166.241 = Hex-STRING: 00 1C 0F A6 63 44
RFC1213-MIB::atPhysAddress.93.1.10.200.1.253 = Hex-STRING: 00 1C 0F A6 63 44


sh mac address-table:

           Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  All    0100.0ccc.cccc    STATIC      CPU
  All    0100.0ccc.cccd    STATIC      CPU
  All    0180.c200.0000    STATIC      CPU
  All    0180.c200.0001    STATIC      CPU
  All    0180.c200.0002    STATIC      CPU
  All    0180.c200.0003    STATIC      CPU
  All    0180.c200.0004    STATIC      CPU
  All    0180.c200.0005    STATIC      CPU
  All    0180.c200.0006    STATIC      CPU
  All    0180.c200.0007    STATIC      CPU
  All    0180.c200.0008    STATIC      CPU
  All    0180.c200.0009    STATIC      CPU
  All    0180.c200.000a    STATIC      CPU
  All    0180.c200.000b    STATIC      CPU
  All    0180.c200.000c    STATIC      CPU
  All    0180.c200.000d    STATIC      CPU
  All    0180.c200.000e    STATIC      CPU
  All    0180.c200.000f    STATIC      CPU
  All    0180.c200.0010    STATIC      CPU
  All    ffff.ffff.ffff    STATIC      CPU
    1    000c.30fa.d6c0    DYNAMIC     Gi0/48
    1    001c.0fa6.6306    DYNAMIC     Gi0/48
    7    001c.0fa6.6306    DYNAMIC     Gi0/48
   64    001c.0fa6.6306    DYNAMIC     Gi0/48
   64    001c.0fa6.6342    DYNAMIC     Gi0/48
   93    001c.0fa6.6300    DYNAMIC     Gi0/48
   93    001c.0fa6.6306    DYNAMIC     Gi0/48
   93    001c.0fa6.6344    DYNAMIC     Gi0/48
  136    000b.46f4.b740    DYNAMIC     Gi0/48
  136    000b.5fb6.4760    DYNAMIC     Gi0/48
  136    000c.30fa.d6c0    DYNAMIC     Gi0/48
  136    0010.7b9b.d840    DYNAMIC     Gi0/48
  136    0014.a850.dfbd    DYNAMIC     Gi0/48
  136    001c.0fa6.6306    DYNAMIC     Gi0/48
  136    001c.0fa6.6347    DYNAMIC     Gi0/48
  136    0030.4882.79af    DYNAMIC     Gi0/3
   41    000b.46f4.b741    DYNAMIC     Gi0/48
   41    0010.7b9b.d861    DYNAMIC     Gi0/48
   41    001c.0fa6.6306    DYNAMIC     Gi0/48
   41    001c.0fa6.6341    DYNAMIC     Gi0/48
   44    000c.30fa.d6c0    DYNAMIC     Gi0/48
   44    001c.0fa6.6306    DYNAMIC     Gi0/48
   44    001c.0fa6.634a    DYNAMIC     Gi0/48
   45    0004.23a6.467c    DYNAMIC     Gi0/48
   45    0019.b9ea.ed0c    DYNAMIC     Gi0/48
   45    001c.0fa6.6306    DYNAMIC     Gi0/48
   45    001c.0fa6.634b    DYNAMIC     Gi0/48
   45    0030.bd71.5c67    DYNAMIC     Gi0/48
   90    0000.747c.a0a7    DYNAMIC     Gi0/48
   90    0004.23a6.37c3    DYNAMIC     Gi0/48
   90    0005.1bbd.8500    DYNAMIC     Gi0/48
   90    0007.4d22.7c70    DYNAMIC     Gi0/48
   90    0008.744f.d97d    DYNAMIC     Gi0/48
   90    000b.db78.d8bc    DYNAMIC     Gi0/48
   90    000b.db7d.2f55    DYNAMIC     Gi0/48
   90    000d.565e.ef7d    DYNAMIC     Gi0/48
   90    000d.566e.3780    DYNAMIC     Gi0/48
   90    000d.5692.b1fb    DYNAMIC     Gi0/48
   90    000d.5699.1e48    DYNAMIC     Gi0/48
   90    000d.5699.41d3    DYNAMIC     Gi0/48
   90    000d.56be.89ce    DYNAMIC     Gi0/48
   90    000d.56fc.efba    DYNAMIC     Gi0/48
   90    000f.1f8e.6679    DYNAMIC     Gi0/48
   90    000f.1fa5.5005    DYNAMIC     Gi0/48
   90    000f.1fa5.5dcc    DYNAMIC     Gi0/48
   90    000f.1fff.0fce    DYNAMIC     Gi0/48
   90    0011.434c.a4c3    DYNAMIC     Gi0/48
   90    0012.3f01.2490    DYNAMIC     Gi0/48
   90    0012.3f09.ca7e    DYNAMIC     Gi0/48
   90    0012.3f14.da48    DYNAMIC     Gi0/48
   90    0012.3f18.f91b    DYNAMIC     Gi0/48
   90    0012.3ff3.e0e2    DYNAMIC     Gi0/48
   90    0013.7282.ac08    DYNAMIC     Gi0/48
   90    0013.7296.b50a    DYNAMIC     Gi0/48
   90    0013.7296.bd8e    DYNAMIC     Gi0/48
   90    0013.7296.bf68    DYNAMIC     Gi0/48
   90    0013.72ab.fcfb    DYNAMIC     Gi0/48
   90    0013.72ab.fd2a    DYNAMIC     Gi0/48
   90    0014.2226.b954    DYNAMIC     Gi0/48
   90    0014.2234.efdf    DYNAMIC     Gi0/48
   90    0014.22ba.38de    DYNAMIC     Gi0/48
   90    0014.22db.b873    DYNAMIC     Gi0/48
   90    0015.c50c.593d    DYNAMIC     Gi0/48
   90    0015.c50f.1aae    DYNAMIC     Gi0/48
   90    0015.c50f.a38f    DYNAMIC     Gi0/48
   90    0015.c518.270a    DYNAMIC     Gi0/48
   90    0015.c520.4d35    DYNAMIC     Gi0/48
   90    0015.c520.5617    DYNAMIC     Gi0/48
   90    0015.c5b4.4804    DYNAMIC     Gi0/48
   90    0016.cb95.c249    DYNAMIC     Gi0/48
   90    0016.cbca.2bf4    DYNAMIC     Gi0/48
   90    0016.cbcf.350a    DYNAMIC     Gi0/48
   90    0017.f2cb.5f2b    DYNAMIC     Gi0/48
   90    0017.f2d2.69ef    DYNAMIC     Gi0/48
   90    0017.f2d6.0a00    DYNAMIC     Gi0/48
   90    0017.f2d7.9ec0    DYNAMIC     Gi0/48
   90    0017.f2d7.a113    DYNAMIC     Gi0/48
   90    0018.8b0a.3e82    DYNAMIC     Gi0/48
   90    0018.8b2a.463a    DYNAMIC     Gi0/48
   90    0018.8ba6.7783    DYNAMIC     Gi0/48
   90    0018.8ba7.1112    DYNAMIC     Gi0/48
   90    0018.8bd0.186c    DYNAMIC     Gi0/48
   90    0018.8bd4.d9ab    DYNAMIC     Gi0/48
   90    0019.e33c.b608    DYNAMIC     Gi0/48
   90    001a.4b21.f1b3    DYNAMIC     Gi0/48
   90    001a.4bcb.d2e7    DYNAMIC     Gi0/48
   90    001b.639a.1e70    DYNAMIC     Gi0/48
   90    001b.63a2.8821    DYNAMIC     Gi0/48
   90    001b.63a2.88c9    DYNAMIC     Gi0/48
   90    001b.63b6.d84b    DYNAMIC     Gi0/48
   90    001c.0fa6.6306    DYNAMIC     Gi0/48
   90    001c.0fa6.6343    DYNAMIC     Gi0/48
   90    001c.2306.e4f4    DYNAMIC     Gi0/48
   90    001c.239c.f63e    DYNAMIC     Gi0/48
   90    001c.2520.b5ba    DYNAMIC     Gi0/48
   90    001e.c200.127f    DYNAMIC     Gi0/48
  110    0012.f01e.2993    DYNAMIC     Gi0/48
  110    0018.de4e.352a    DYNAMIC     Gi0/48
  110    0018.deb7.afbd    DYNAMIC     Gi0/48
  110    001b.54d2.1036    DYNAMIC     Gi0/48
  110    001b.7729.c197    DYNAMIC     Gi0/48
  110    001b.d40a.f828    DYNAMIC     Gi0/48
  110    001b.d40a.f90c    DYNAMIC     Gi0/48
  110    001b.d4b9.16e6    DYNAMIC     Gi0/48
  110    001c.0fa6.6306    DYNAMIC     Gi0/48
  110    001c.0fa6.634c    DYNAMIC     Gi0/48
  110    001c.4309.a72b    DYNAMIC     Gi0/48
  110    001c.b316.e41b    DYNAMIC     Gi0/48
  110    001e.5273.a523    DYNAMIC     Gi0/48
  110    001e.527e.999c    DYNAMIC     Gi0/48
  112    0004.23a6.479e    DYNAMIC     Gi0/48
  112    0013.7274.a573    DYNAMIC     Gi0/48
  112    001c.0fa6.6306    DYNAMIC     Gi0/48
  112    001c.0fa6.634d    DYNAMIC     Gi0/48
  132    0004.23a6.37bc    DYNAMIC     Gi0/48
  132    0004.23a6.37c2    DYNAMIC     Gi0/48
  132    0004.23a6.46f4    DYNAMIC     Gi0/48
  132    0004.23a6.4712    DYNAMIC     Gi0/48
  132    0004.23a6.4727    DYNAMIC     Gi0/48
  132    0004.23a6.4798    DYNAMIC     Gi0/48
  132    0004.23a6.4da4    DYNAMIC     Gi0/48
  132    000b.db95.cfe2    DYNAMIC     Gi0/48
  132    000c.2916.3f75    DYNAMIC     Gi0/48
  132    000c.295f.5645    DYNAMIC     Gi0/48
  132    000c.29a1.a384    DYNAMIC     Gi0/48
  132    000c.29c3.1541    DYNAMIC     Gi0/48
  132    000c.29cb.0d4c    DYNAMIC     Gi0/48
  132    000c.29cb.6776    DYNAMIC     Gi0/48
  132    000c.29fb.ea40    DYNAMIC     Gi0/48
  132    000d.56fd.e91f    DYNAMIC     Gi0/48
  132    000d.56fd.f03f    DYNAMIC     Gi0/48
  132    000d.56fd.f12e    DYNAMIC     Gi0/48
  132    000d.56fd.f308    DYNAMIC     Gi0/48
  132    000d.56fd.f337    DYNAMIC     Gi0/48
  132    000d.56fd.f339    DYNAMIC     Gi0/48
  132    000d.56fd.f3e8    DYNAMIC     Gi0/48
  132    000d.56fd.f799    DYNAMIC     Gi0/48
  132    000e.0c05.e5f8    DYNAMIC     Gi0/48
  132    000e.0c05.eabe    DYNAMIC     Gi0/48
  132    000f.1f66.c887    DYNAMIC     Gi0/48
  132    0013.7253.922d    DYNAMIC     Gi0/48
  132    0013.7260.fced    DYNAMIC     Gi0/48
  132    0014.221a.e868    DYNAMIC     Gi0/48
  132    0014.221b.d1db    DYNAMIC     Gi0/48
  132    0014.221b.d247    DYNAMIC     Gi0/48
  132    0014.221b.e608    DYNAMIC     Gi0/48
  132    0014.221b.e659    DYNAMIC     Gi0/48
  132    0014.221b.e684    DYNAMIC     Gi0/48
  132    0018.8b4e.e046    DYNAMIC     Gi0/48
  132    0018.8b74.b57e    DYNAMIC     Gi0/48
  132    0018.8b84.9682    DYNAMIC     Gi0/48
  132    0019.b9b0.a792    DYNAMIC     Gi0/48
  132    0019.b9c6.3525    DYNAMIC     Gi0/48
  132    0019.b9d6.c083    DYNAMIC     Gi0/48
  132    0019.b9ec.e15c    DYNAMIC     Gi0/48
  132    0019.b9f2.2286    DYNAMIC     Gi0/48
  132    001c.0fa6.6306    DYNAMIC     Gi0/48
  132    001c.0fa6.6345    DYNAMIC     Gi0/48
  133    001c.0fa6.6306    DYNAMIC     Gi0/48
  133    001c.0fa6.6346    DYNAMIC     Gi0/48
  139    001c.0fa6.6306    DYNAMIC     Gi0/48
  139    001c.0fa6.6349    DYNAMIC     Gi0/48
  166    000d.5699.2f4f    DYNAMIC     Gi0/48
  166    001c.0fa6.6306    DYNAMIC     Gi0/48
  166    001c.0fa6.6348    DYNAMIC     Gi0/48
  166    00c0.b72d.4ecd    DYNAMIC     Gi0/48
  166    00c0.b730.7d5b    DYNAMIC     Gi0/36
  166    00c0.b730.7d5d    DYNAMIC     Gi0/48
  166    00c0.b730.7d7e    DYNAMIC     Gi0/48
  166    00c0.b730.8310    DYNAMIC     Gi0/34
  166    00c0.b730.b5ee    DYNAMIC     Gi0/48
  166    00c0.b770.4d5c    DYNAMIC     Gi0/5
  125    000c.298d.f732    DYNAMIC     Gi0/48
  125    000c.ce21.5b40    DYNAMIC     Gi0/2
  125    0012.1752.b4ab    DYNAMIC     Gi0/48
  125    0015.c52a.e69d    DYNAMIC     Gi0/2
  125    001c.0fa6.6306    DYNAMIC     Gi0/48
  171    000c.31ee.e4a0    DYNAMIC     Gi0/2
  171    000c.ce21.5b40    DYNAMIC     Gi0/2
  171    000e.83f6.0e5d    DYNAMIC     Gi0/1
  171    0015.c52a.e69d    DYNAMIC     Gi0/2
  171    001c.0fa6.6306    DYNAMIC     Gi0/48
  171    001c.23e1.cb85    DYNAMIC     Gi0/2
   82    0008.0082.0849    DYNAMIC     Gi0/48
   82    000f.348a.8380    DYNAMIC     Gi0/48
   82    001c.0fa6.6306    DYNAMIC     Gi0/48
Total Mac Addresses for this criterion: 206




More information about the cisco-nsp mailing list