[ixpmanager] update-l2database.pl not updating database
Brian Thompson
brian.thompson at iovation.com
Wed Sep 25 20:01:04 IST 2013
I must have misunderstood your earlier comments.
Doesn't ifname in the switchport table have to match the snmp poll of
l2database script to insert in to the macaddress table?
*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 11:44 AM, Barry O'Donovan <barry.odonovan at inex.ie>wrote:
>
>
> On 25/09/13 19:05, Brian Thompson wrote:
>
>> This definitely seems to be the issue.
>>
>
> No, this is a red herring.
>
> The switchport database contains the physical MAC address of the switch
> port - we don't use it for anything (yet, if ever).
>
> This has nothing what so ever to do with the l2database.pl script.
>
> - Barry
>
>
> 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 <http://update-l2database-**test.pl<http://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<http://update-l2database-test.pl>
>> <http://update-l2database-**test.pl <http://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 <http://www.iovation.com/>*
>>
>>
>>
>>
>> On Wed, Sep 25, 2013 at 2:45 AM, Barry O'Donovan <barry.odonovan at inex.ie
>> <mailto: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 <mailto:ixpmanager at inex.ie>
>> https://www.inex.ie/mailman/__**listinfo/ixpmanager<https://www.inex.ie/mailman/__listinfo/ixpmanager>
>> <https://www.inex.ie/mailman/**listinfo/ixpmanager<https://www.inex.ie/mailman/listinfo/ixpmanager>
>> >
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> INEX IXP Manager mailing list
>> ixpmanager at inex.ie
>> https://www.inex.ie/mailman/**listinfo/ixpmanager<https://www.inex.ie/mailman/listinfo/ixpmanager>
>>
>>
> --
>
>
> Kind regards,
> Barry O'Donovan
> INEX Operations
>
> We're IPv6 Ready. Are you? http://www.ipv6ready.ie/
>
> Mob: +353 86 801 7669
> Tel: +353 1 685 4220
> SIP: barry at opensolutions.ie
> Fax: +353 1 685 4263
>
> +-----------------------------**--+---------------------------**
> ----------+
> | Open Source Solutions Ltd. | INEX Operations Team |
> | Lynx House Old Church Road, | Internet Neutral Exchange |
> | Lower Kilmacud Road, | Association, 4027 Kingswood Road, |
> | Stillorgan, Co Dublin. | Citywest Business Campus, Dublin 24 |
> | http://www.opensolutions.ie/ | http://www.inex.ie/ |
> +-----------------------------**--+---------------------------**
> ----------+
>
>
>
> ______________________________**_________________
> 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/640dc669/attachment.html>
More information about the ixpmanager
mailing list