T.R | Title | User | Personal Name | Date | Lines |
---|
3602.1 | | YAHEY::BOSE | | Mon Aug 24 1992 11:06 | 31 |
|
RE 1)
If the SNMP AM is indeed sending out a request for the
object 1.3.6.1.2.1.4.22.1.1.9.16.129.54.129.0.129.126 for interface
9 and address 16.182.128.254 then there is something wrong somewhere.
The correct object id it should be sending in the PDU should be
1.3.6.1.2.1.4.22.1.1.9.16.182.128.254, as you must have already
figured out.
I tried out the following command from DECmcc and from the
packet dump everything looked ok.
MCC> show snmp myunix ip nettomediatable (1,16.126.16.56) all char
You can dump out the packets on the screen by setting the logical
MCC_TCPIP_AM_LOG to 60 and mail the log to me so that I may take
a look.
RE 2)
You have stumbled across a bug in the SNMP AM. The datatype
for ipNetToMediaPhysAddress was erroneously defined as a Latin1String
instead of an Octet String which causes the sort of behaviour you
are seeing. In the next two replies I will post patch files for
VMS and Ultrix which will change the definitions in the dictionary
and correct this problem. Make sure no other MCC processes are
running while updating the dictionary so that write operations can
be carried out.
Rahul.
|
3602.2 | VMS dictionary patch file. | YAHEY::BOSE | | Mon Aug 24 1992 11:07 | 22 |
| $ manage/tool/dict
USE CLASS SNMP -
SUBCLASS INTERFACE -
ATTRIBUTE ifPhysAddress
! value_data_type
SET DEFINITION CODE 1 TYPE LU COUNT 1 LENGTH 4 -
VALUE 2
USE CLASS SNMP -
SUBCLASS ATTABLE -
ATTRIBUTE atPhysAddress
! value_data_type
SET DEFINITION CODE 1 TYPE LU COUNT 1 LENGTH 4 -
VALUE 2
USE CLASS SNMP -
SUBCLASS IP -
SUBCLASS NETTOMEDIATABLE -
ATTRIBUTE ipNetToMediaPhysAddress
! value_data_type
SET DEFINITION CODE 1 TYPE LU COUNT 1 LENGTH 4 -
VALUE 2
EXIT
$ exit
|
3602.3 | Ultrix dictionary patch script | YAHEY::BOSE | | Mon Aug 24 1992 11:07 | 24 |
| #!/bin/csh -f
mcc_dap << \%
USE CLASS SNMP -
SUBCLASS INTERFACE -
ATTRIBUTE ifPhysAddress
! value_data_type
SET DEFINITION CODE 1 TYPE LU COUNT 1 LENGTH 4 -
VALUE 2
USE CLASS SNMP -
SUBCLASS ATTABLE -
ATTRIBUTE atPhysAddress
! value_data_type
SET DEFINITION CODE 1 TYPE LU COUNT 1 LENGTH 4 -
VALUE 2
USE CLASS SNMP -
SUBCLASS IP -
SUBCLASS NETTOMEDIATABLE -
ATTRIBUTE ipNetToMediaPhysAddress
! value_data_type
SET DEFINITION CODE 1 TYPE LU COUNT 1 LENGTH 4 -
VALUE 2
EXIT
\%
exit 0
|
3602.4 | More traces | COMICS::BUTT | Venturing between the viaducts. | Tue Aug 25 1992 12:06 | 43 |
| Rahul
Here's the trace requested. It all looks OK but below is what actually goes
onto the wire !!! You will see that the 16.129.54.129.0.129.126 is on the
ethernet with an object lenght of 17 bytes. Strange but true.
<< Sent SNMP message: >>
[ 16 ] (
[ 2 ] 00000000
[ 4 ] 70 75 62 6c 69 63 -- public
[ 3 ] (
[ 2 ] 00000002
[ 2 ] 00000000
[ 2 ] 00000000
[ 16 ] (
[ 16 ] (
[ 6 ] 01 00 00 00 03 00 00 00 06 00 00 00 01 00
00 00 02 00 00 00
01 00 00 00 04 00 00 00 16 00 00 00 01 00 00 00 01 00 00 00
09 00 00 00 10 00 00 00 b6 00 00 00 80 00 00 00 fe 00 00 00
[ 2 ] 00000009
)
)
)
)
**************************************************
Packet read off the wire.
EThernet tcp/UDP headers removed.
30 82 00 34 02 01 00 04 06 70 75 62 6C 69 0..4.....publi
63 A3 82 00 25 02 01 02 02 01 00 02 01 00 c�..%.........
30 1A 30 82 00 16 06 11 2B 06 01 02 01 04 0.0.....+.....
16 01 01 09 10 81 36 81 00 81 7E 02 01 09 ......6...~...
|
3602.5 | What you see on the wire is correct.
| YAHEY::BOSE | | Tue Aug 25 1992 19:01 | 56 |
|
**************************************************
Packet read off the wire.
EThernet tcp/UDP headers removed.
.........................................
..................06 11 2B 06 01 02 01 04
16 01 01 09 10 81 36 81 00 81 7E ........
The above is what you are seeing on the wire. Now, lets take
the object id you expect to see and encode it in ASN.1
Expected oid : 1.3.6.1.2.1.4.22.1.2.9.16.182.128.254
Using the BER, the first two elements in the sequence form a
sub-identifier with the value X*40 + Y where X is the value of
the first element, and Y is the value of the second element.
Thus 1.3 is encoded as 43 (2B hex).
Subsequent elements are encoded with the most significant bit
of each octet set to one if another octet follows. Thus, the
sub-identifier is represented by concatenating one or more
7-bit values together, and treating the resulting bit-string
as an unsigned number. All the elements except the last three
can be represented using 7 bits and use up only one octet.
The elements 182.128.254 however need two octets each and are
encoded as follows :
element bin. val. hex. val.
------ --------- ---------
_________________ indicates if another octet follows.
| |
182 10000001 00110110 81 36
||||||| |||||||
| |
v v
0000001 0110110 => 182
Similarly,
128 10000001 00000000 81 00
254 10000001 01111110 81 7E
Now, the tag value for object identifiers is 6, and the total
number of octets to represent this oid is 17 (11 hex).
So the ASN.1 encoding for 1.3.6.1.2.1.4.22.1.2.9.16.182.128.254
should be
06 11 2B 06 01 02 01 04 16 01 01 09 10 81 36 81 00 81 7E
which is exactly what you see on the wire.
Rahul.
|