1 laboratorio di informatica network management 10. esercizi claudio salati copyright © 2001 by...
TRANSCRIPT
1
LABORATORIO DI INFORMATICANetwork Management
10. Esercizi
Claudio Salati
Copyright © 2001 by Claudio Salati
ALMA MATER STUDIORUM - UNIVERSITA' DI BOLOGNA
FACOLTA' DI INGEGNERIA - SEDE DI CESENA
2
IPOTESI
• Ci si basa sempre su agent che soddisfano i requisiti di module-compliance delle MIB supportate
• L'insieme di MIB-schema supportato dall'agent e' descritto nelle pagine seguenti
• Viene anche riportato di seguito un sottoinsieme degli object-instance contenuti nella MIB-istanza dell'agent
• Si assume che un solo manager stia interagendo con l'agent
• All'inizio di ogni scenario si assume che l'ultimo valore di request-id utilizzato dal manager sia stato 637
• Si assume di operare nel quadro dell'infrastruttura amministrativa community-based, e che il community profile che ci riguarda definisca un access mode read-write e una MIB view coincidente con l'intera MIB dell'agent
• Si assume che il nostro manager sia registrato come destinatario di notifiche spontanee sull'agent
3
OBJECT IDENTIFIER utilizzati nelle MIBinternet = 1.3.6.1
mgmt (2)
mib-2 (1)
experimental (3)
private (4)
enterprises (1)
snmpV2 (6)
snmpModules (1)
snmpMIB (1) -- (RFC 1907)
snmpMIBObjects (1)
transmission (10)
Vedi:
• RFC 1902, SNMPv2-SMI
• RFC 1907, SNMPv2MIB
• RFC 2233, ifMIBsystem (1) -- RFC 1907
snmp (11) -- RFC 1907
interfaces (2) -- RFC 2233
ifMIB (31) -- RFC 2233
4
MIB-schema: SNMPv2-MIB, RFC 1907
mib-2 = 1.3.6.1.2.1 system (1)
sysDescr (1)
sysUpTime (3)
sysContact (4)
sysName (5)
sysLocation (6)
sysServices (7)
sysORLastChange (8)
sysObjectID (2)
sysORTable (9) sysOREntry (1)
sysORIndex (1)
sysORID (2)
sysORDescr (3)
sysORUpTime (4)
5
MIB-schema: SNMPv2-MIB, RFC 1907
mib-2 = 1.3.6.1.2.1 snmp (11)
snmpInPkts (1)
snmpInBadCommunityNames (4)
snmpInBadCommunityUses (5)
snmpInASPNarseErrs (6)
snmpEnableAuthenTraps (30)
snmpSilentDrops (31)
snmpProxyDrops (32)
snmpInBadVersions (3)
6
MIB-schema: SNMPv2-MIB, RFC 1907
snmpMIBObjects = 1.3.6.1.6.3.1.1
snmpTrap (4)
snmpTrapOID (1)
snmpTrapEnterprise (3)
snmpTraps (5)
coldStart (1)
warmStart (2)
snmpSet (6)
snmpSetSerialNo (1)
authenticationFailure (5)
7
MIB-schema: ifMIB, RFC 2233mib-2 = 1.3.6.1.2.1
ifMIB (31)
ifMIBObjects (1)
ifTableLastChange (5)
ifXTable (1) ifXEntry (1)
ifName (1)
ifLinkUpDowTrapEnable (14)
ifHighSpeed (15)
ifConnectorPresent (17)
ifAlias (18)
...
ifstackTable (2) ifStackEntry (1)
ifStackHigherLayer (1)
ifStackLowerLayer (2)
ifStackStatus (3)
8
MIB-schema: ifMIB, RFC 2233
mib-2 = 1.3.6.1.2.1
ifMIB (31)
ifMIBObjects (1)
ifStackLastChange (6)
ifRcvAddressTable (4) ifRcvAddressEntry (1)
ifRcvAddressAddress (1)
ifRcvAddressStatus (2)
ifRcvAddressType (3)
9
MIB-schema: ifMIB, RFC 2233
mib-2 = 1.3.6.1.2.1
interfaces (2)
ifNumber (1)
ifTable (2) ifEntry (1)
ifIndex (1)
ifDescr (2)
ifType (3)
ifSpeed (5)
ifPhysAddress (6)
ifAdminStatus (7)
ifOperStatus (8)
ifLastChange (9)
...
10
snmpMIBObjects = 1.3.6.1.6.3.1.1
snmpTraps (5)
linkDown (3)
linkUp (4)
MIB-schema: ifMIB, RFC 2233
11
MIB-istanza
sysDescr.0 = "INI NE for exercise purpose"
sysObjectID.0 = 1.3.6.1.4.1.1573.2
sysUpTime.0 = 1001000
sysContact.0 = ""
sysName.0 = "Cesena Dummy-1"
sysLocation.0 = "via Rasi e Spinelli"
sysSevices.0 = 72
sysORLastChange.0 = 0
sysORIndex.1 = 1 sysORIndex.2 = 2sysORID.1 = 1.3.6.1.4.1.1573.1 sysORID.2 = 1.3.6.1.4.1.1573.2.1sysORDescr.1 = "basic capability" sysORDescr.2 = "INI NE capability"sysORUpTime.1 = 0 sysORUpTime.2 = 0
snmpEnableAuthenTraps.0 = 1
snmpSetSerialNo.0 = 327
snmpInBadCommunityNames.0 = 39snmpInBadCommunityUses.0 = 73
12
Scenario 1: lettura del nome amministrativo del sistema gestito
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= get-request {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,unSpecified NULL
}}}
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,value simple string-value
"Cesena Dummy-1"}}
}
13
Scenario 2: lettura del nome amministrativo del sistema gestito
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= get-next-request {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName,unSpecified NULL
}}}
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,value simple string-value
"Cesena Dummy-1"}}
}
14
Scenario 3: lettura di piu' attributi del sistema gestito
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= get-request {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,unSpecified NULL },
{ name sysUpTime.0,unSpecified NULL },
{ name sysServices.0,unSpecified NULL },
{ name snmpSetSeriaNo.0,unSpecified NULL }}}
-- continua nella prossima pagina
15
Scenario 3: lettura di piu' attributi del sistema gestito - continua
manager agent
reqPdu
rspPdu
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,value simple string-value
"Cesena Dummy-1" },{ name sysUpTime.0,
value application-wide time-ticks-value1001000 },
{ name sysServices.0,value simple integer-value
72 },{ name snmpSetSeriaNo.0,
value simple integer-value 327 }}}
-- domanda: quali tipi di servizi di rete supporta-- "Cesena Dummy-1"?
16
Scenario 4: scrittura del nome amministrativo del sistema gestito
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= set-request {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,value simple string-value
"Cesena Dummy-2" }}}
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysName.0,value simple string-value
"Cesena Dummy-2" }}}
17
Lettura degli oggetti scalari del systemGroup1
con una singola operazione di get-bulk
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= get-bulk-request {request-id 638,non-repeaters 0,max-repetitions 8,variable-bindings {
{ name system,unSpecified NULL }}
}
18
Lettura degli oggetti scalari del systemGroup2
con una singola operazione di get-bulk
manager agent
reqPdu
rspPdu
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysDescr.0,value simple string-value
"INI NE for exercise purpose" },{ name sysObjectID.0,
value simple objectID-value 1.3.6.1.4.1.1573.2 },{ name sysUpTime.0,
value application-wide time-ticks-value 1001000 },{ name sysContact.0,
value simple string-value "" },{ name sysName.0,
value simple string-value "Cesena Dummy-1" },{ name sysLocation.0,
value simple string-value "via Rasi e Spinelli" },{ name sysServices.0,
value simple integer-value 72 },{ name sysORLastChange.0,
value application-wide time-ticks-value 0 }}}
19
Scenario 5: completare il seguente scenario 1
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= get-bulk-request {request-id 638,non-repeaters 2,max-repetitions 2,variable-bindings {
{ name sysUpTime,unSpecified NULL },
{ name sysORLastChange,unSpecified NULL },
{ name sysORID,unSpecified NULL },
{ name sysORDescr,unSpecified NULL }}
}
20
manager agent
reqPdu
rspPdu
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysUpTime.0,value application-wide time-ticks-value 1001000 },
{ name sysORLastChange.0,value application-wide time-ticks-value 0 },
{ name sysORID.1,value simple objectID-value 1.3.6.1.4.1.1573.1 },
{ name sysORDescr.1,value simple string-value "basic capability" },
{ name sysORID.2,value simple objectID-value 1.3.6.1.4.1.1573.2.1 },
{ name sysORDescr.2,value simple string-value "INI NE capability" }
}}
Scenario 5: completamento dello scenario2
21
manager agent
reqPdu
rspPdu
reqPdu PDUs ::= get-request {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name 1.3.6.1.2.1.1.8.0,unSpecified NULL },
{ name 1.3.6.1.2.1.1.10.0,unSpecified NULL },
{ name 1.3.6.1.2.1.1.9.1.2.1,unSpecified NULL },
{ name 1.3.6.1.2.1.1.9.1.2.2,unSpecified NULL },
{ name 1.3.6.1.2.1.1.9.1.2.3,unSpecified NULL }}
}
Scenario 6: completare il seguente scenario 1
22
manager agent
reqPdu
rspPdu
rspPdu PDUs ::= response {request-id 638,error-status 0,error-index 0,variable-bindings {
{ name sysORLastChange.0,value application-wide time-ticks-value 0 },
{ name 1.3.6.1.2.1.1.10.0,noSuchObject NULL },
{ name sysORID.1,value simple objectID-value 1.3.6.1.4.1.1573.1 },
{ name sysORID.2,value simple objectID-value 1.3.6.1.4.1.1573.2.1 },
{ name sysORID.3,noSuchInstance NULL }
}}
Scenario 6: completamento dello scenario2
23
manager agent
req2Pdu
Completare lo scenario (aggiungendo e descrivendo le opportune interazioni) tenendo conto che:
1 req1Pdu e' una richiesta di un manager che cita nel messaggio SNMP un community name sconosciuto all'agent;
2 req2Pdu PDUs ::= get-request {request-id ???,error-status ???,error-index ???,variable-bindings {
{ name 1.3.6.1.2.1.11.4.0,unSpecified NULL },
{ name 1.3.6.1.2.1.11.5.0,unSpecified NULL }}}
-- continua alla prossima pagina
Scenario 7: cosa sta succedendo? Completare lo scenario1
Altro manager
req4Pdu
req1Pdu
req3Pdu
24
manager agent
req2Pdu
3 req3Pdu PDUs ::= set-request {request-id ???,error-status ???,error-index ???,variable-bindings {
{ name 1.3.6.1.2.1.11.30.0,value simple integer-value 2 }}}
4 req4Pdu e' una richiesta di un manager che cita nel messaggio SNMP un community name sconosciuto all'agent.
Completare anche i PDUs req2Pdu e req3Pdu sostituendo il valore corretto dove compare ???
Nel caso in cui manchino informazioni per specificare il valore di qualche campo di PDUs, inventare dei valori ragionevoli e congruenti
Scenario 7: cosa sta succedendo? Completare lo scenario2
Altro manager
req4Pdu
req1Pdu
req3Pdu
25
manager agent
req2Pdu
trap1Pdu PDUs ::= snmpV2-trap {request-id 37,error-status 0,error-index 0,variable-bindings {
{ name sysUpTime.0,value application-wide time-ticks-value
1001010 }, { name snmpTrapOID.0,
value simple objectID-value authenticationFailure }}}
-- continua alla pagina successiva
Scenario 7: Ecco cosa sta succedendo1
Altro manager
req4Pdu
req1Pdu
req3Pdu
trap1Pdu
rsp1Pdu
rsp2Pdu
26
manager agent
req2Pdu
rsp1Pdu PDUs ::= response {request-id 638,error-status0,error-index 0,variable-bindings {
{ name snmpInBadCommunityNames.0, value application-wide counter-value 40
},{ name snmpInBadCommunityUses.0, value application-wide counter-value 73 }}}
rsp2Pdu PDUs ::= response {request-id 639,error-status0,error-index 0,variable-bindings {
{ name snmpEnableAuthenTraps.0, value simple integer-value disabled }}}
Scenario 7: Ecco cosa sta succedendo2
Altro manager
req4Pdu
req1Pdu
req3Pdu
trap1Pdu
rsp1Pdu
rsp2Pdu
27
Scenario 8: cosa ha visto succedere il manager 2h46'50" fa'?
manager agent
trapPdu PDUs ::= snmpV2-trap {request-id 37,error-status 0,error-index 0,variable-bindings {
{ name sysUpTime.0,value application-wide time-ticks-value 0 },
{ name snmpTrapOID.0,value simple objectID-value coldStart }}}
trapPdu