[ixpmanager] update-l2database.pl not updating database

Brian Thompson brian.thompson at iovation.com
Wed Sep 25 19:05:34 IST 2013


This definitely seems to be the issue.

The /bin/ixptool.php -a switch-cli.snmp-poll script is loading the database
with layer 2 interface. (i.e. with out the .0 in the name) and
The bin/update-l2database-test.pl --debug --vlan 998 script is showing the
macaddresses on the layer 3 interfaces.

root at portal:~# perl /usr/local/bin/update-l2database-test.pl --debug --vlan
998
DEBUG: processing ex4500
DEBUG: attempting to retrieve dot1qVlanFdbId mapping
(.1.3.6.1.2.1.17.7.1.4.2.1.3) on ex4500
DEBUG: that didn't work. let's try Juniper EX jnxExVlanTag mapping instead
(.1.3.6.1.4.1.2636.3.40.1.5.1.5.1.5) on ex4500
DEBUG: attempting Q-BRIDGE-MIB (.1.3.6.1.2.1.17.7.1.2.2.1.2.2) on ex4500
$l2mapping = {
          'ex4500' => {
                        'ge-0/0/39.0' => [
                                           '00d02b194100'
                                         ],
                        'ge-0/0/19.0' => [
                                           '00500b38b419'
                                         ],
                        'ge-0/0/2.0' => [
                                          '5c5eabdc7e79'
                                        ],
                        'ge-0/1/1.0' => [
                                          '5c5eabd24278'
and

$ports = {
          'ex4500' => {
                        'xe-0/0/26' => {
                                         'switchportid' => '10',
                                         'infrastructure' => '1',
                                         'status' => '1',
                                         'switch' => 'ex4500',
                                         'switchport' => 'xe-0/0/26',
                                         'spifname' => 'xe-0/0/26',
                                         'id' => '25'
                                       },
                        'ge-0/0/25' => {
                                         'switchportid' => '21',
                                         'infrastructure' => '1',
                                         'status' => '1',
                                         'switch' => 'ex4500',
                                         'switchport' => 'ge-0/0/25',
                                         'spifname' => 'ge-0/0/25',
                                         'id' => '24'
                                       },
                        'xe-0/0/0' => {
                                        'switchportid' => '5',
                                        'infrastructure' => '1',
                                        'status' => '1',
                                        'switch' => 'ex4500',
                                        'switchport' => 'xe-0/0/0',
                                        'spifname' => 'xe-0/0/0',
                                        'id' => '2'
                                      },


mysql> desc switchport;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| id            | int(11)      | NO   | PRI | NULL    | auto_increment |
| switchid      | int(11)      | YES  | MUL | NULL    |                |
| type          | int(11)      | YES  |     | NULL    |                |
| name          | varchar(255) | YES  |     | NULL    |                |
| active        | tinyint(1)   | NO   |     | NULL    |                |
| ifIndex       | int(11)      | YES  |     | NULL    |                |
| ifName        | varchar(255) | YES  |     | NULL    |                |
| ifAlias       | varchar(255) | YES  |     | NULL    |                |
| ifHighSpeed   | int(11)      | YES  |     | NULL    |                |
| ifMtu         | int(11)      | YES  |     | NULL    |                |
| ifPhysAddress | varchar(17)  | YES  |     | NULL    |                |
| ifAdminStatus | int(11)      | YES  |     | NULL    |                |
| ifOperStatus  | int(11)      | YES  |     | NULL    |                |
| ifLastChange  | int(11)      | YES  |     | NULL    |                |
| lastSnmpPoll  | datetime     | YES  |     | NULL    |                |
| lagIfIndex    | int(11)      | YES  |     | NULL    |                |
+---------------+--------------+------+-----+---------+----------------+
16 rows in set (0.03 sec)


+----+----------+------+-----------+--------+---------+-----------+---------------------------------------------+-------------+-------+---------------+---------------+--------------+--------------+---------------------+------------+
| id | switchid | type | name      | active | ifIndex | ifName    | ifAlias
                                    | ifHighSpeed | ifMtu | ifPhysAddress |
ifAdminStatus | ifOperStatus | ifLastChange | lastSnmpPoll        |
lagIfIndex |
+----+----------+------+-----------+--------+---------+-----------+---------------------------------------------+-------------+-------+---------------+---------------+--------------+--------------+---------------------+------------+
|  1 |        1 |    0 | me0       |      1 |      33 | me0       |
                                    |        1000 |  1514 | 50C58DA83582  |
            1 |            1 |   1378257361 | 2013-09-25 18:51:24 |
NULL |
|  2 |        1 |    0 | vme       |      1 |      35 | vme       |
                                    |        1000 |  1518 | 50C58DA83582  |
            1 |            1 |   1378257361 | 2013-09-25 18:51:24 |
NULL |
|  3 |        1 |    0 | bme0      |      1 |      37 | bme0      |
                                    |           0 |  1576 | 000BCAFE0000  |
            1 |            1 |            0 | 2013-09-25 18:51:24 |
NULL |
|  4 |        1 |    0 | vlan      |      1 |     503 | vlan      |
                                    |        1000 |  1518 | 50C58DA83581  |
            1 |            1 |            0 | 2013-09-25 18:51:24 |
NULL |
|  5 |        1 |    1 | xe-0/0/0  |      1 |     504 | xe-0/0/0  | xxxxx
xe-0/3/0                              |       10000 |  1518 | 50C58DA83583
 |             1 |            1 |   1377849038 | 2013-09-25 18:51:25 |
  NULL |
|  6 |        1 |    1 | ge-0/1/3  |      1 |     508 | ge-0/1/3  |
xxxxxxxxxxx                     |        1000 |  1514 | 50C58DA835AE  |
        1 |            2 |   1378256790 | 2013-09-25 18:51:25 |       NULL |
|  7 |        1 |    1 | xe-0/0/4  |      1 |     512 | xe-0/0/4  |
xxxxxxxxxxxx                        |       10000 |  1514 | 50C58DA83587  |
            1 |            1 |   1377849039 | 2013-09-25 18:51:25 |
NULL |
|  8 |        1 |    1 | xe-0/0/16 |      1 |     536 | xe-0/0/16 |
xxxxxxxxxxxx                      |       10000 |  1514 | 50C58DA83593  |
          1 |

*Brian Thompson*
Senior Infrastructure Engineer // Senior Second Guesser

Direct: 503.943.6779
Mobile: 503.707.9018 // Twitter: iovation
*www.iovation.com*



On Wed, Sep 25, 2013 at 2:45 AM, Barry O'Donovan <barry.odonovan at inex.ie>wrote:

>
>
> On 25/09/13 10:43, Barry O'Donovan wrote:
>
>> Note that the database now also records the ifIndex of ports (and other
>> additional info - see below)
>>
>
> Opps... quoted the wrong table. Here's switchport:
>
> MariaDB [inex]> desc switchport;
> +---------------+-------------**-+
> | Field         | Type         |
> +---------------+-------------**-+
> | id            | int(11)      |
> | switchid      | int(11)      |
> | type          | int(11)      |
> | name          | varchar(255) |
> | ifName        | varchar(255) |
> | ifAlias       | varchar(255) |
> | ifHighSpeed   | int(11)      |
> | ifMtu         | int(11)      |
> | ifPhysAddress | varchar(17)  |
> | ifAdminStatus | int(11)      |
> | ifOperStatus  | int(11)      |
> | ifLastChange  | int(11)      |
> | lastSnmpPoll  | datetime     |
> | ifIndex       | int(11)      |
> | active        | tinyint(1)   |
> | lagIfIndex    | int(11)      |
> +---------------+-------------**-+
> 16 rows in set (0.00 sec)
>
>
>  - Barry
>
>
>
> ______________________________**_________________
> INEX IXP Manager mailing list
> ixpmanager at inex.ie
> https://www.inex.ie/mailman/**listinfo/ixpmanager<https://www.inex.ie/mailman/listinfo/ixpmanager>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20130925/f2a51fbb/attachment.html>


More information about the ixpmanager mailing list