title: Obtaining MACs on a Layer 3 port via SNMP?
body: <p>I'm working on a script to map servers that are connected into our switches and routers.  I have it working to map layer two ports, using the algorithm listed at <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml" rel="nofollow">http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml</a> to pull out the MAC addresses.</p>
  
  <p>Layer 3 ports are another matter.  These are ports that don't show up in the 'sh vlan' command on a router/layer 3 switch.  Ideally, I'd like to use the MAC addresses present in these ports, underlying the layer 3 connection, as that's a bit more 'permanent' than the IP address - these do show up in the MAC-address table on the device.  However, the fact that these ports don't have an associated VLAN, and that the MAC retrieval via SNMP is VLAN-indexed, makes it quite difficult.</p>
  
  <p>I've been banging my head against this for about a week or so, but nothing I try/find seems to allow me to get the non-VLAN MAC addresses.  Is it possible to map the layer three ports this way, or will I need to use layer 3 (IP address) mapping?</p>