[unisog] SNMP question : The data type returned by querying a CISCOswitch for MacAddress.

Karyn Williams karyn at calarts.edu
Mon Oct 24 22:04:09 GMT 2005

At 09:22 PM 10/22/05 +0800, you wrote: 

>Can anyone tell me which data type is returned when querying a CISCO
switch for the MacAddress of the system connected to it?

>The OID is . And use getnext query type. I use
below command to get result in C#. 
>Result = SnmpInterface.SnmpGetVb(vbl, 1, ref rgetOid, ref rgetValue); 

>Here rgetOid is a point to structure  
>public struct smiOID 
>                { 
>                        public int len; // object identifier length in bytes 
>                        public int ptr; // object identifier address 
>                } 
>and rgetValue is a point to structure 
>public struct smiVALUEOCTET 
>                { 
>                        // Also BITS, OPAQUE, IPADDR & NSAPADDR 
>                        public int syntax;// syntax type 
>                        public smiOCTET octetv;// value of type 
>                }
>                // Also: BITS, IPADDR, OPAQUE & NSAPADDR 
>                public struct smiOCTET 
>                { 
>                        public int len; // octet value length in bytes 
>                       public int ptr; // octet value address 
>                } 
>Please help me to get the MacAddress by this. Thanks for your attension. 

Here is what Cisco says it is:
Object Information

Specific Object Information 	
Object 	dot1dTpFdbPort
Permission 	read-only
Status 	mandatory

MIB 	BRIDGE-MIB ;   -   View Supporting Images

Description 	Either the value '0', or the port number of the
port on which a frame having a source address
equal to the value of the corresponding instance
of dot1dTpFdbAddress has been seen. A value of
'0' indicates that the port number has not been
learned but that the bridge does have some
forwarding/filtering information about this
address (e.g. in the dot1dStaticTable).
Implementors are encouraged to assign the port
value to this object whenever it is learned even
for addresses for which the corresponding value of
dot1dTpFdbStatus is not learned(3).


Karyn Williams
Network Services Manager
California Institute of the Arts
karyn at calarts.edu

More information about the unisog mailing list