11-12-2018 08:29 AM
I'm trying to create an snmpwalk to determine the ports in a port-channel interface. i run the oid "1.3.6.1.4.1.9.9.225.1.4.1.1.1" and get something like this:
nSNMPv2-SMI::enterprises.9.9.225.1.4.1.1.1.369098851 = Hex-STRING: 00 02 02 34 03 34 nSNMPv2-SMI::enterprises.9.9.225.1.4.1.1.1.369098901 = Hex-STRING: 00 02 02 01 03 01 nSNMPv2-SMI::enterprises.9.9.225.1.4.1.1.1.369098952 = Hex-STRING: 00 02 00 01 01 01 nSNMPv2-SMI::enterprises.9.9.225.1.4.1.1.1.369098953 = Hex-STRING: 00 02 00 05 01 05 nSNMPv2-SMI::enterprises.9.9.225.1.4.1.1.1.369098954 = Hex-STRING: 00 02 00 09 01 09
I understand the first two sets of numbers are the number of ports in the port-channel. What i want to know is how to translate the numbers afterward. Is there a python script or another oid i need to engage?
Solved! Go to Solution.
11-19-2018 01:09 AM - edited 11-19-2018 01:23 AM
I'm afraid this is quite complicated. You need some more OIDs to translate the indexes, calculate hex to decimal, do the mappings, etc...
Have a look at the OID description here:
You are correct: the first two octets indicate the number of ports bundled in the portchannel. The following octet pairs represent the list of ports belonging to the portchannel. I guess it's easier to understand by looking at an example:
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
3 Po3(SU) LACP Te1/2/12(P) Te2/3/5(P)
clagAggPortListPorts.221 = "00 02 08 8C 11 05"
cieIfDot1dBaseMappingPort.28 = 2188 (0x088C)
cieIfDot1dBaseMappingPort.97 = 4357 (0x1105)
ifName.28 = Te1/2/12
ifName.97 = Te2/3/5
ifName.221 = Po3
Depending on the channel protocol(s) you use, there may be easier ways.
Example with LACP (OID dot3adAggPortAttachedAggID):
iso.2.840.10006.300.43.1.2.1.1.13.28 = 221
iso.2.840.10006.300.43.1.2.1.1.13.97 = 221
Hope that helps
Rolf
11-19-2018 01:09 AM - edited 11-19-2018 01:23 AM
I'm afraid this is quite complicated. You need some more OIDs to translate the indexes, calculate hex to decimal, do the mappings, etc...
Have a look at the OID description here:
You are correct: the first two octets indicate the number of ports bundled in the portchannel. The following octet pairs represent the list of ports belonging to the portchannel. I guess it's easier to understand by looking at an example:
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
3 Po3(SU) LACP Te1/2/12(P) Te2/3/5(P)
clagAggPortListPorts.221 = "00 02 08 8C 11 05"
cieIfDot1dBaseMappingPort.28 = 2188 (0x088C)
cieIfDot1dBaseMappingPort.97 = 4357 (0x1105)
ifName.28 = Te1/2/12
ifName.97 = Te2/3/5
ifName.221 = Po3
Depending on the channel protocol(s) you use, there may be easier ways.
Example with LACP (OID dot3adAggPortAttachedAggID):
iso.2.840.10006.300.43.1.2.1.1.13.28 = 221
iso.2.840.10006.300.43.1.2.1.1.13.97 = 221
Hope that helps
Rolf
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide