Date post: | 19-Dec-2015 |
Category: |
Documents |
View: | 229 times |
Download: | 3 times |
Chapter 7 Management Information Base (MIB) 1
Chapter 7 Overview Structure of management info
(SMI) Definition of mib-2 objects Use of MIB browser MIB compiler MIB editor
Chapter 7 Management Information Base (MIB) 2
Intro In Chapter 6, we looked at SMI tree
o Here, interested in mib-2 branch On mib-2 branch
o There is an almost endless number of things that could be monitored
o But don’t want performance to suffero Therefore, mib-2 is limited
Chapter 7 Management Information Base (MIB) 3
SMI We’re interested in
nodes under iso (1) Internet is under DoD
(DoD funded ARPA) Internet node now
administered by IAB All mib-2 objects underiso.org.dod.internet.mgmt.mi
b-2,or, equivalently, 1.3.6.1.2.1
mib-2 (1)
system (1)
sysDescr (1)
directory (1) mgmt (2) experimental (3) private (4)
internet (1)
(1) (2) (3) (4) (5) dod (6)
standard(0)
registration-authority
(1)
member-body(2)
joint-iso-ccitt (2)
root
ccitt (0) iso (1)
identified-organization
(3)
enterprises (1)
sysName (5)
ip (4)
Chapter 7 Management Information Base (MIB) 4
iso (1) standard (0) has a node for each
approved “international standard” registration-authority (1) is reserved for
OSI registration authorities member-body (2) has node for each
country in ISO/IEC identified-organization (3) has node for
“any organization that can justify it”o Currently only NIST and DoD
Chapter 7 Management Information Base (MIB) 5
dod (6) Under dod (6), there is only internet (1) Under internet (1)
o directory (1) for DoD serviceso management (2) for nodes defined in RFCs
(administered by IANA)o experimental (3) administered by IANAo private (4), enterprise (1) for proprietary
MIBs
Chapter 7 Management Information Base (MIB) 6
management (2) mib-2 (1) contains MIB II objects mib-2 is the focus of this chapter MIB objects specified with subset of
ASN.1o Subset used is minimum requiredo Consistent with SNMP approach (keep it
simple) More details on ASN.1 in Appendix B
o Lots of other sources of info availableo ASN.1 is like a programming language
Chapter 7 Management Information Base (MIB) 7
MIB Objects Object-Type Macro
o Written in ASN.1 Acts as a template for
constructing MIB objects Each line is a clause Almost all mib-2 objects
created from these clauseso Exceptions are…o …ReferPart and DefValPart
OBJECT-TYPE MACRO:: =BEGINTYPE NOTATION :: = "SYNTAX" type ( TYPE ObjectSyntax )
"ACCESS" Access "STATUS" Status
DescrPartReferPartIndexPartDefValPartDisplayString
VA LUE NOTATION :: = value (VA LUE ObjectName )
Access :: = "read-only"| "read-write"| "write-only"| "not-accessible
Status :: = "mandatory"| "optional"| "obsolete"
DescrPart : : = "DESCRIPTION" value (description DisplayString | empty )
ReferPart : : = "REFERENCE" value ( reference DisplayString | empty )
IndexPart : : = "INDEX" "{" IndexTypes "}"
IndexTypes : : = IndexType | IndexTypes "," IndexType
IndexType : : = value ( indexobject ObjectName ) | type ( IndexType )
DefValPart : : = "DEFVAL" "{" value (defvalue ObjectSyntax ) "}" | empty
DisplayString : : = OCTET STRING SIZE (0..255)END
Chapter 7 Management Information Base (MIB) 8
sysDescr Object
sysDescr includeso SYNTAXo ACCESSo STATUSo DESCRIPTIONo value
OBJECT-TYPE MACRO:: =BEGINTYPE NOTATION :: = "SYNTAX" type ( TYPE ObjectSyntax )
"ACCESS" Access "STATUS" Status
DescrPartReferPartIndexPartDefValPartDisplayString
VA LUE NOTATION :: = value (VA LUE ObjectName )
Access :: = "read-only"| "read-write"| "write-only"| "not-accessible
Status :: = "mandatory"| "optional"| "obsolete"
DescrPart : : = "DESCRIPTION" value (description DisplayString | empty )
ReferPart : : = "REFERENCE" value ( reference DisplayString | empty )
IndexPart : : = "INDEX" "{" IndexTypes "}"
IndexTypes : : = IndexType | IndexTypes "," IndexType
IndexType : : = value ( indexobject ObjectName ) | type ( IndexType )
DefValPart : : = "DEFVAL" "{" value (defvalue ObjectSyntax ) "}" | empty
DisplayString : : = OCTET STRING SIZE (0..255)END
Chapter 7 Management Information Base (MIB) 9
sysDescr Object
Anything following “” is a comment
system 1 is node 1 under “system” in SMI tree
system is ato 1.3.6.1.2.1.1
So, system 1 is ato 1.3.6.1.2.1.1.1
sysDescr OBJECT-TYPE --the object has the ObjectName sysDescr and is of type--OBJECT-TYPE, i.e. its type is defined by the OBJECT---TYPE MACRO. All mib-2 objects are of--OBJECT-TYPE. As opposed to the C language, the type--of objects is put after the object name.
SYNTAX DisplayString(SIZE (0..255) --the MACRO says that this type is ObjectSyntax.
--ObjectSyntax type is defined in RFC 1155 as a CHOICE--between a number of types. One of these types is--DisplayString (see Appendix B)
ACCESS read-only --read-only is one of the options provided by the Access--production. Productions are supporting assignments--which complete ("resolve" is the formal word) type and--value definitions in the assignment list by using more--detailed assignments.
STATUS mandatory --this is one of the options provided by the Status--production
DESCRIPTION "A textural description of the entity. This value should include the full name and version identification of the
system's hardware type, software operating system and networking software. Description should only contain printable ASCII characters."
value {system 1} --the MACRO definition says that VA LUE is ObjectName--type. ObjectName is defined in RFC 1155 to be OBJECT--IDENTIFIER type which has the value {system 1}for--this object as seen in Figure 7-1
Chapter 7 Management Information Base (MIB) 10
sysName What info does
sysName provide?o Node’s domain
name Where does
sysName live in SMI tree?
Recall, system is ato 1.3.6.1.2.1.1
So system 5 is ato 1.3.6.1.2.1.1.5
sysName OBJECT-TYPE -- the object has the name sysName and is of type-- OBJECT-TYPE, i.e. the MACRO name.
SYNTAX DisplayString(SIZE (0..255) --the MACRO says that this type is ObjectSyntax. This
--ObjectSyntax type is defined in RFC 1155 as a CHOICE--between a number of types. One of these is DisplayString--See Appendix B
ACCESS read-write -- this is one of the options provided by the Access-- production.
STATUS mandatory -- this is one of the options provided by the Status-- production
DESCRIPTION "An administratively-assigned name for this managednode. By convention, this is the node's fully qualifieddomain name."
value {system 5} -- the MACRO says that value is ObjectName type--ObjectName is defined in RFC 1155 to be OBJECT--IDENTIFIER which is {system 5} for this object as seen-- in Figure 7-1
Chapter 7 Management Information Base (MIB) 11
ipAddrTable Let’s consider a more complex
object definition Consider ipAddrTable
o 4 columnso 1 row for each interface
ipAddrTable {mib-2.4.20}ipAdEntAddr
{mib-2.4.20.1.1}
ipAdEntIndex
{mib-2.4.20.1.2}
ipAdEntNetMask
{mib-2.4.20.1.3}
IpAdEntBcastAddr
{mib-2.4.20.1.4}
IpAdEntReasmMaxSize{mib-2.4.20.1.5}
1234
Chapter 7 Management Information Base (MIB) 12
ipAddrTable
Each entry (row) in table has object identifier ipAddrEntry, mib-2.4.20.1o E.g., object identifier of object in column
ipAdEntNetMask is mib-2.4.20.1.3 Index object is ipAdEntAddr (from 1 to
N)o ipAdEntBcastAddr for interface 2 is at
mib-2.4.20.1.4.2o ipAdEntNetMask for interface 4 is at
mib-2.4.20.1.3.4
ipAddrTable {mib-2.4.20}ipAdEntAddr
{mib-2.4.20.1.1}
ipAdEntIndex
{mib-2.4.20.1.2}
ipAdEntNetMask
{mib-2.4.20.1.3}
IpAdEntBcastAddr
{mib-2.4.20.1.4}
IpAdEntReasmMaxSize{mib-2.4.20.1.5}
1234
Chapter 7 Management Information Base (MIB) 13
ipAddrTable
Uses template on previous slide
ipAddrTable OBJECT-TYPE
SYNTAX SEQUENCE OF ipAddrEntry --a SEQUENCE OF is a constructed ASN.1--type which is a list of objects of the same--type. In the case of a table, it means a list--of the rows in the table. ipAddrEntry is--another object defined in Figure 7-6.
ACCESS not-accessible --rows are not accessible. Only objects in a--row are accessible
STATUS mandatory --must be included in the object
DESCRIPTION --"The table of addressing information-- relevant to this entry's IP addresses"
value {ip 20 } -- ip is the object under mib-2 that contains--the object ipAddrTable which has the--OBJECT IDENTIFIER {ip 20}
Chapter 7 Management Information Base (MIB) 14
ipAddrEntry Use
ipAddrTable Note
o Sequence element is a row
o Value is ipAddrTable 1, i.e., mib-2.4.20.1
ipAddrEntry OBJECT-TYPE --this MACRO defines the object--ipAddrEntry. It is the name of any--row in the table
SYNTAX ipAddrEntry --ipAddrEntry is of type SEQUENCE as--defined below in the next panel
ACCESS not accessible -- previously defined
STATUS mandatory -- previously defined
DESCRIPTION --Information relative to one of the--IP Addresses in the table. This information--includes the IP Address itself.
INDEX {ipAdEntAddr} --referring to the template in Figure 7-2,--IndexTypes resolves to ipAdEntAddr. In other--words, there is only one index type in this case.--As we see in the next panel, this Index Type is of--type ipaddress that is defined elsewhere to be--OCTET STRING of SIZE 4. Here we see an--example of nesting type-definitions which occur--frequently in MIB object definitions. Thus in this--case, only ipAdEntAddr is used to determine the--desired row.
value {ipAddrTable 1} --ipAddrTable 1 is the Object Identifier of all rows--in the table
ipAddrEntry : : = SEQUENCE { --a SEQUENCE is a list of objects that may be of--different types In this example, the SEQUENCE--corresponds to the following objects in one row--of the table
ipAdEntAddr ipAddress --ObjectName and typeipAdEntIfIndex INTEGER --ObjectName and typeipAdEntNetMask ipAddress --ObjectName and typeipAdEntBcastAddr INTEGER --ObjectName and typeipAdEntReasmMaxSize --ObjectName and type
INTEGER ( 0 .. 65535 )}
Chapter 7 Management Information Base (MIB) 15
NMS Presentation of iso
Meterware view of iso branch
SNMP can only access leaf node
Note that IP address of WS1 is 192.192.192.223
Chapter 7 Management Information Base (MIB) 16
NMS Presentation of mib-2 Meterware view
of mib-2 Note 10 original
groups o system thru snmp
13 extensionso rmon, etc.
Chapter 7 Management Information Base (MIB) 17
NMS View of ipAddrTable Meterware view
of ipAdderTable
Chapter 7 Management Information Base (MIB) 18
NMS View of ipAddrTable Meterware view
of value in ipAdderTable
Note that ipAdEntAddr is index object
Chapter 7 Management Information Base (MIB) 19
WS1 ipAddrTable
ipAdEntAddro 127.0.0.1 is loopback address on WS1o 192.192.192.233 is IP address of NIC
ipAdEntIfIndexo 1 identifies interface 127.0.0.1 in ifTableo 2 identifies 192.192.192.233 in ifTable
WS1 ipAddrTable {1.3.6.1.2.1.4.20}ipAdEntAddr
{1.3.6.1.2.1.4.20.1.1}ipAdEntIfIndex
{1.3.6.1.2.1.4.20.1.2}ipAdEntNetMask
{1.3.6.1.2.1.4.20.1.3}ipAdEntBcastAddr{1.3.6.1.2.1.4.20.1.4}
ipAdEntReasmMax Size{1.3.6.1.2.1.4.20.1.5}
127.0.0.1 1 255.0.0.0 1 65535192.192.192.233 2 255.255.255.248 1 65535
Note: Each row in the table has the OBJECT IDENTIFIER {1.3.6.1.2.1.4.20.1}for ipAddrEntry
Chapter 7 Management Information Base (MIB) 20
WS1 ipAddrTable
ipAdNetMask mask for addresses ipAdEntBcastAdd
o Indicates broadcast address ipAdEntReasmmax Size
o Max size of reassembled datagram
WS1 ipAddrTable {1.3.6.1.2.1.4.20}ipAdEntAddr
{1.3.6.1.2.1.4.20.1.1}ipAdEntIfIndex
{1.3.6.1.2.1.4.20.1.2}ipAdEntNetMask
{1.3.6.1.2.1.4.20.1.3}ipAdEntBcastAddr{1.3.6.1.2.1.4.20.1.4}
ipAdEntReasmMax Size{1.3.6.1.2.1.4.20.1.5}
127.0.0.1 1 255.0.0.0 1 65535192.192.192.233 2 255.255.255.248 1 65535
Note: Each row in the table has the OBJECT IDENTIFIER {1.3.6.1.2.1.4.20.1}for ipAddrEntry
Chapter 7 Management Information Base (MIB) 21
Index Object NMS might not know index object Then how can NMS construct table? To get ipAdEntNetMask column…
o GetNextRequest(ipAdEntNetMask) to get ipAdEntNetMask.1
o GetNextRequest(ipAsEntNetMask.1) to get ipAdEntNetMask.2
o GetNextRequest(ipAsEntNetMask.2) to get ipAdEntBcastAddr.1, and so on…
Chapter 7 Management Information Base (MIB) 24
Set Command
Check ifAdminStatus of Switch2o All 27 ports are
“administratively up”o Only ports 3 and 25
are connectedo Port 3 connected to
SERVERo Port 25 connected to
10Base2 cable
Chapter 7 Management Information Base (MIB) 25
Set Command Note that
Port 3 of Switch2 connects to SERVER
ROUTER
PSTN
WAN
HUB
PROBE 2 WS 2 SERVER PROBE 1
SWITCH 1SWITCH 2
SUBNET 2 SUBNET 1
LAN
NMS
WS 1
10BASE2 Segment
Router
= port 3
Chapter 7 Management Information Base (MIB) 27
Set Command Set ifAdminStatus of port 3 on
switch2 to “down”
Chapter 7 Management Information Base (MIB) 28
Set Command Meterwar
e shows port 3 is downo 1 == upo 2 ==
down
Chapter 7 Management Information Base (MIB) 30
Enterprise MIBs hp is node for Hewlett Packard What, no Cisco node?
Chapter 7 Management Information Base (MIB) 31
Cisco Catalyst MIB
-- product family
fastLink OBJECT IDENTIFIER ::= { products 1 }
-- groups
seriesG2xx OBJECT IDENTIFIER ::= { fastLink 2 }series2000 OBJECT IDENTIFIER ::= { fastLink 3 }
-- LAST-UPDATED "9708040000Z" -- ORGANIZATION "Cisco Systems, Inc." -- CONTACT-INFO -- " Cisco Systems -- Customer Service -- -- Postal: 170 W Tasman Drive -- San Jose, CA 95134 -- USA -- -- Tel: +1 800 553-NETS -- -- E-mail: [email protected]"
-- DESCRIPTION-- "MIB for the Catalyst 1900 and 2820,-- Catalyst 2100 and 2800,-- EtherSwitch 12XX and 14XX"
sysInfo OBJECT IDENTIFIER ::= { series2000 1 }
sysConfig OBJECT IDENTIFIER ::= { series2000 2 }
port OBJECT IDENTIFIER ::= { series2000 3 }
netMgmt OBJECT IDENTIFIER ::= { series2000 4 }
upgrade OBJECT IDENTIFIER ::= { series2000 5 }
vlan OBJECT IDENTIFIER ::= { series2000 6 }
bandwidthUsage OBJECT IDENTIFIER ::= { series2000 7 }
bridgeGroup OBJECT IDENTIFIER ::= { series2000 8 }
-- the following group manages G2xx modules
esModuleBasic OBJECT IDENTIFIER ::= { seriesG2xx 1 }
--++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- General System Information
--++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sysInfoFwdEngineRevision OBJECT-TYPESYNTAX INTEGERACCESS read-onlySTATUS mandatoryDESCRIPTION
"Returns the revision number of the forwardingengine ASIC."
::= { sysInfo 1 }
sysInfoBoardRevision OBJECT-TYPESYNTAX INTEGERACCESS read-onlySTATUS mandatoryDESCRIPTION
"Returns the revision number of the switch mainboard on which the system firmware resides."
::= { sysInfo 2 }
sysInfoTotalNumberOfPorts OBJECT-TYPESYNTAX INTEGERACCESS read-onlySTATUS mandatoryDESCRIPTION
"The total number of physical network ports.fixed configuration - 27, 15 or 14 ports,modular configuration - 25 - 41 portsThis object does NOT represent the upper bound ofindices into port tables.See sysInfoNumberOfSwitchPorts andsysInfoNumberOfSharedPorts for that purpose."
::= { sysInfo 3 }
--STAND-ALONE-ETHERNET-SWITCH-MIB --REVISION 1.00
DEFINITIONS ::= BEGIN
IMPORTS enterprises, Counter, Gauge, IpAddress, TimeTicks FROM RFC1155-SMI TRAP-TYPE FROM RFC-1215 OBJECT-TYPE FROM RFC-1212 Timeout FROM BRIDGE-MIB sysName, ifIndex, DisplayString FROM RFC1213-MIB;
grandjunction OBJECT IDENTIFIER ::= { enterprises 437 }
--categories
products OBJECT IDENTIFIER ::= { grandjunction 1 }
Chapter 7 Management Information Base (MIB) 36
sysInfo node Select sysInfoNumberOfSwitchPorts… What should we find?
Chapter 7 Management Information Base (MIB) 37
sysInfo node
What does this tell us?
Switch has 27 ports
Why not just count ports?
Allows for remote mgmt!
Chapter 7 Management Information Base (MIB) 38
MIB Editor We have seen how to construct
MIB objects as text files and compile
There are MIB editorso User-friendly editor to make correct
source codeo May be part of NMS or standalone