<div dir="ltr">No I was trying to give as much detail as possible.<div><br></div><div>Simply stated, update-l2database is not populating macaddress table.</div><div><br></div><div>As you pointed out this is because ge-0/0/0 <> ge-0/0/0.0</div>
<div><br></div><div><br style="font-family:arial,sans-serif;font-size:13.333333969116211px"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">[1] </span><a href="http://git.io/dmWA6g" target="_blank" style="font-family:arial,sans-serif;font-size:13.333333969116211px">http://git.io/dmWA6g</a> updates switchports table to ge-0/0/0<br style="font-family:arial,sans-serif;font-size:13.333333969116211px">
<span style="font-family:arial,sans-serif;font-size:13.333333969116211px">[2] </span><a href="http://git.io/7ZPmUw" target="_blank" style="font-family:arial,sans-serif;font-size:13.333333969116211px">http://git.io/7ZPmUw</a> updates macaddress table discovers macaddresses at ge0/0/0.0</div>
<div><br></div><div><br><br style="font-family:arial,sans-serif;font-size:13.333333969116211px"></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 12:12 PM, 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 20:01, Brian Thompson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Doesn't ifname in the switchport table have to match the snmp poll of<br>
l2database script to insert in to the macaddress table?<br>
</blockquote>
<br></div>
I think Nick is keying off the 'name' field in switchport (which is ifDescription), but yes, in general the above is right.<br>
<br>
But, unless I misunderstood your email, you were throwing switchport.ifPhysAddress into the mix which is the red herring I referred to - ifPhysAddress has nothing to do with anything.<br>
<br>
- Barry<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
<br>
*Brian Thompson*<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>
*<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>>*<br>
<br>
<br>
<br></div><div class="im">
On Wed, Sep 25, 2013 at 11:44 AM, Barry O'Donovan<br></div><div class="im">
<<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a> <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 19:05, Brian Thompson wrote:<br>
<br>
This definitely seems to be the issue.<br>
<br>
<br>
No, this is a red herring.<br>
<br>
The switchport database contains the physical MAC address of the<br>
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><br></div>
<<a href="http://l2database.pl" target="_blank">http://l2database.pl</a>> script.<div class="im"><br>
<br>
- Barry<br>
<br>
<br>
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<br>
name) and<br>
The bin/<a href="http://update-l2database-test.pl" target="_blank">update-l2database-test.pl</a><br>
<<a href="http://update-l2database-test.pl" target="_blank">http://update-l2database-<u></u>test.pl</a>><br></div>
<<a href="http://update-l2database-__test.pl" target="_blank">http://update-l2database-__<u></u>test.pl</a><div class="im"><br>
<<a href="http://update-l2database-test.pl" target="_blank">http://update-l2database-<u></u>test.pl</a>>><br>
<br>
--debug --vlan 998 script is showing the macaddresses on the layer 3<br>
interfaces.<br>
<br></div>
root@portal:~# perl /usr/local/bin/<a href="http://update-__l2database-test.pl" target="_blank">update-__<u></u>l2database-test.pl</a><br>
<<a href="http://update-l2database-test.pl" target="_blank">http://update-l2database-<u></u>test.pl</a>><br>
<<a href="http://update-l2database-__test.pl" target="_blank">http://update-l2database-__<u></u>test.pl</a><div class="im"><br>
<<a href="http://update-l2database-test.pl" target="_blank">http://update-l2database-<u></u>test.pl</a>>> --debug --vlan 998<br>
<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></div>
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)<div><div class="h5"><br>
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' =><br>
'xe-0/0/26',<br>
'spifname' =><br>
'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' =><br>
'ge-0/0/25',<br>
'spifname' =><br>
'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' =><br>
'xe-0/0/0',<br>
'spifname' => 'xe-0/0/0',<br>
'id' => '2'<br>
},<br>
<br>
<br>
mysql> desc switchport;<br></div></div>
+---------------+-------------<u></u>__-+------+-----+---------+---<u></u>--__-----------+<div class="im"><br>
| Field | Type | Null | Key | Default | Extra<br>
|<br></div>
+---------------+-------------<u></u>__-+------+-----+---------+---<u></u>--__-----------+<div class="im"><br>
| id | int(11) | NO | PRI | NULL |<br>
auto_increment |<br>
| switchid | int(11) | YES | MUL | NULL |<br>
|<br>
| type | int(11) | YES | | NULL |<br>
|<br>
| name | varchar(255) | YES | | NULL |<br>
|<br>
| active | tinyint(1) | NO | | NULL |<br>
|<br>
| ifIndex | int(11) | YES | | NULL |<br>
|<br>
| ifName | varchar(255) | YES | | NULL |<br>
|<br>
| ifAlias | varchar(255) | YES | | NULL |<br>
|<br>
| ifHighSpeed | int(11) | YES | | NULL |<br>
|<br>
| ifMtu | int(11) | YES | | NULL |<br>
|<br>
| ifPhysAddress | varchar(17) | YES | | NULL |<br>
|<br>
| ifAdminStatus | int(11) | YES | | NULL |<br>
|<br>
| ifOperStatus | int(11) | YES | | NULL |<br>
|<br>
| ifLastChange | int(11) | YES | | NULL |<br>
|<br>
| lastSnmpPoll | datetime | YES | | NULL |<br>
|<br>
| lagIfIndex | int(11) | YES | | NULL |<br>
|<br></div>
+---------------+-------------<u></u>__-+------+-----+---------+---<u></u>--__-----------+<div class="im"><br>
16 rows in set (0.03 sec)<br>
<br>
<br></div>
+----+----------+------+------<u></u>__-----+--------+---------+---<u></u>--__------+-------------------<u></u>----__----------------------+-<u></u>------__------+-------+-------<u></u>--------__+---------------+---<u></u>----------__-+--------------+-<u></u>------------__--------+-------<u></u>-----+<div class="im">
<br>
| id | switchid | type | name | active | ifIndex | ifName |<br>
ifAlias | ifHighSpeed | ifMtu |<br>
ifPhysAddress | ifAdminStatus | ifOperStatus | ifLastChange |<br>
lastSnmpPoll | lagIfIndex |<br></div>
+----+----------+------+------<u></u>__-----+--------+---------+---<u></u>--__------+-------------------<u></u>----__----------------------+-<u></u>------__------+-------+-------<u></u>--------__+---------------+---<u></u>----------__-+--------------+-<u></u>------------__--------+-------<u></u>-----+<div>
<div class="h5"><br>
| 1 | 1 | 0 | me0 | 1 | 33 | me0 |<br>
| 1000 | 1514 |<br>
50C58DA83582 | 1 | 1 | 1378257361 |<br>
2013-09-25<br>
18:51:24 | NULL |<br>
| 2 | 1 | 0 | vme | 1 | 35 | vme |<br>
| 1000 | 1518 |<br>
50C58DA83582 | 1 | 1 | 1378257361 |<br>
2013-09-25<br>
18:51:24 | NULL |<br>
| 3 | 1 | 0 | bme0 | 1 | 37 | bme0 |<br>
| 0 | 1576 |<br>
000BCAFE0000 | 1 | 1 | 0 |<br>
2013-09-25<br>
18:51:24 | NULL |<br>
| 4 | 1 | 0 | vlan | 1 | 503 | vlan |<br>
| 1000 | 1518 |<br>
50C58DA83581 | 1 | 1 | 0 |<br>
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 |<br>
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 |<br>
50C58DA835AE |<br>
1 | 2 | 1378256790 | 2013-09-25<br>
18:51:25 |<br>
NULL |<br>
| 7 | 1 | 1 | xe-0/0/4 | 1 | 512 | xe-0/0/4 |<br>
xxxxxxxxxxxx | 10000 | 1514 |<br>
50C58DA83587<br>
| 1 | 1 | 1377849039 | 2013-09-25<br>
18:51:25 |<br>
NULL |<br>
| 8 | 1 | 1 | xe-0/0/16 | 1 | 536 | xe-0/0/16 |<br>
xxxxxxxxxxxx | 10000 | 1514 |<br>
50C58DA83593<br>
| 1 |<br>
<br>
*Brian Thompson*<br>
<br>
Senior Infrastructure Engineer // Senior Second Guesser<br>
<br></div></div>
Direct: <a href="tel:503.943.6779" value="+15039436779" target="_blank">503.943.6779</a> <tel:<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> <tel:<a href="tel:503.707.9018" value="+15037079018" target="_blank">503.707.9018</a>> // Twitter: iovation<div class="im">
<br>
*<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>><br>
<<a href="http://www.iovation.com/" target="_blank">http://www.iovation.com/</a>>*<br>
<br>
<br>
<br>
<br>
On Wed, Sep 25, 2013 at 2:45 AM, Barry O'Donovan<br>
<<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a> <mailto:<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a><u></u>><br></div>
<mailto:<a href="mailto:barry.odonovan@inex.ie" target="_blank">barry.odonovan@inex.ie</a><div class="im"><br>
<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<br>
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>
<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>
<br>
16 rows in set (0.00 sec)<br>
<br>
<br>
- Barry<br>
<br>
<br>
<br></div>
______________________________<u></u>_____________________<div class="im"><br>
<br>
INEX IXP Manager mailing list<br>
<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></div>
<mailto:<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>><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>
<br>
______________________________<u></u>___________________<br>
INEX IXP Manager mailing list<br>
<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>><br>
<br>
<br></div><div class="im">
--<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></div>
Mob: <a href="tel:%2B353%2086%20801%207669" value="+353868017669" target="_blank">+353 86 801 7669</a> <tel:%2B353%2086%20801%207669><br>
Tel: <a href="tel:%2B353%201%20685%204220" value="+35316854220" target="_blank">+353 1 685 4220</a> <tel:%2B353%20%201%20685%<u></u>204220><br>
SIP: <a href="mailto:barry@opensolutions.ie" target="_blank">barry@opensolutions.ie</a> <mailto:<a href="mailto:barry@opensolutions.ie" target="_blank">barry@opensolutions.ie</a><u></u>><br>
Fax: <a href="tel:%2B353%201%20685%204263" value="+35316854263" target="_blank">+353 1 685 4263</a> <tel:%2B353%20%201%20685%<u></u>204263><br>
<br>
+-----------------------------<u></u>__--+-------------------------<u></u>--__----------+<div class="im"><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></div>
+-----------------------------<u></u>__--+-------------------------<u></u>--__----------+<div><div class="h5"><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> <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>><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></div></blockquote><div class="HOEnZb"><div class="h5">
<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>----------+<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>