250 likes | 319 Views
MRTG. Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23. Network Management. OSI CMIP (Common Management Information Protocol) designed 1980 SNMP de facto network management standard. SNMP. Simple Network Management Protocol application layer protocol
E N D
MRTG Speaker: Yan-Shiang Wang Adviser: Quincy Wu Date: 2005/11/23
Network Management • OSI CMIP (Common Management Information Protocol) • designed 1980 • SNMP • de facto network management standard
SNMP • Simple Network Management Protocol • application layer protocol • facilitates the exchange of management information between network devices • part of the TCP/IP • UDP port 161
SNMP-basic components • managed devices • sometimes called network elements • agents • network-management software module • network-management systems (NMSs) • executes applications that monitor and control managed devices
SNMP-basic components (cont.) network
SNMP-basic commands • read • NMS examines different variables • write • NMS changes the values of variables • trap • used by managed devices to asynchronously report events to the NMS • traversal operations • which variables a managed device supports • sequentially gather information in variable tables
MIB • Management Information Base • collection of information that is organized hierarchically • managed object (or MIB object or MO) • scalar and tabular • each resource to be managed • data variable • object identifier (or object ID or OID)
MIB tree example root iso(1) ccitt(0) iso-ccitt(2) standard(0) registration- authority(1) member- body(2) identified- organization(3) dod(6) internet(1) private(4) security(5) mgmt(2) experimental(3) snmpV2(6) directory(1) enterprise(1) ucdavis(2021) memory(4) systemStats(11) memTotalFree(11) ssCpuRawUser(50)
MIB tree example • memTotalFree (MO) • .1.3.6.1.4.1.2021.4.11 (OID) • ssCpuRawUser (MO) • .1.3.6.1.4.1.2021.11.50 (OID)
SNMPv1 • RFC-1157 • operates over UDP, IP, CLNS, DDP, IPX • SMI(Structure of Management Information) RFC-1155 • ASN.1 data types • name, syntax, and encoding • SMI-specific data types • simple, and application-wide • SNMP MIB tables
SNMPv2 • evolution of the initial version • draft standard currently • SMI(Structure of Management Information) RFC-1902 • modules • MIB modules, compliance statements, and capability statements
SMI(Structure of Management Information) example • /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt • memTotalFree OBJECT-TYPE • SYNTAX Integer32 • MAX-ACCESS read-only • STATUS current • DESCRIPTION • "Total Available Memory on the host" • ::= { memory 11 }
SMI(Structure of Management Information) example • /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt • ssCpuRawUser OBJECT-TYPE • SYNTAX Counter32 • MAX-ACCESS read-only • STATUS current • DESCRIPTION • "user CPU time." • ::= { systemStats 50 }
SNMPv1 vs. SNMPv2 • request/response protocol • Get, GetNext, Set, and Trap • adds/enhances protocol • SNMPv2 Trap • GetBulk and Inform
Manager Manager Manager Manager Agent Agent Agent Agent SNMP Service Get Request Get retrieve objects GetNext retrieve next objects Set update objects Trap report events Get Response GetNext Request Get Response Set Request Get Response Trap Request
GetNext • MIB Tree • only leaf objectshave values 1 2 1 2 3 4
SNMP example • snmptranslate .1.3.6.1.4.1.2021.11.50.0 • OID to MO • snmptranslate -On UCD-SNMP-MIB::ssCpuRawUser.0 • MO to OID • snmptranslate -Of UCD-SNMP-MIB::ssCpuRawUser.0 • show total path • snmptranslate -IR ssCpuRawUser • show total MO • snmptranslate -IR -Td ssCpuRawUser • show MO’s content • snmptranslate -IR -Tp ucdavis • show tree structure
SNMP example (cont.) • snmpget -c mrtg -v 2c localhost ssCpuRawUser.0 • -c: community -v: version target MO.0 • show MO’s value • snmpgetnext -c mrtg -v 2c localhost ssCpuRawUser.0 • show MO’s next relative value • snmpwalk -v 2c -c mrtg localhost • show all system MO’s value • snmpwalk -v 2c -c mrtg localhost systemStats • show MO’s family value • snmptable -v 2c -Cw 80 -c mrtg localhost sysORTable • -Cw: width • show MO’s value (tabular) • snmptable -v 2c -Cw 80 -c mrtg localhost dskTable • show MO’s value (tabular)
MRTG • Multi Router Traffic Grapher • required • net-snmp • libpng: png library • gd: draw graph • zlib: zip graph • perl • apache
MRTG - configure • /usr/local/share/snmp/snmpd.conf • rocommunity mrtg • syslocation Lab • syscontact root@localhost • cfgmaker mrtg@localhost > mrtg.cfg • mrtg mrtg.cfg • indexmaker -output index.html mrtg.cfg
MRTG - addition • CPU Utilization • systemStats::ssCpuRawUser.0 • Memory Usage • memory::memAvailReal.0 • Disk Usage • dskTable::dskPercent.0