title: SNMP Mapping Mac Address to Switch Port
body: <p>I work at a datacenter and I'm in the process of writing a php tool that maps all of our devices and can tell us if what is out there is what is being billed for.</p>
  
  <p>It first pulls a huge list of macs and their ips from both of the cores into a temp table. Then, it loops through all of the racks* and attempts to find which port that mac belongs to. Since there is no golden command (cue lightbulb over your head), I have to:</p>
  
  <ol>
  <li>Create a multi-array with the port as the key and the ifindex for the value.</li>
  <li>Replace the ifindex with with a bridge ID.</li>
  <li>Replace the bridge ID with the mac hash.</li>
  <li>Repalce the mac hash with the actual mac</li>
  </ol>
  
  <p>Lastly, it takes the mac, ips, and port and populates the master table.</p>
  
  <p>The problem is step one. 1.3.6.1.2.1.31.1.1.1.1 works on most of the switches but a few of the foundrys do not work. 1.3.6.1.4.1.1991.1.1.3.3.1.1.38 kinda comes close to what I'm looking for but im not entirely comfortable it's what I'm looking for. I was able to find the specific device models under foundry > products > registration, but there aren't any MIBs under that folder. So my questions are:</p>
  
  <ol>
  <li>Is there a foundry specific string that returns ports and macs? ifindexes would also work.</li>
  <li>How do I go about using device specific MIBs (enterprises.foundry.products.registration.snFWSXFamily)?</li>
  </ol>
  
  <p>Any direction on this would be great.
  -Justin</p>
  
  <p>*= rack models: cisco 2900xl, foundry FI4802 + variants</p>