.


:




:

































 

 

 

 


4




ErrorStatus,

error-index -- always 0

ErrorIndex,

variable-bindings

VarBindList

}


4.3. The GetResponse-PDU

GetResponse-PDU::=

[2]

IMPLICIT SEQUENCE {

request-id

RequestID,

error-status

ErrorStatus,

error-index

ErrorIndex,

variable-bindings

VarBindList

}

 

4.4. The SetRequest-PDU

SetRequest-PDU::=

[3]

IMPLICIT SEQUENCE {

request-id

RequestID,

error-status -- always 0

ErrorStatus,

error-index -- always 0

ErrorIndex,

variable-bindings

VarBindList

}

 

4.5. The Trap-PDU

Trap-PDU::=

[4]

IMPLICIT SEQUENCE {

enterprise -- type of object generating

-- trap, see sysObjectID in [5]

OBJECT IDENTIFIER,

agent-addr -- address of object generating

NetworkAddress, -- trap

generic-trap -- generic trap type

INTEGER {

coldStart(0),

warmStart(1),

linkDown(2),

linkUp(3),

authenticationFailure(4),

egpNeighborLoss(5),

enterpriseSpecific(6)

},

 

specific-trap -- specific code, present even

INTEGER, -- if generic-trap is not

-- enterpriseSpecific

time-stamp -- time elapsed between the last

TimeTicks, -- (re)initialization of the network

-- entity and the generation of the

trap

variable-bindings -- "interesting" information

VarBindList

}

 


3.

 

SNMP, , SNMP IP.

SNMP, UDP/IP/Ethernet ( Hex ):

 

0000: 00 00 1d 90 58 2000 20 af e8 e2 8e08 0045 00

0010: 01 1a 0b 25 00 00 40 11 00 09 d4 a4 00 66 d4 a4

0020: c4 f6c0 7c00 a101 064a 5130 81 fb02 01 00

0030: 04 06 76 6d 31 35 2d 31a0 81 ed02 04 35 97 ac

0040: 55 02 01 00 02 01 00 30 81 de 30 0c 06 08 2b 06

0050: 01 02 01 01 03 00 05 00 30 0e 06 0a 2b 06 01 02

0060: 01 02 02 01 05 01 05 00 30 0e 06 0a 2b 06 01 02

0070: 01 02 02 01 08 01 05 00 30 0e 06 0a 2b 06 01 02

0080: 01 02 02 01 09 01 05 00 30 0e 06 0a 2b 06 01 02

0090: 01 02 02 01 0a 01 05 00 30 0e 06 0a 2b 06 01 02

00a0: 01 02 02 01 0b 01 05 00 30 0e 06 0a 2b 06 01 02

00b0: 01 02 02 01 0c 01 05 00 30 0e 06 0a 2b 06 01 02

00c0: 01 02 02 01 0d 01 05 00 30 0e 06 0a 2b 06 01 02

00d0: 01 02 02 01 0e 01 05 00 30 0e 06 0a 2b 06 01 02

00e0: 01 02 02 01 10 01 05 00 30 0e 06 0a 2b 06 01 02

00f0: 01 02 02 01 11 01 05 00 30 0e 06 0a 2b 06 01 02

0100: 01 02 02 01 12 01 05 00 30 0e 06 0a 2b 06 01 02

0110: 01 02 02 01 13 01 05 00 30 0e 06 0a 2b 06 01 02

0120: 01 02 02 01 14 01 05 00

 

15 SNMP-

296 ( SNMP/UDP/IP/Ethernet ):

 

296 = 14 Ethernet + 20 IP + 8 UDP + 254 SNMP

 

:

system.sysUpTime.0

interfaces.ifTable.ifEntry.ifSpeed.1

interfaces.ifTable.ifEntry.ifOperStatus.1

interfaces.ifTable.ifEntry.ifLastChange.1

interfaces.ifTable.ifEntry.ifInOctets.1

interfaces.ifTable.ifEntry.ifInUcastPkts.1

interfaces.ifTable.ifEntry.ifInNUcastPkts.1

interfaces.ifTable.ifEntry.ifInDiscards.1

interfaces.ifTable.ifEntry.ifInErrors.1

interfaces.ifTable.ifEntry.ifOutOctets.1

interfaces.ifTable.ifEntry.ifOutUcastPkts.1

interfaces.ifTable.ifEntry.ifOutNUcastPkts.1

interfaces.ifTable.ifEntry.ifOutDiscards.1

interfaces.ifTable.ifEntry.ifOutErrors.1

SNMP/UDP/IP/Ethernet.

 

3.1

???. .

n

:

1. 1

D 90 58 20 00 20 af e8 e2 8e 08 00 45 00

A 0b 25 00 00 40 11 00 09 d4 a4 00 66 d4 a4

C4 f6 c0 7c 00 a1 01 06 4a 51 30 81 fb 02 01 00

D 31 35 2d 31 a0 81 ed 02 04 35 97 ac

De 30 0c 06 08 2b 06

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

A 01 05 00 30 0e 06 0a 2b 06 01 02

00a0: 01 02 02 01 0b 01 05 00 30 0e 06 0a 2b 06 01 02

00b0: 01 02 02 01 0c 01 05 00 30 0e 06 0a 2b 06 01 02

00c0: 01 02 02 01 0d 01 05 00 30 0e 06 0a 2b 06 01 02

00d0: 01 02 02 01 0e 01 05 00 30 0e 06 0a 2b 06 01 02

00e0: 01 02 02 01 10 01 05 00 30 0e 06 0a 2b 06 01 02

00f0: 01 02 02 01 11 01 05 00 30 0e 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

0120: 01 02 02 01 14 01 05 00

2. 2

Af e8 e2 8e 00 00 1d 7c 63 f1 08 00 45 00

C bf 00 00 3e 11 70 56 d4 a4 c4 f1 d4 a4

A1 c0 7a 01 23 7b 84 30 82 01 17 02 01

D 31 a2 82 01 09 02 04 35 97

Ac 59 02 01 00 02 01 00 30 81 fa 30 0f 06 08 2b

D4 70 30 11 06 0a

B 06 01 02 01 02 02 01 05 03 42 03 00 fa 00 30

F 06 0a 2b 06 01 02 01 02 02 01 08 03 02 01 01

F 06 0a 2b 06 01 02 01 02 02 01 09 03 43 01

A 2b 06 01 02 01 02 02 01 0a 03 41

00a0: 04 04 12 5a 5d 30 11 06 0a 2b 06 01 02 01 02 02

00b0: 01 0b 03 41 03 08 6f da 30 0f 06 0a 2b 06 01 02

00c0: 01 02 02 01 0c 03 41 01 07 30 0f 06 0a 2b 06 01

00d0: 02 01 02 02 01 0d 03 41 01 00 30 0f 06 0a 2b 06

00e0: 01 02 01 02 02 01 0e 03 41 01 00 30 12 06 0a 2b

00f0: 06 01 02 01 02 02 01 10 03 41 04 13 a1 03 ca 30

A 2b 06 01 02 01 02 02 01 11 03 41 03 08

D 32 30 0f 06 0a 2b 06 01 02 01 02 02 01 12 03

F 06 0a 2b 06 01 02 01 02 02 01 13

F 06 0a 2b 06 01 02 01 02 02 01

0140: 14 03 41 01 00

1 :

system.sysUpTime.0

interfaces.ifTable.ifEntry.ifSpeed.1

interfaces.ifTable.ifEntry.ifOperStatus.1

interfaces.ifTable.ifEntry.ifLastChange.1

interfaces.ifTable.ifEntry.ifInOctets.1

interfaces.ifTable.ifEntry.ifInUcastPkts.1

interfaces.ifTable.ifEntry.ifInNUcastPkts.1

interfaces.ifTable.ifEntry.ifInDiscards.1

interfaces.ifTable.ifEntry.ifInErrors.1

interfaces.ifTable.ifEntry.ifOutOctets.1

interfaces.ifTable.ifEntry.ifOutUcastPkts.1

interfaces.ifTable.ifEntry.ifOutNUcastPkts.1

interfaces.ifTable.ifEntry.ifOutDiscards.1

interfaces.ifTable.ifEntry.ifOutErrors.1

 

2 Response :

 

system.sysUpTime.0=7591024

interfaces.ifTable.ifEntry.ifSpeed.3=64000

interfaces.ifTable.ifEntry.ifOperStatus.3=1

interfaces.ifTable.ifEntry.ifLastChange.3=0

interfaces.ifTable.ifEntry.ifInOctets.3=68311645

interfaces.ifTable.ifEntry.ifInUcastPkts.3=552922

interfaces.ifTable.ifEntry.ifInNUcastPkts.3=7

interfaces.ifTable.ifEntry.ifInDiscards.3=0

interfaces.ifTable.ifEntry.ifInErrors.3=0

interfaces.ifTable.ifEntry.ifOutOctets.3=329319370

interfaces.ifTable.ifEntry.ifOutUcastPkts.3=527666

interfaces.ifTable.ifEntry.ifOutNUcastPkts.3=0

interfaces.ifTable.ifEntry.ifOutDiscards.3=0

interfaces.ifTable.ifEntry.ifOutErrors.3=0

1. :

hex , . 118 .

.

rfc1213, rfc1700, ETHERNET VENDOR ADDRESS.doc, ETHER TYPES.doc, , .


2. :

1. -

2. MAC-

3. , Ethernet-

4.

5.

6. ( )

7.

8. (Dec )

9.

10.

11.

12.

13.

14. ( )

15.

16.

17. Community

18. PDU ( )

18.1. PDU Get-Request

18.1.1. - RequestID

18.1.2. ErrorStatus Errorlndex

18.1.3. ,

18.1.4. () *

18.2. PDU GetResponse

18.2.1. RequestID

18.2.2. ErrorStatus Errorlndex

18.2.3. ,

18.2.4. () *

18.2.5. () *

:

1. 18 , .3.3 .

2. , (*), (. 3.3)


3.2 SNMP

 

, 1 16- :

D 90 58 20 00 20 af e8 e2 8e 08 00 45 00

A 0b 25 00 00 40 11 00 09 d4 a4 00 66 d4 a4

C4 f6 c0 7c 00 a1 01 06 4a 51 30 81 fb 02 01 00

D 31 35 2d 31 a0 81 ed 02 04 35 97 ac

De 30 0c 06 08 2b 06

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

A 01 05 00 30 0e 06 0a 2b 06 01 02

00a0: 01 02 02 01 0b 01 05 00 30 0e 06 0a 2b 06 01 02

00b0: 01 02 02 01 0c 01 05 00 30 0e 06 0a 2b 06 01 02

00c0: 01 02 02 01 0d 01 05 00 30 0e 06 0a 2b 06 01 02

00d0: 01 02 02 01 0e 01 05 00 30 0e 06 0a 2b 06 01 02

00e0: 01 02 02 01 10 01 05 00 30 0e 06 0a 2b 06 01 02

00f0: 01 02 02 01 11 01 05 00 30 0e 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

E 06 0a 2b 06 01 02

0120: 01 02 02 01 14 01 05 00

 

.

3.2.1. Ethernet: 00 00 1d 90 58 2000 20 af e8 e2 8e 08 00

1. Ethernet Hex-
    1d           af e8 e2 8e    
2. Ethernet ( - 14 )
MAC-DA ( ) 6 MAC-SA ( ) 6 Length/ Type (Protocol) 2
3. Ethernet
Vendor 3 Serial Number 3 Vendor 3 Serial Number 3 dod IP 2

3 MAC- (), . RFC-1700 (. RFC-1700, ethernet vendor address components, 4 ). :

00 00 1d Cabletron

00 20 af 3COM

3 MAC- , , .

 

Ethernet, Ethernet- ( IEEE 802.3), ( Ethernet II).

2.1 . . RFC-1700 ( ether types, 5).

2.1 - Ethernet II (. RFC-1700)

Hex
0 1500 00 00 05 DC IEEE 802.3
  08 00 Internet (IPv4)
  08 01 X.75 Internet
  08 05 X.25 3
  08 06 (ARP)
  80 35 ARP (RARP)
  81 37-81 38 NetWare IPX/SPX
  81 4C SNMP over Ethernet (. RFC-1089)

 

:

 

08 00 , Ethernet- IP- ( Internet- 4 (IPv4)).

3.2.2. IP ( IP-)

IPv4 (5 32 ):

                                                               
IP- (HLength) ToS   IP- (), IP UDP
(TTL) ,
IP- Source ()
IP- Destination ()

 


IP 1:

45 00

0010: 01 1a 0b 25 00 00 40 11 00 09 d4 a4 00 66 d4 a4

0020: c4 f6

 

IP-:

 

                                                               
IP- (HLength) ToS   IP- (), IP UDP
      01 1hex=282Dec ()
                Prio D T R C x                                
                                                               
 
0b 25   00 00
                                                               
 
(TTL) ,
40hex (64Dec) 11hex (17Dec - UDP) 00 09
 
IP- Source ()
d4hex 212Dec a4hex 164Dec 00hex 00Dec 66hex 102Dec
IP- Destination ()
d4hex 212Dec a4hex 164Dec c4hex 196Dec f6hex 246Dec
                                                                 

 

, IP- 282 , SNMP-, IP 212.164.00.102 IP 212.164.196.246, IP- TTL=64, 64 .

, (0), SNMP- UDP ( 11hex 17dec).

 

16- 1.

 

, , .


3.2.3. UDP ( UDP-)

 

() UDP-: c0 7c00 a101 064a 51

UDP:

                                                               
( ) ()
UDP-

 

UDP- RFC-1700.

0 255 .

161 SNMP. SNMP- Trap, 162. .

255-1023 , - , RFC-1700.

 

4096 65536, , .

(UDP-) UDP-, UDP.

UDP , UDP- .

 

UDP-:

 

                                                               
1- 32- UDP-
( ) ()
c0 7c (49351Dec) 00 a1 (161Dec - SNMP)
2- 32- UDP-
UDP-
01 06 (262Dec ) 4a 51

 

, UDP-, SNMP-, 262 161. 49351.

 


, Ethernet/IP/UDP (.. 14 ):

1. -

2. MAC-

3. , Ethernet-

4.

5.

6. ( )

7.

8. (Dec )

9.

10.

11.

12.

13.

14. ( )

 

PDU Get-Request PDU Get-Response
  Hex Dec Hex Dec
  00 00 1d   00 20 af Cabletron 3COM      
  00 00 1d 90 58 20   00 20 af e8 e2 8e MAC-     MAC-    
  08 00 IPv4    
    4-    
    000    
  01 1a 282    
    TTL=64    
    17 UDP    
  d4 a4 00 66 212.164.00.102    
  d4 a4 c4 f6 212.164.196.246    
  c0 7c 49351 - DP    
  00 a1 161 - SNMP    
  00 a1 161 - SNMP    
  01 06 262    
       




:


: 2016-12-05; !; : 583 |


:

:

, , .
==> ...

1841 - | 1489 -


© 2015-2024 lektsii.org - -

: 0.111 .