<div dir="ltr">I must have misunderstood your earlier comments.<div><br></div><div>Doesn't ifname in the switchport table have to match the snmp poll of l2database script to insert in to the macaddress table?</div><div>
<br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><strong style="font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px;color:rgb(136,136,136)">Brian Thompson</strong><br>
<span style="color:rgb(0,102,51);font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px">Senior Infrastructure Engineer // Senior Second Guesser</span><br><font color="#666666" face="Lucida Grande, Verdana, Arial, sans-serif"><span style="font-size:12px;line-height:15px"><br>
</span></font><span style="color:rgb(102,102,102);font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px">Direct: </span><a value="+15039436742" style="font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px;color:rgb(17,85,204)">503.943.6779</a><br>
<span style="color:rgb(102,102,102);font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px">Mobile: </span><a value="+15033196955" style="font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px;color:rgb(17,85,204)">503.707.9018</a><span style="color:rgb(102,102,102);font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px"> // Twitter: iovation</span><br>
<strong style="color:rgb(0,102,51);font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:12px;line-height:16px"><a href="http://www.iovation.com/" title="Visit iovation.com" style="color:rgb(0,102,51);text-decoration:none;border-bottom-width:0px;border-bottom-style:initial;border-bottom-color:initial" target="_blank">www.iovation.com</a></strong><br>
<font color="#006633" face="Lucida Grande, Verdana, Arial, sans-serif"><span style="font-size:12px;line-height:15px"><br></span></font><span><font color="#888888"><div><font color="#006633" face="'Lucida Grande', Verdana, Arial, sans-serif"><span style="font-size:12px;line-height:16px"><img src="http://www.iovation.com/images/signature/eml_sig_mobilefraud.gif"></span></font></div>
</font></span></div>
<br><br><div class="gmail_quote">On Wed, Sep 25, 2013 at 11:44 AM, Barry O'Donovan <span dir="ltr"><<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
On 25/09/13 19:05, Brian Thompson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This definitely seems to be the issue.<br>
</blockquote>
<br></div>
No, this is a red herring.<br>
<br>
The switchport database contains the physical MAC address of the switch port - we don't use it for anything (yet, if ever).<br>
<br>
This has nothing what so ever to do with the <a href="http://l2database.pl" target="_blank">l2database.pl</a> script.<br>
<br>
 - Barry<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
The /bin/ixptool.php -a switch-cli.snmp-poll script is loading the<br>
database with layer 2 interface. (i.e. with out the .0 in the name) and<br></div>
The bin/<a href="http://update-l2database-test.pl" target="_blank">update-l2database-test.pl</a> <<a href="http://update-l2database-test.pl" target="_blank">http://update-l2database-<u></u>test.pl</a>><div class="im">
<br>
--debug --vlan 998 script is showing the macaddresses on the layer 3<br>
interfaces.<br>
<br>
root@portal:~# perl /usr/local/bin/<a href="http://update-l2database-test.pl" target="_blank">update-<u></u>l2database-test.pl</a><br></div>
<<a href="http://update-l2database-test.pl" target="_blank">http://update-l2database-<u></u>test.pl</a>> --debug --vlan 998<div><div class="h5"><br>
DEBUG: processing ex4500<br>
DEBUG: attempting to retrieve dot1qVlanFdbId mapping<br>
(.1.3.6.1.2.1.17.7.1.4.2.1.3) on ex4500<br>
DEBUG: that didn't work. let's try Juniper EX jnxExVlanTag mapping<br>
instead (.1.3.6.1.4.1.2636.3.40.1.5.1.<u></u>5.1.5) on ex4500<br>
DEBUG: attempting Q-BRIDGE-MIB (.1.3.6.1.2.1.17.7.1.2.2.1.2.<u></u>2) on ex4500<br>
$l2mapping = {<br>
           'ex4500' => {<br>
                         'ge-0/0/39.0' => [<br>
                                            '00d02b194100'<br>
                                          ],<br>
                         'ge-0/0/19.0' => [<br>
                                            '00500b38b419'<br>
                                          ],<br>
                         'ge-0/0/2.0' => [<br>
                                           '5c5eabdc7e79'<br>
                                         ],<br>
                         'ge-0/1/1.0' => [<br>
                                           '5c5eabd24278'<br>
and<br>
<br>
$ports = {<br>
           'ex4500' => {<br>
                         'xe-0/0/26' => {<br>
                                          'switchportid' => '10',<br>
                                          'infrastructure' => '1',<br>
                                          'status' => '1',<br>
                                          'switch' => 'ex4500',<br>
                                          'switchport' => 'xe-0/0/26',<br>
                                          'spifname' => 'xe-0/0/26',<br>
                                          'id' => '25'<br>
                                        },<br>
                         'ge-0/0/25' => {<br>
                                          'switchportid' => '21',<br>
                                          'infrastructure' => '1',<br>
                                          'status' => '1',<br>
                                          'switch' => 'ex4500',<br>
                                          'switchport' => 'ge-0/0/25',<br>
                                          'spifname' => 'ge-0/0/25',<br>
                                          'id' => '24'<br>
                                        },<br>
                         'xe-0/0/0' => {<br>
                                         'switchportid' => '5',<br>
                                         'infrastructure' => '1',<br>
                                         'status' => '1',<br>
                                         'switch' => 'ex4500',<br>
                                         'switchport' => 'xe-0/0/0',<br>
                                         'spifname' => 'xe-0/0/0',<br>
                                         'id' => '2'<br>
                                       },<br>
<br>
<br>
mysql> desc switchport;<br>
+---------------+-------------<u></u>-+------+-----+---------+-----<u></u>-----------+<br>
| Field         | Type         | Null | Key | Default | Extra          |<br>
+---------------+-------------<u></u>-+------+-----+---------+-----<u></u>-----------+<br>
| id            | int(11)      | NO   | PRI | NULL    | auto_increment |<br>
| switchid      | int(11)      | YES  | MUL | NULL    |                |<br>
| type          | int(11)      | YES  |     | NULL    |                |<br>
| name          | varchar(255) | YES  |     | NULL    |                |<br>
| active        | tinyint(1)   | NO   |     | NULL    |                |<br>
| ifIndex       | int(11)      | YES  |     | NULL    |                |<br>
| ifName        | varchar(255) | YES  |     | NULL    |                |<br>
| ifAlias       | varchar(255) | YES  |     | NULL    |                |<br>
| ifHighSpeed   | int(11)      | YES  |     | NULL    |                |<br>
| ifMtu         | int(11)      | YES  |     | NULL    |                |<br>
| ifPhysAddress | varchar(17)  | YES  |     | NULL    |                |<br>
| ifAdminStatus | int(11)      | YES  |     | NULL    |                |<br>
| ifOperStatus  | int(11)      | YES  |     | NULL    |                |<br>
| ifLastChange  | int(11)      | YES  |     | NULL    |                |<br>
| lastSnmpPoll  | datetime     | YES  |     | NULL    |                |<br>
| lagIfIndex    | int(11)      | YES  |     | NULL    |                |<br>
+---------------+-------------<u></u>-+------+-----+---------+-----<u></u>-----------+<br>
16 rows in set (0.03 sec)<br>
<br>
<br>
+----+----------+------+------<u></u>-----+--------+---------+-----<u></u>------+-----------------------<u></u>----------------------+-------<u></u>------+-------+---------------<u></u>+---------------+-------------<u></u>-+--------------+-------------<u></u>--------+------------+<br>

| id | switchid | type | name      | active | ifIndex | ifName    |<br>
ifAlias                                     | ifHighSpeed | ifMtu |<br>
ifPhysAddress | ifAdminStatus | ifOperStatus | ifLastChange |<br>
lastSnmpPoll        | lagIfIndex |<br>
+----+----------+------+------<u></u>-----+--------+---------+-----<u></u>------+-----------------------<u></u>----------------------+-------<u></u>------+-------+---------------<u></u>+---------------+-------------<u></u>-+--------------+-------------<u></u>--------+------------+<br>

|  1 |        1 |    0 | me0       |      1 |      33 | me0       |<br>
                                         |        1000 |  1514 |<br>
50C58DA83582  |             1 |            1 |   1378257361 | 2013-09-25<br>
18:51:24 |       NULL |<br>
|  2 |        1 |    0 | vme       |      1 |      35 | vme       |<br>
                                         |        1000 |  1518 |<br>
50C58DA83582  |             1 |            1 |   1378257361 | 2013-09-25<br>
18:51:24 |       NULL |<br>
|  3 |        1 |    0 | bme0      |      1 |      37 | bme0      |<br>
                                         |           0 |  1576 |<br>
000BCAFE0000  |             1 |            1 |            0 | 2013-09-25<br>
18:51:24 |       NULL |<br>
|  4 |        1 |    0 | vlan      |      1 |     503 | vlan      |<br>
                                         |        1000 |  1518 |<br>
50C58DA83581  |             1 |            1 |            0 | 2013-09-25<br>
18:51:24 |       NULL |<br>
|  5 |        1 |    1 | xe-0/0/0  |      1 |     504 | xe-0/0/0  |<br>
xxxxx xe-0/3/0                              |       10000 |  1518 |<br>
50C58DA83583  |             1 |            1 |   1377849038 | 2013-09-25<br>
18:51:25 |       NULL |<br>
|  6 |        1 |    1 | ge-0/1/3  |      1 |     508 | ge-0/1/3  |<br>
xxxxxxxxxxx                     |        1000 |  1514 | 50C58DA835AE  |<br>
             1 |            2 |   1378256790 | 2013-09-25 18:51:25 |<br>
   NULL |<br>
|  7 |        1 |    1 | xe-0/0/4  |      1 |     512 | xe-0/0/4  |<br>
xxxxxxxxxxxx                        |       10000 |  1514 | 50C58DA83587<br>
  |             1 |            1 |   1377849039 | 2013-09-25 18:51:25 |<br>
       NULL |<br>
|  8 |        1 |    1 | xe-0/0/16 |      1 |     536 | xe-0/0/16 |<br>
xxxxxxxxxxxx                      |       10000 |  1514 | 50C58DA83593<br>
  |             1 |<br>
<br></div></div>
*Brian Thompson*<div class="im"><br>
Senior Infrastructure Engineer // Senior Second Guesser<br>
<br>
Direct: <a href="tel:503.943.6779" value="+15039436779" target="_blank">503.943.6779</a><br>
Mobile: <a href="tel:503.707.9018" value="+15037079018" target="_blank">503.707.9018</a> // Twitter: iovation<br></div>
*<a href="http://www.iovation.com" target="_blank">www.iovation.com</a> <<a href="http://www.iovation.com/" target="_blank">http://www.iovation.com/</a>>*<div class="im"><br>
<br>
<br>
<br>
On Wed, Sep 25, 2013 at 2:45 AM, Barry O'Donovan <<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a><br></div><div class="im">
<mailto:<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a><u></u>>> wrote:<br>
<br>
<br>
<br>
    On 25/09/13 10:43, Barry O'Donovan wrote:<br>
<br>
        Note that the database now also records the ifIndex of ports<br>
        (and other<br>
        additional info - see below)<br>
<br>
<br>
    Opps... quoted the wrong table. Here's switchport:<br>
<br>
    MariaDB [inex]> desc switchport;<br></div>
    +---------------+-------------<u></u>__-+<br>
    | Field         | Type         |<br>
    +---------------+-------------<u></u>__-+<div class="im"><br>
    | id            | int(11)      |<br>
    | switchid      | int(11)      |<br>
    | type          | int(11)      |<br>
    | name          | varchar(255) |<br>
    | ifName        | varchar(255) |<br>
    | ifAlias       | varchar(255) |<br>
    | ifHighSpeed   | int(11)      |<br>
    | ifMtu         | int(11)      |<br>
    | ifPhysAddress | varchar(17)  |<br>
    | ifAdminStatus | int(11)      |<br>
    | ifOperStatus  | int(11)      |<br>
    | ifLastChange  | int(11)      |<br>
    | lastSnmpPoll  | datetime     |<br>
    | ifIndex       | int(11)      |<br>
    | active        | tinyint(1)   |<br>
    | lagIfIndex    | int(11)      |<br></div>
    +---------------+-------------<u></u>__-+<div class="im"><br>
    16 rows in set (0.00 sec)<br>
<br>
<br>
      - Barry<br>
<br>
<br>
<br></div>
    ______________________________<u></u>___________________<div class="im"><br>
    INEX IXP Manager mailing list<br></div>
    <a href="mailto:ixpmanager@inex.ie" target="_blank">ixpmanager@inex.ie</a> <mailto:<a href="mailto:ixpmanager@inex.ie" target="_blank">ixpmanager@inex.ie</a>><br>
    <a href="https://www.inex.ie/mailman/__listinfo/ixpmanager" target="_blank">https://www.inex.ie/mailman/__<u></u>listinfo/ixpmanager</a><br>
    <<a href="https://www.inex.ie/mailman/listinfo/ixpmanager" target="_blank">https://www.inex.ie/mailman/<u></u>listinfo/ixpmanager</a>><div class="im"><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
INEX IXP Manager mailing list<br>
<a href="mailto:ixpmanager@inex.ie" target="_blank">ixpmanager@inex.ie</a><br>
<a href="https://www.inex.ie/mailman/listinfo/ixpmanager" target="_blank">https://www.inex.ie/mailman/<u></u>listinfo/ixpmanager</a><br>
<br>
</div></blockquote>
<br>
-- <br>
<br>
<br>
Kind regards,<br>
Barry O'Donovan<br>
INEX Operations<br>
<br>
We're IPv6 Ready. Are you? <a href="http://www.ipv6ready.ie/" target="_blank">http://www.ipv6ready.ie/</a><br>
<br>
Mob: <a href="tel:%2B353%2086%20801%207669" value="+353868017669" target="_blank">+353 86 801 7669</a><br>
Tel: <a href="tel:%2B353%20%201%20685%204220" value="+35316854220" target="_blank">+353  1 685 4220</a><br>
SIP: <a href="mailto:barry@opensolutions.ie" target="_blank">barry@opensolutions.ie</a><br>
Fax: <a href="tel:%2B353%20%201%20685%204263" value="+35316854263" target="_blank">+353  1 685 4263</a><br>
<br>
+-----------------------------<u></u>--+---------------------------<u></u>----------+<br>
| Open Source Solutions Ltd.    | INEX Operations Team                |<br>
| Lynx House Old Church Road,   | Internet Neutral Exchange           |<br>
| Lower Kilmacud Road,          | Association, 4027 Kingswood Road,   |<br>
| Stillorgan, Co Dublin.        | Citywest Business Campus, Dublin 24 |<br>
| <a href="http://www.opensolutions.ie/" target="_blank">http://www.opensolutions.ie/</a>  | <a href="http://www.inex.ie/" target="_blank">http://www.inex.ie/</a>                 |<br>
+-----------------------------<u></u>--+---------------------------<u></u>----------+<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
______________________________<u></u>_________________<br>
INEX IXP Manager mailing list<br>
<a href="mailto:ixpmanager@inex.ie" target="_blank">ixpmanager@inex.ie</a><br>
<a href="https://www.inex.ie/mailman/listinfo/ixpmanager" target="_blank">https://www.inex.ie/mailman/<u></u>listinfo/ixpmanager</a><br>
</div></div></blockquote></div><br></div>