Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

tcl and aggregated ports

When I do an SNMP poll of some ports on a switch, I get these results:

(tcl)#snmp_getbulk public 0 9 dot3adAggPortActorOperState.10100

{<obj oid='dot3adAggPortActorOperState.10101' val=''/>}

{<obj oid='dot3adAggPortActorOperState.10102' val='<'/>}

{<obj oid='dot3adAggPortActorOperState.10103' val=''/>}

{<obj oid='dot3adAggPortActorOperState.10104' val='<'/>}

{<obj oid='dot3adAggPortActorOperState.10105' val=''/>}

{<obj oid='dot3adAggPortActorOperState.10106' val='<'/>}

{<obj oid='dot3adAggPortActorOperState.10107' val=''/>}

{<obj oid='dot3adAggPortActorOperState.10108' val='<'/>}

{<obj oid='dot3adAggPortActorOperState.10109' val=''/>}

When I do it externally i get different values:

.1.2.840.10006.300.43.1.2.1.1.20.10101 = ""

.1.2.840.10006.300.43.1.2.1.1.20.10102 = Hex-STRING: BC

.1.2.840.10006.300.43.1.2.1.1.20.10103 = ""

.1.2.840.10006.300.43.1.2.1.1.20.10104 = Hex-STRING: BC

.1.2.840.10006.300.43.1.2.1.1.20.10105 = ""

.1.2.840.10006.300.43.1.2.1.1.20.10106 = Hex-STRING: BC

.1.2.840.10006.300.43.1.2.1.1.20.10107 = ""

.1.2.840.10006.300.43.1.2.1.1.20.10108 = Hex-STRING: BC

.1.2.840.10006.300.43.1.2.1.1.20.10109 = ""

Any ideas why?

Some of the switches I want to do this on don't have eem support which is why I want to do this in TCL.

1 REPLY
New Member

tcl and aggregated ports

So I figured this out and it seems so obvious now.

For whatever reason Cisco is dumping the hex-STRING and instead puts a binary value in it's place. You cannot use string operators to match on the binary values. So all of the things I was trying to do with what I assumed to be a string was failing miserably. I have to convert from binary value of '<' to hex using binary scan. Now I can do all the string matches I want on the new variable created by binary scan.

Hope this helps someone in the future.

355
Views
0
Helpful
1
Replies
CreatePlease login to create content