Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent if_index on hp1800-8g switch. #39

Closed
netdisco-automation opened this issue Sep 26, 2011 · 11 comments
Closed

Inconsistent if_index on hp1800-8g switch. #39

netdisco-automation opened this issue Sep 26, 2011 · 11 comments

Comments

@netdisco-automation
Copy link

I found an inconsistent interface indexing between IF-MIB and LLD-MIB on HP ProCurve switch hp1800-8g (J9029A).
In IF-MIB indexes are:
IF-MIB::ifIndex.10 = INTEGER: 10
IF-MIB::ifIndex.101 = INTEGER: 101
IF-MIB::ifIndex.102 = INTEGER: 102
IF-MIB::ifIndex.103 = INTEGER: 103
IF-MIB::ifIndex.104 = INTEGER: 104
IF-MIB::ifIndex.105 = INTEGER: 105
IF-MIB::ifIndex.106 = INTEGER: 106
IF-MIB::ifIndex.107 = INTEGER: 107
IF-MIB::ifIndex.108 = INTEGER: 108
IF-MIB::ifDescr.10 = STRING: "IP Interface"
IF-MIB::ifDescr.101 = STRING: "Port #1"
IF-MIB::ifDescr.102 = STRING: "Port #2"
IF-MIB::ifDescr.103 = STRING: "Port #3"
IF-MIB::ifDescr.104 = STRING: "Port #4"
IF-MIB::ifDescr.105 = STRING: "Port #5"
IF-MIB::ifDescr.106 = STRING: "Port #6"
IF-MIB::ifDescr.107 = STRING: "Port #7"
IF-MIB::ifDescr.108 = STRING: "Port #8"

In LLDP-MIB indexes are:
LLDP-MIB::lldpLocPortId.1 = STRING: "1"
LLDP-MIB::lldpLocPortId.2 = STRING: "2"
LLDP-MIB::lldpLocPortId.3 = STRING: "3"
LLDP-MIB::lldpLocPortId.4 = STRING: "4"
LLDP-MIB::lldpLocPortId.5 = STRING: "5"
LLDP-MIB::lldpLocPortId.6 = STRING: "6"
LLDP-MIB::lldpLocPortId.7 = STRING: "7"
LLDP-MIB::lldpLocPortId.8 = STRING: "8"
LLDP-MIB::lldpLocPortDesc.1 = STRING: Port #1
LLDP-MIB::lldpLocPortDesc.2 = STRING: Port #2
LLDP-MIB::lldpLocPortDesc.3 = STRING: Port #3
LLDP-MIB::lldpLocPortDesc.4 = STRING: Port #4
LLDP-MIB::lldpLocPortDesc.5 = STRING: Port #5
LLDP-MIB::lldpLocPortDesc.6 = STRING: Port #6
LLDP-MIB::lldpLocPortDesc.7 = STRING: Port #7
LLDP-MIB::lldpLocPortDesc.8 = STRING: Port #8

I have a patch attached which solves to problem for me.
The patch also delivers the correct os_version of the switch.

Reported by: mborgelt

Original Ticket: snmp-info/bugs/39

@netdisco-automation
Copy link
Author

Original comment by: mborgelt

@netdisco-automation
Copy link
Author

  • assigned_to: nobody --> jeroenvi

Original comment by: JeroenvIS

@netdisco-automation
Copy link
Author

To be honest, I don't think creating a separate class for this switch is the right way to go. It will fix this one issue for the specific model where you have observed this behavior, but there's a good chance that the same issue will appear on other (related) switches as well.

As far as I can see, SNMP::Info assumes that the index used for LLDP ports matches the ifIndex for the related physical interfaces. However it seems like this doesn't have to be the case; LLDP-MIB mentions lldpLocPortDesc should match ifDescr.

I think this issue should be solved somewhere else.

Original comment by: JeroenvIS

@netdisco-automation
Copy link
Author

I agree.
I have investigated this further and I think it should be better fixed in LLDP.pm (sub lldp_if).
I had a look in ieee document 802.1AB-2005.pdf which describes LLDP and LLDP-MIB in general, but I did not find a generic way to match lldpLocPort to IF-MIB. As the doc says 'lldpLocPortDesc object SHOULD have the same value of ifDescr object.' So we can`t depend on this.
I think we should check in lldp_if if the OID matches into IF-MIB and if not match it by if_descr.

So we have to look into ifDescrition if the OID match and when not we must map on locPortDesc.

Original comment by: mborgelt

@netdisco-automation
Copy link
Author

If have attached a patch for LLDP.pm to solves the problem in a more general way. I have tested it against all our LLDP capable devices and it works for me. But more testing against other devices may be a good idea.

Original comment by: mborgelt

@netdisco-automation
Copy link
Author

Original comment by: mborgelt

@netdisco-automation
Copy link
Author

FWIW extreme switches also use different index in LLDP-MIB to IF-MIB so a generic fix has uses beyond this particular HP model.

Original comment by: rkerr

@netdisco-automation
Copy link
Author

could this be related to issue 2929883 ?

https://sourceforge.net/tracker/?func=detail&aid=2929883&group\_id=70362&atid=527527

Original comment by: ollyg

@netdisco-automation
Copy link
Author

  • priority: 5 --> 7
  • assigned_to: jeroenvi --> nobody

Original comment by: ollyg

@netdisco-automation
Copy link
Author

It does appear that this is the same issue as 2929883. Implemented cross reference of lldpLocPortDesc with ifDescr with fallback to lldpRemLocalPortNum in commit 1347834

Note: Some Avaya switches lldpLocPortDesc and ifDescr do not match, but lldpRemLocalPortNum matches ifIndex so fallback will work. If we run across any switches where that is not the case may need to re-visit.

Original comment by: jeneric-placeholder

@netdisco-automation
Copy link
Author

  • status: open --> closed-fixed

Original comment by: jeneric-placeholder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant