GERENCIAMENTO-OIDs

Download Report

Transcript GERENCIAMENTO-OIDs

GERENCIAMENTO DE
REDES
OIDs
Prof. Marcos Argachoy
OSI
Object
Identifier
Tree
Examine www.alvestrand.no/harald/objectid/top.html
Nomeação de Objetos
questão: como nomear cada possível objeto
padrão (protocolos, dados, outros..) em cada
possível padrão de rede??
resposta: ISO Object Identifier tree:
– nomeação hierarquica de todos os objetos
– cada ramificação tem um nome e um número
1.3.6.1.2.1.7.1
ISO
ISO-ident. Org.
US DoD
Internet
udpInDatagrams
UDP
MIB2
management
internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
directory OBJECT IDENTIFIER ::= { internet 1 }
mgmt OBJECT IDENTIFIER ::= { internet 2 }
experimental OBJECT IDENTIFIER ::= { internet 3 }
private OBJECT IDENTIFIER ::= { internet 4 }
MIB-II
MIB – RFC1213
-- groups in MIB-II
system
OBJECT IDENTIFIER ::= { mib-2 1 }
interfaces OBJECT IDENTIFIER ::= { mib-2 2 }
at
OBJECT IDENTIFIER ::= { mib-2 3 }
ip
OBJECT IDENTIFIER ::= { mib-2 4 }
icmp
OBJECT IDENTIFIER ::= { mib-2 5 }
tcp
OBJECT IDENTIFIER ::= { mib-2 6 }
udp
OBJECT IDENTIFIER ::= { mib-2 7 }
egp
OBJECT IDENTIFIER ::= { mib-2 8 }
-- historical
cmot
OBJECT IDENTIFIER ::= { mib-2 9 }
transmission OBJECT IDENTIFIER ::= { mib-2 10 }
snmp
OBJECT IDENTIFIER ::= { mib-2 11 }
MIBs - Exemplo
sysName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-write
STATUS mandatory
DESCRIPTION
"An administratively-assigned name for this
managed node. By convention, this is the node’s
fully-qualified domain name."
::= { system 5 }
MIBs - Nomenclatura
• Cláusula SYNTAX
INTEGER Um contador numérico de 32 bits. Pode representar, por exemplo, o
estado de uma interface de um orteador up (1), down (2) ou testing (3). O valor
zero (0) não deve ser usado de acordo com ao RFC 1155.
OCTET STRING Uma string de zero ou mais octetos geralmente usada para
representar strings de textos ou endereços físicos.
COUNTER Um contador com valor mínimo de 0 e máximo de 232 -1
(4.294.967.295). Quando um roteador é ligado ou reiniciado este valor começa
com 0, quando o valor máximo é alcançado a contagem é reiniciada com valor 0.
Pode ser usado para representar, por exemplo, octetos enviados e recebido em
uma interface.
OBJECT IDENTIFIER Uma string decimal separada por pontos que representa
um objeto gerenciado na árvore de objetos. Por exemplo, a Cisco é 1.3.6.1.4.1.9.
NULL Atualmente não utilizado pelo SNMP.
SEQUENCE Define listas que contém 0 ou mais tipos de dados ASN.1.
MIBs - Nomenclatura
• Cláusula SYNTAX
SEQUENCE OF Define um objeto gerenciado produzido de um tipo SEQUENCE
do ASN.1.
IPADDRESS Representa um endereço Ipv4 de 32 bits.
NETWORKADDRESS O mesmo do IpAddress, mas pode representar diferentes
endereços de redes.
GAUGE Um contador com valor mínimo de 0 e máximo de 232 -1
(4.294.967.295). Diferente do COUNTER ele pode incrementar ou decrementar,
mas nunca pode exceder o valor máximo. A velocidade de uma interface de um
roteador é medida pelo GAUGE.
TIMETICKS Um contador com valor mínimo de 0 e máximo de 232 -1
(4.294.967.295). Usado para medidas de tempo em centenas de segundos. O
tempo de UpTime de um roteador é medido com este valor.
OPAQUE Permite qualquer notação ASN.1 codificado como OCTET
STRING.
MIBs - Nomenclatura
• Cláusula SYNTAX SMIv2
INTEGER32 O mesmo do INTEGER.
COUNTER32 O mesmo de COUNTER;
GAUGE32 O mesmo de GAUGE.
UNSIGNED32 Representa valores decimais entre de 0 até 232 -1
(4.294.967.295).
COUNTER64 Similar ao COUNTER32, valor mínimo de 0 e máximo de
264 -1 (18.446.744.073.709.551.615). É ideal em situações onde COUNTER32
atinge seu valor máximo em um curto intervalo de tempo.
BITS Uma enumeração não negativa chamada bits.
MIBs - Nomenclatura
•
Cláusula ACCESS
– not-accessible: não permite nenhuma operação pelo
gerenciador
– accessible-for-notify: o objeto é acessível apenas através de
uma notificação
– read-only: acesso somente para leitura
– read-write: acesso de leitura e escrita
– read-create: acesso para leitura, escrita e criação de nova
instância
•
Cláusula STATUS
– Mandatory /current: objeto válido no padrão atual
– obsolete: objeto não deve ser implementado
– deprecated: objeto antigo, mas pode ser implementado para
interoperabilidade
MIBs - Exemplo
sysLocation OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-write
STATUS mandatory
DESCRIPTION
"The physical location of this node (e.g.,
‘telephone closet, 3rd floor’)."
::= { system 6 }
MIBs - Exemplo
sysUpTime OBJECT-TYPE
SYNTAX TimeTicks
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The time (in hundredths of a second) since the
network management portion of the system was last
re-initialized."
::= { system 3 }
MIBs - Exemplo
sysContact OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-write STATUS mandatory
DESCRIPTION
"The textual identification of the contact person
for this managed node, together with information
on how to contact this person."
::= { system 4 }
MIBs - Exemplo
ipAddrTable OBJECT-TYPE
SYNTAX SEQUENCE OF IpAddrEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"The table of addressing information
relevant to this entity's IP addresses."
::= { ip 20 }
MIBs - Exemplo
ifDescr OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-only
STATUS mandatory
DESCRIPTION
"A textual string containing information about the
interface. This string should include the name of
the manufacturer, the product name and the version
of the hardware interface."
::= { ifEntry 2 }
MIBs - Exemplo
ifSpeed OBJECT-TYPE
SYNTAX Gauge
ACCESS read-only
STATUS mandatory
DESCRIPTION
"An estimate of the interface's current bandwidth in bits per
second. For interfaces which do not vary in bandwidth
or for those where no accurate estimation can be made,
this object should contain the nominal bandwidth."
::= { ifEntry 5 }
MIBs - Exemplo
ifPhysAddress OBJECT-TYPE
SYNTAX PhysAddress
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The interface's address at the protocol layer
immediately `below' the network layer in the
protocol stack. For interfaces which do not have
such an address (e.g., a serial line), this object
should contain an octet string of zero length."
::= { ifEntry 6 }
MIBs - Exemplo
ifInErrors OBJECT-TYPE
SYNTAX Counter
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of inbound packets that contained
errors preventing them from being deliverable to
a higher-layer protocol."
::= { ifEntry 14 }
Exemplo de Acesso a Tabelas
Tabela de Endereços IP de uma Máquina:
ipAddrTable::= SEQUENCE of IpAddrEntry
IpAddrEntry ::= SEQUENCE {
ipAdEntAddr
IpAddress,
ipAdEntIfIndex
INTEGER,
ipAdEntNetmask
IpAddress,
ipAdEntBcastAddr
IpAddress,
ipAdEntReasmMaxSize INTEGER (0..65535)
}
ipAddrTable = 1.3.6.1.2.1.4.20
ipAddrEntry = {ipAddrTable 1}
ipAdEntBcastAddr = {ipAddrEntry 4}
Para acessar o endereço de broadcast da interface com endereço IP 128.10.2.3, usa-se
o seguinte identificador de objeto na mensagem SNMP:
1.3.6.1.2.1.4.20.1.4.128.10.2.3
SNMP - Base de Informação
– TcpConnEntry ::= SEQUENCE {
tcpConnState INTEGER,
tcpConnLocalAddress IpAddress,
tcpConnLocalPort INTEGER (0..65535),
tcpConnRemAddress IpAddress,
tcpConnRemPort INTEGER (0..65535)}
MIBs - Exemplo
tcpConnTable OBJECT-TYPE
SYNTAX SEQUENCE OF TcpConnEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION “Contém informações sobre
conexões TCP”
::= { tcp 13 }
MIBs - Exemplo
tcpConnEntry OBJECT-TYPE
SYNTAX TcpConnEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION “Contém informações sobre uma
conexão TCP”
INDEX
{tcpConnLocalAddress,
tcpConnLocalPort,
tcpConnRemAddress,
tcpConnRemPort}
::= {tcpConnTable 1}
Enterprise MIBs
• Fabricantes de equipamentos e sistemas podem
acrescentar informações de seu interesse específico
embaxio do ramo “private” da árvore de nomeação
iso (1)
org (3)
dod (6)
internet (1)
private (4)
enterprises (1)
ibm (2) acc (5) cisco (9) hp(11)
3com(43) at&t(74) .............
MIBs - Exemplo
ciscoDot11AssociationMIB MODULE-IDENTITY
LAST-UPDATED "200701050000Z"
ORGANIZATION "Cisco Systems Inc."
CONTACT-INFO
"
Cisco Systems
Customer Service
Postal: 170 West Tasman Drive,
San Jose CA 95134-1706.
USA
Tel: +1 800 553-NETS
E-mail: [email protected]"
MIBs - Exemplo
cDot11ActiveDevicesEntry OBJECT-TYPE
SYNTAX CDot11ActiveDevicesEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry represents a currently active device
associated with this device. These active devices
include: wireless clients, repeaters, and bridges."
INDEX
{ ifIndex }
::= { cDot11ActiveDevicesTable 1 }
CDot11ActiveDevicesEntry ::=
SEQUENCE {
cDot11ActiveWirelessClients Gauge32,
cDot11ActiveBridges
Gauge32,
cDot11ActiveRepeaters
Gauge32
}
MIBs - Exemplo
cDot11ActiveWirelessClients OBJECT-TYPE
SYNTAX Gauge32 (0..2007)
UNITS
"Device"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This is the number of wireless clients
currently associating with this device on this
interface."
::= { cDot11ActiveDevicesEntry 1 }
MIBs - Exemplo
assocAddress OBJECT-TYPE
SYNTAX
MacAddress
MAX-ACCESS read-only
STATUS
current
DESCRIPTION
"MAC address of a Client associated with the Access Point.
If the association is pending (that is, the Client is scanning,
authenticating or associating), assocAddress contains the
MAC address of that Client with the group bit set to indicate
that the Access Point is aware of the presence of that Client.
The other objects of the entry will be updated based on the
information extracted from the received Probe Requests."
::= { assocEntry 2 }
MIBs - Exemplo
Node definitions
-- 1.3.6.1.4.1.674
dell OBJECT IDENTIFIER ::= { enterprises 674 }
-- 1.3.6.1.4.1.674.10893
storage OBJECT IDENTIFIER ::= { dell 10893 }
-- 1.3.6.1.4.1.674.10893.1
software OBJECT IDENTIFIER ::= { storage 1 }
MIBs - Exemplo
Object identifiers--
a3Com
OBJECT IDENTIFIER ::= { enterprises 43
}switchingSystems-mib
OBJECT IDENTIFIER ::= { a3Com 29 }
switchingSystemsMibGroups
OBJECT IDENTIFIER ::= { switchingSystems-mib 4
}switchingSystemsFddiMibGroups
OBJECT IDENTIFIER ::= { switchingSystems-mib 10 }