1 laboratorio di informatica network management 5. structure of management information (smiv2) 5.1....

39
1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dell’informazione e statement correlati Claudio Salati Copyright © 2001 by Claudio Salati ALMA MATER STUDIORUM - UNIVERSITA' DI BOLOGNA FACOLTA' DI INGEGNERIA - SEDE DI CESENA

Upload: beatrice-angeli

Post on 01-May-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

1

LABORATORIO DI INFORMATICANetwork Management

5. Structure of Management Information (SMIv2)

5.1. ASN.1, rappresentazione dell’informazione e statement correlati

Claudio Salati

Copyright © 2001 by Claudio Salati

ALMA MATER STUDIORUM - UNIVERSITA' DI BOLOGNA

FACOLTA' DI INGEGNERIA - SEDE DI CESENA

Page 2: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

2

ASN.1 e Internet Management Framework

• Tipi semplici• INTEGER

[ma con range finito:(-2147483648 .. 2147483647)]

• OCTET STRING• e' introdotto il costrutto BITS che si mappa su una OCTET STRING

• OBJECT IDENTIFIER[lunghezza128, ogni intero componente nel range 0 .. 232-1]

• Tipi strutturati• SEQUENCE

[non e' possibile definire campi DEFAULT o OPTIONAL]

• SEQUENCE OF

• Tipi tag-ati esplicitamente• Solo di classe APPLICATION• Solo IMPLICIT

• Sotto-tipi

Page 3: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

3

ASN.1 e Internet Management Framework (RFC 1902) Tipi semplici

-- syntax of simple objects (consentiti da SMI)

-- simple objects are not allowed to be of a constructed type

-- tutti gli oggetti accessibili (read/write) in una MIB-istanza sono

-- di tipo ASN.1 semplice

ObjectSyntax ::= CHOICE {

simple SimpleSyntax,

-- tipi semplici di ASN.1 consentiti da SMI

application-wideApplicationSyntax

-- tipi semplici predefiniti da SMI

}

-- SEQUENCEs for conceptual tables and rows not mentioned here

-- continue in next page

Page 4: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

4

ASN.1 e Internet Management Framework (RFC 1902) Tipi semplici

SimpleSyntax ::= CHOICE {

integer-value INTEGER (-2147483648..2147483647),

string-value OCTET STRING,

objectID-value OBJECT IDENTIFIER

}

Integer32 ::= [UNIVERSAL 2] INTEGER (-2147483648..2147483647)

-- re-defines INTEGER: same tag!

-- continue in next page

Page 5: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

5

ASN.1 e Internet Management Framework (RFC 1902) Tipi semplici predefiniti dal framework di gestione (da SMI)

ApplicationSyntax ::= CHOICE {ipAddress-value IpAddress,counter-value Counter32,gauge-value Gauge32,timeticks-value TimeTicks,arbitrary-value Opaque,big-counter-value Counter64}

IpAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4))-- IP address in network byte order

Counter32 ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295)-- modulo 2**32 counter; to make sense of it the manager must -- read 2 values and compute the delta

-- continue in next page

Page 6: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

6

ASN.1 e Internet Management Framework (RFC 1902)

Gauge32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)-- a non-negative value in the range indicated; doesn't wrap-- if real value exceeds MAX, MAX is returned

Unsigned32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)-- a non-negative value that fits in 32 bits-- same tag as Gauge32!

TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)-- time indication, in hundredth of seconds since an epoch-- an object of this type must specify the epoch that is used

-- continue in next page

Page 7: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

7

ASN.1 e Internet Management Framework (RFC 1902)

Opaque ::= [APPLICATION 4] IMPLICIT OCTET STRING-- should be defined as ::= [APPLICATION 4] ANY-- for backward compatibility

Counter64 ::= [APPLICATION 6] IMPLICIT INTEGER

(0..18446744073709551615)-- similar to Counter32, to be used only when a Counter32 would-- wrap in less than 1 hour

Page 8: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

8

ASN.1 e Internet Management Framework (RFC 1902)

• Viene introdotto il costrutto BITS

• E' sintatticamente equivalente ad una BIT STRING ASN.1 in cui i bit sono esplicitamente denominati

e.g. BITS { read (0), write (1), execute (2) }

• Viene pero' mappata, a livello di transfer syntax, come una OCTET STRING

(cosi' da rientrare tra i tipi semplici ammessi da SNMP)

• Pertanto e' come una BIT STRING octet aligned

Page 9: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

9

ASN.1 e Internet Management Framework Tipi strutturati

• Il loro utilizzo e' strettamente limitato e disciplinato

• SEQUENCE e' utilizzato per definire il tipo di un oggetto riga

• Un oggetto riga e' costituito da una sequenza eterogenea di oggetti semplici

i campi della SEQUENCE devono essere di tipi ASN.1 semplici

• Ogni campo della SEQUENCE deve essere denominato con una label univoca

• Ogni label deve essere definita come un oggetto (object-type) semplice (in realta’ colonna), dello stesso tipo di quello del campo corrispondente della SEQUENCE

• Il nome (OBJECT IDENTIFIER) di ciascun oggetto semplice (cioe' del relativo OBJECT-TYPE) e' correlato al nome dell'oggetto riga (cioe' del relativo OBJECT-TYPE) di cui e' un componente

Page 10: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

10

ASN.1 e Internet Management Framework Tipi strutturati

• SEQUENCE OF e' utilizzato per definire il tipo di un oggetto tabella

• Un oggetto tabella e' costituito da una sequenza omogenea di oggetti riga:

il tipo base del tipo SEQUENCE OF di un oggetto tabella deve

• essere definito come un object-type riga, e quindi • essere definito come un tipo SEQUENCE

• Il nome (OBJECT IDENTIFIER) di ciascun oggetto riga (cioe' del relativo OBJECT-TYPE) e' correlato al nome dell'oggetto tabella (cioe' del relativo OBJECT-TYPE) di cui e' un componente

• Un oggetto tabella rappresenta evidentemente una struttura dati bi-dimensionale

Page 11: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

11

ASN.1 e Internet Management Framework Tipi strutturati: tabelle concettuali

Categoria di object-type Tipo ASN.1(conceptual) table SEQUENCE OF Row

(conceptual) row Row ::= SEQUENCE {

columnk TypeOfColumnk,

}

column: columnk TypeOfColumnk

Page 12: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

12

ASN.1 e Internet Management Framework Tipi strutturati

• SEQUENCE e SEQUENCE OF sono utilizzati anche nella definizione del PDU del protocollo SNMP

• nella definizione del PDU del protocollo SNMP vengono anche utilizzati

• Il meta-tipo CHOICE

• Tag espliciti contestuali (comunque IMPLICIT)

Page 13: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

13

ASN.1 e Internet Management Framework Sotto-Tipi

• Sono consentiti 3 metodi di sotto-tipizzazione, il cui uso e' comunque ulteriormente disciplinato (vedi RFC 2578 sez. 9 e app. A: ci sono differenze con RFC 1902)

• E' anche disciplinato dove puo' essere utilizzata la sottotipizzazione: e.g. nella clausola SYNTAX degli statement

• OBJECT-TYPE

• TEXTUAL-CONVENTION

1. Range refinement

• Applicabile a: INTEGER, Integer32, Unsigned32, Gauge32

• Limita il range dei valori ammessi dal sotto-tipo

• Esempio: INTEGER (0 .. 59)Unsigned32 (0 .. 59 | 100 .. 159)

• E’ formalmente ammessa anche la forma (0 | 2 | 4 | 6 | 8) che pero’ non e’ usata

Page 14: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

14

ASN.1 e Internet Management Framework Sotto-Tipi

2. Enumeration refinement

• Applicabile a: INTEGER, BITS

• Enumera e denomina esplicitamente i valori ammessi

• Esempio: INTEGER { ten2theZero (1),

ten2theOne (10),

ten2theTwo (100), ten2theThree

(1000) }

3. Size refinement

• Applicabile a: OCTET STRING

• Limita la lunghezza minima e massima di una stringa

• Esempio: OCTET STRING (SIZE (0..255))

OCTET STRING (SIZE (20))

OCTET STRING (SIZE (14 | 20))

Page 15: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

15

ASN.1 e Internet Management Framework Sotto-Tipi

• Altre forme di sottotipizzazione sono esprimibili solo in linguaggio naturale nelle opportune clausole (clausola DESCRIPTION) degli statement SMI e.g. (secondo RFC 2578) repertoire refinement, come• (FROM ("1", "2", "X"))

• A differenza di quanto previsto dal linguaggio e da quanto accade nei normali sistemi di programmazione ASN.1 nel Management Framework SNMP si richiede che i vincoli di sottotipizzazione siano sottoposti a controllo run-time• per quanto consentito dalla informazione trasportata dalla transfer

syntax cio' puo' essere fatto a livello di presentazione• altrimenti, nel caso di valori di sottotipi, cio' deve essere fatto a

livello di sistema di programmazione SMI (o, alternativamente, di programma utente)

• Notare che il tag del sotto-tipo e' identico al tag del tipo base(e cosi' la sua sintassi di trasferimento!)

Page 16: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

16

ASN.1 e Internet Management Framework Sotto-Tipi - TEXTUAL-CONVENTION

• Lo statement TEXTUAL-CONVENTION (RFC 1903) consente di definire

• Tipi sinonimi dei tipi semplici definiti dal framework

• Sottotipi dei tipi semplici definiti dal framework

che pero' sono dotati di caratteristiche semantiche particolari.

• Queste caratteristiche semantiche particolari sono descrivibili in linguaggio naturale in una opportuna clausola dello statement

• Una textual convention puo' quindi essere usata come un tipo semplice ASN.1

• Il management framework pre-definisce un insieme significativo di textual convention

Page 17: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

17

TEXTUAL CONVENTION (RFC 1903)

• When designing a MIB module, it is often useful to define new types similar to those defined in the SMI.

• In comparison to a type defined in the SMI, each of these new types has

• a different name, • a similar syntax, but • a more precise semantics.

• These newly defined types are termed textual conventions, and are used for the convenience of humans reading the MIB module.

In realta' la definizione semantica specifica e' ovviamente utilizzata anche dall'applicazione di gestione

• Objects defined using a textual convention are always encoded by means of the rules that define their primitive type.

• However, textual conventions often have special semantics associated with them.

Page 18: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

18

TEXTUAL-CONVENTION

TcASN.1-typeID ::= TEXTUAL-CONVENTION

[ DISPLAY-HINT ""-delimited-string ]

STATUS <status>

DESCRIPTION ""-delimited-string

[ REFERENCE ""-delimited-string ]

SYNTAX <ASN.1-type-denotation>

-- or the BITS construct

<status> current | deprecated | obsolete-- nell'ordine

<ASN.1-type-denotation> ASN.1-typeID | ASN.1-subtype-denotation

Page 19: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

19

Notazione grammaticale

-- commento, come in ASN.1

[ clausola opzionale ]

{ clausola opzionale ripetibile }

SIMBOLO-TERMINALE

simbolo-terminale

::= simbolo terminale, indica “e’ definito come”

{ } , simboli terminali: punteggiatura

<meta-simbolo> o simbolo non terminale

simbolo-terminale variabile istanza per istanza, la cui forma e’ indicata dall’identificatore del simbolo

indicatore di produzione

| alternativa nel lato destro di una produzione

Page 20: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

20

TEXTUAL-CONVENTION

• DISPLAY-HINT formato di visualizzazione di un valore della textual convention

• STATUS indicazione dello stato di utilizzabilita' della textual convention

• DESCRIPTION una descrizione in linguaggio naturale della textual convention, e in particolare della sua semantica specifica

• REFERENCEse la textual convention e' in qualche modo correlata ad un'altra textual convention, questa clausola consente di riferirla tramite una indicazione in linguaggio naturale

• SYNTAXtipo ASN.1 di cui la textual convention definisce un identificatore sinonimo (TcASN.1-typeID)

Page 21: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

21

CLAUSOLA STATUS

• presente in tutti gli statement SMI

• i valori ammissibili sono cosi' definiti (e.g. in RFC 1902)

The values "current", and "obsolete" are self-explanatory.

The "deprecated" value indicates that the definition is obsolete, but that an implementor may wish to support that object to foster interoperability with older implementations.

Page 22: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

22

CLAUSOLA DISPLAY-HINT

• non e' una stringa amorfa, ma una indicazione di formato, come il parametro format di una printf() del C

• vedi RFC 1903 per il dettaglio dei formati ammessi

• la definizione di un formato di display per un tipo di dato (per un ADT!) consente di definire un look&feel omogeneo per le diverse implementazioni di applicazioni manager:

• questo rappresenta in realta' un vantaggio fondamentale!

Case study: esistono 3 maniere "standard" di identificare i time-slot di una trama multiplata SDH (a livello LO), oltre ad altre possibili maniere peculiari:

formato k-l-m

coppia: signal rate + posizione nell'albero di contenimento

coppia: signal rate + posizione nella trama

Page 23: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

23

Predefined SNMPv2 textual conventions (RFC 1903)

TruthValue ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Represents a boolean value."

SYNTAX INTEGER { true(1), false(2) }

MacAddress ::= TEXTUAL-CONVENTION DISPLAY-HINT "1x:" STATUS current DESCRIPTION "Represents an 802 MAC address represented in the canonical order defined by IEEE 802.1a, i.e., as if it were transmitted least significant bit first. DISPLAY-HINT 1x: interpreted as: print each octet of the value as a hex number, and separate each value with a colon." SYNTAX OCTET STRING (SIZE (6))

Page 24: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

24

Predefined SNMPv2 textual conventions (RFC 1903)

PhysAddress ::= TEXTUAL-CONVENTION

DISPLAY-HINT "1x:" STATUS current DESCRIPTION

"Represents media- or physical-level addresses." SYNTAX OCTET STRING

TimeStamp ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION

"The value of the sysUpTime object at which a specific occurrence happened. The specific occurrence must be defined in the description of any object defined using this type." -- la semantica e' specifica perche' e' definita una epoch ben precisa

SYNTAX TimeTicks

Page 25: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

25

Predefined SNMPv2 textual conventions (RFC 1903)

VariablePointer ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION

"A pointer to a specific object instance. For example, sysContact.0 or ifInOctets.3."

SYNTAX OBJECT IDENTIFIER

RowPointer ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION

"Represents a pointer to a conceptual row. The value is the name of the instance of the first accessible columnar object in the conceptual row. For example, ifIndex.3 would point to the 3rd row in the ifTable (note that if ifIndex were not-accessible, then ifDescr.3 would be used instead)."

SYNTAX OBJECT IDENTIFIER

Page 26: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

26

Predefined SNMPv2 textual conventions

DateAndTime ::= TEXTUAL-CONVENTION DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" STATUS current DESCRIPTION "A date-time specification.

field octets contents range------ --------- ------------ --------1 1-2 year 0..655362 3 month 1..123 4 day 1..314 5 hour 0..235 6 minutes 0..596 7 seconds 0..60

(use 60 for leap-second)7 8 deci-seconds 0..98 9 direction from UTC '+' / '-'9 10 hours from UTC 0..11

10 11 minutes from UTC 0..59

Page 27: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

27

Predefined SNMPv2 textual conventions

-- DateAndTime continue For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as:

1992-5-26,13:30:15.0,-4:0

Note that if only local time is known, then timezone information (fields 8-10) is not present."

-- l'indicizzazione dei caratteri nella stringa parte da 0 SYNTAX OCTET STRING (SIZE (8 | 11))

Page 28: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

28

ASN.1 e Internet Management Framework Valori OBJECT IDENTIFIER - OBJECT-IDENTITY

• Lo statement OBJECT-IDENTITY (RFC 1902) consente di definire il significato di un OBJECT IDENTIFIER

• Considerando ad esempio la textual convention predefinita

(usata nella MIB Interfacce per consentire l'estensione proprietaria della gestione delle interfacce del sistema gestito)

AutonomousType ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Represents an independently extensible type identification value. It may, for example, indicate a particular sub-tree with further MIB definitions, or define a particular type of protocol or hardware." SYNTAX OBJECT IDENTIFIER

I suoi valori devono essere definiti usando lo statement OBECT-IDENTITY

Page 29: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

29

OBJECT-IDENTITY

ASN.1-valueID OBJECT-IDENTITY

STATUS <status>

DESCRIPTION ""-delimited-string

[ REFERENCE ""-delimited-string ]

::= object-identifier

<status> current | deprecated | obsolete-- nell'ordine

Page 30: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

30

OBJECT-IDENTITY

• STATUS indicazione dello stato di utilizzabilita' del valore OBJECT IDENTIFIER

• DESCRIPTION una descrizione in linguaggio naturale del significato del valore OBJECT IDENTIFIER

• REFERENCEse l’OBJECT IDENTIFIER e' in qualche modo correlato ad un altro OBJECT IDENTIFIER , questa clausola consente di riferirlo tramite una indicazione in linguaggio naturale

• ASN.1-valueIDidentificatore ASN.1 del valore OBJECT IDENTIFIER che si definisce

• object-identifiervalore OBJECT IDENTIFIER assegnato dalla definizione

Page 31: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

31

ESEMPIO D’USO DI OBJECT-IDENTITY (RFC 2268)

RFC 2268: MAUs MIB

dot3MauTypeAUI OBJECT-IDENTITY STATUS current DESCRIPTION "no internal MAU, view from AUI" ::= { dot3MauType 1 }

dot3MauType10Base2 OBJECT-IDENTITY STATUS current DESCRIPTION "thin coax MAU (per 802.3 section 10)" ::= { dot3MauType 4 }

Page 32: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

32

ESEMPIO D’USO DI OBJECT-IDENTITY (RFC 2268)

dot3MauType10BaseT OBJECT-IDENTITY STATUS current DESCRIPTION

"UTP MAU (per 802.3 section 14). Note that it is strongly recommended that agents return either dot3MauType10BaseTHD or dot3MauType10BaseTFD if the duplex mode is known. However, management applications should be prepared to receive this MAU type value from older agent implementations."

::= { dot3MauType 5 }

dot3MauType10BaseTHD OBJECT-IDENTITY STATUS current DESCRIPTION "UTP MAU (per 802.3 section 14), half duplex mode" ::= { dot3MauType 10 }

dot3MauType10BaseTFD OBJECT-IDENTITY STATUS current DESCRIPTION "UTP MAU (per 802.3 section 14), full duplex mode" ::= { dot3MauType 11 }

Page 33: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

33

ESEMPIO D’USO DI OBJECT-IDENTITY (RFC 2268)

dot3MauType1000BaseLXHD OBJECT-IDENTITY STATUS current DESCRIPTION "Fiber over long-wavelength laser (per 802.3 section 38), half duplex mode" ::= { dot3MauType 23 }

 dot3MauType1000BaseLXFD OBJECT-IDENTITY STATUS current DESCRIPTION "Fiber over long-wavelength laser (per 802.3 section 38), full duplex mode" ::= { dot3MauType 24 }

 dot3MauType1000BaseSXHD OBJECT-IDENTITY STATUS current DESCRIPTION "Fiber over short-wavelength laser (per 802.3 section 38), half duplex mode" ::= { dot3MauType 25 }

 dot3MauType1000BaseSXFD OBJECT-IDENTITY ...

Page 34: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

34

ESEMPIO D’USO DI OBJECT-IDENTITY (RFC 1902)

fizbin69 OBJECT-IDENTITY STATUS current DESCRIPTION "The authoritative identity of the Fizbin 69 chipset." ::= { fizbinChipSets 1 }

Page 35: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

35

ASN.1 e Internet Management Framework Moduli SMI/ASN.1 – MODULE-IDENTITY

• Poiche’ la SMI e’ formalmente un insieme di macro ASN.1 che riferisce definizioni di tipi e valori ASN.1, un testo SMI (e.g. una MIB) e’ costituito da un modulo ASN.1

• ASN.1 definisce una sua sintassi che consente di (ma non obbliga ad) assegnare un nome OBJECT IDENTIFIER ad un modulo:

SMI pero’ non utilizza questa sintassi

• Per assegnare un nome OBJECT IDENTIFIER ad un modulo SMI definisce uno statement esplicito: MODULE-IDENTITY

• Lo statement MODULE-IDENTITY deve comparire una e una sola volta in testa ad ogni modulo SMI

Page 36: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

36

MODULE-IDENTITY

ASN.1-valueID MODULE-IDENTITY

LAST-UPDATED ASN.1-UTCTime-value

-- non millennium compliant!

ORGANIZATION ""-delimited-string

CONTACT-INFO ""-delimited-string

DESCRIPTION ""-delimited-string

{ REVISION ASN.1-UTCTime-value

-- non millennium compliant!

DESCRIPTION ""-delimited-string }

::= object-identifier

Page 37: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

37

MODULE-IDENTITY

• LAST-UPDATED istante dell’ultima modifica effettuata al modulo come valore di tipo ASN.1 UTCTime

• ORGANIZATION organizzazione responsabile per lo sviluppo del modulo

• CONTACT-INFOnome, indirizzo postale, telefono e indirizzo e-mail della persona cui richiedere informazioni sul modulo

• DESCRIPTION descrizione sommaria del contenuto del modulo, o della modifica effettuata

• REVISION istante di effettuazione della modifica come valore di tipo ASN.1 UTCTime

• ASN.1-valueIDidentificatore ASN.1 del valore OBJECT IDENTFIER che identifica il modulo

• object-identifiervalore OBJECT IDENTIFIER che identifica il modulo

Page 38: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

38

MODULE-IDENTITY: esempio da RFC 1907, MIB for SNMPv2

snmpMIB MODULE-IDENTITYLAST-UPDATED "9511090000Z” -- non millennium compliant! ORGANIZATION "IETF SNMPv2 Working Group"CONTACT-INFO

" Marshall T. Rose Postal: Dover Beach Consulting, Inc.

420 Whisman CourtMountain View, CA 94043-2186US

Tel: +1 415 968 1052 E-mail: [email protected]"

DESCRIPTION "The MIB module for SNMPv2 entities."REVISION "9304010000Z” -- non millennium compliant! DESCRIPTION

"The initial revision of this MIB module was published as RFC1450."::= { snmpModules 1 }

Page 39: 1 LABORATORIO DI INFORMATICA Network Management 5. Structure of Management Information (SMIv2) 5.1. ASN.1, rappresentazione dellinformazione e statement

39

MODULE-IDENTITY: esempio da RFC 1573

ifMIB MODULE-IDENTITY LAST-UPDATED "9311082155Z" ORGANIZATION "IETF Interfaces MIB Working Group" CONTACT-INFO

“ Keith McCloghrie Postal: Hughes LAN Systems

1225 Charleston Road, Mountain View, CA 94043 Tel: +1 415 966 7934 E-Mail: [email protected]

 

Frank Kastenholz Postal: FTP Software

2 High Street, North Andover, MA 01845 Tel: +1 508 685 4000 E-Mail: [email protected]"

DESCRIPTION "The MIB module to describe generic objects for network interface

sub-layers. This MIB is an updated version of MIB-II's ifTable, and

incorporates the extensions defined in RFC 1229." ::= { mib-2 31 }