Internet SNMPv 1 SNMPv 2 SNMPv 3 ISOITUT




























































































- Slides: 92
網路管理相關標準 Internet ◦ SNMPv 1, SNMPv 2, SNMPv 3 ISO/ITU-T X. 700 Series: ◦ CMIP/S (Common Management Information Protocol / Service) ITU-T M. 3000 Series: ◦ TMN (Telecommunication Management Networks) 5
CMIP 與SNMP之比較 CMIP OSI Seven Layers GDMO Object-Oriented Global Naming (X. 500) SNMP Internet TCP/IP Internet SMI Object-Based Local Naming (OID) 7 Service Primitives 5 Messages Connection-Oriented Connectionless Event-Oriented Scoping/Filtering Polling Get. Next Security Mechanism Community Name
網路管理相關協定 SNMP(v 1, v 2, v 3) (Simple Network Management Protocol) ◦ 目前網際網路網管標準協定 ICMP (Internet Control Message Protocol) ◦ 例如Ping、traceroute指令 ARP/RARP (Address Resolution Protocol/ (Reverse ARP)) ◦ 可迅速得知哪些主機(IP位址)目前在網路上 TCP ◦ 使用TCP Socket連結,判斷是否提供服務 Telnet/SSH + CLI (Command Line Interface) ◦ 可以傳統文字指令,監控設備或服務 HTTP+XML ◦ 以被管設備所提供之Web介面,進行監控
OSI 管理標準 CMIS/P ◦ 全名為 Common Management Information Service / Protocol ◦ 為網路管理通訊協定 SMFs (Systems Management Functions) ◦ 定義各式管理功能及所需被管物件 SMI/GDMO ◦ SMI: Structure of Management Information ◦ GDMO: Guidelines for the Definition of Managed Objects ◦ 為CMIS/P標準之資訊模型、資料定義語言
OSI 管理模型 SMI/GDMO SMFs MAs SMASE MO . . . SMASE CMISE ACSE CMISE ROSE OSI Protocol Stack . . . SMASE ACSE CMIS/P Link ROSE OSI Protocol Stack Link Network
七個CMIS 服務 Service Type M-CANCEL-GET confirmed M-EVENT-REPORT confirmed/non-confirmed M-GET confirmed M-SET confirmed/non-confirmed M-ACTION confirmed/non-confirmed M-CREATE confirmed M-DELETE confirmed
系統管理功能(SMFs) Systems Management Functions Applications SMFAs SMFs CM FM SM AM Object Management State Management Attributes for Representing Relationships Alarm Reporting Management Event Reporting Management Log Control Security Alarm Reporting Security Audit Trail Objects and Attributes for Access Control Accounting Metering Workload Monitoring Test Management . . . Summarization CMIS PM Get Set Action Cancel Get Event Report Lower Layer Services Delete Create
SNMP簡介 Internet網路管理標準 ◦ SNMP (Simple Network Management Protocol) ◦ 已為Internet網路管理之業界採用標準(De facto standard) ◦ 大部分網路設備(Router, Switch)均支援SNMP ◦ 目前SNMP之版本: SNMPv 1, SNMPv 2 c, SNMPv 3 SNMPv 1, SNMPv 2 c廣被採用 SNMPv 3仍不普遍
SNMPv 1標準 協定: SNMP Protocol (Std 15) ◦ RFC 1157: Simple Network Management Protocol. 資訊模型: Structure of Management Information (SMI) (Std 16) ◦ RFC 1155: Structure and Identification of Management Information for TCP/IP-based Internets. ◦ RFC 1212: Concise MIB Definitions. 管理資訊庫: MIB-II (Std 17) ◦ RFC 1213: Management Information Base for Network Management of TCP/IP-based Internets: MIB-II.
SNMP網管模型 Management Station Network Element SNMP Agent Manager Set/Get. Next Request SNMP UDP MIB/ SMI Get Response / Trap UDP IP IP 網路介面 Managed Resources IP Network (Internet) MIB: Management Information Base SMI: Structure of Management Information
SNMP 服務與PDU 四個服務 ◦ Get, Set, Get. Next, Trap 五種PDU ◦ Get. Request, Set. Request, Get. Next. Request, Get. Response, Trap Get, Set, Get. Next Request Manager Get Response Agent(s) Trap PDU: Protocol Data Unit
SNMP 服務與PDU Get. Next Set Trap Manager Get Request Get Response Get. Next Request Get Response Set Request Get Response Trap Request Agent 21
Get-Next Request說明 MIB Tree : • 依據SNMP標準,可存取值 之物件,只位於葉子位置 4 1 2 3 5 6 : Non-Leaf Object : Leaf Object
SNMP使用之UDP通信埠 Management Station Network Elements (NEs) Manager Agent SNMP 162 UDP SNMP Any 161 UDP IP IP 網路介面 Any
SNMP 訊息格式 SNMP訊息欄位: ◦ Version Identifier ◦ Community Name ◦ Protocol Data Unit Message : : = SEQUENCE { version community data } INTEGER {version-1(0)}, OCTET STRING, ANY 依據SNMP原標準,SNMP訊息不得超過484位元組 Version Community SNMP PDU
SNMP PDU格式 • request-id: 請求識別碼 • error-status: 錯誤狀態碼 • error-index: 錯誤索引 • variable-bindings 由一或多個(物件名稱, 物件值)形成的物件序列 PDU : : = SEQUENCE { request-id INTEGER, error-status INTEGER { no. Error(0), too. Big(1), no. Such. Name(2), bad. Value(3), read. Only(4), gen. Err(5)}, error-index INTEGER, variable-bindings SEQUENCE OF { name Object. Name, value Object. Syntax } } PDU: Protocol Data Unit
SNMP PDU示意圖 Get. Request, Get. Next. Request, Set. Request PDU type request-id 0 0 variable-bindings Get. Response PDU type request-id error-status error-index variable-bindings name value . . . name value
Trap-PDU 格式 Enterprise: 廠商之識別碼 Agent Address: 代理者之IP位址 Generic Trap: 一般性的trap型態 Specific Trap: 廠商自行訂義之trap編號 Time Stamp: 時戳 Variable Bindings 事件相關之物件 Trap-PDU : : = [4] IMPLICIT SEQUENCE { enterprise OBJECT IDENTIFIER, agent-addr Network. Address, generic-trap INTEGER { cold. Start(0), warm. Start(1), link. Down(2), link. Up(3), authentication. Failure(4), egp. Neighbor. Loss(5), enterprise. Specific(6)}, specific-trap INTEGER, time-stamp Time. Ticks, variable-bindings Var. Bind. List } PDU type enterprise agent-addr generic-trapspecific-traptime-stamp variable-bindings
SNMP資訊模型 Managed Resources 被管理資源抽象化表示為被管物 件(managed object),簡稱MO MO可視為一個資料變數(variable) 代理者所管轄之所有MO以樹狀結 構方式組織而成管理資訊庫 (Management Information Base), 簡稱MIB Agent SNMP UDP IP 網路介面 NE: Network Element
SNMP的資料定義語言: SMI Structure of Management Information (SMI) ◦ 一組用來定義被管物件的語法與規則 ◦ 使用ASN. 1之資料型態 ◦ 使用ASN. 1巨集(Macro)訂定所需語法 sys. Location OBJECT-TYPE SYNTAX Display. String (SIZE (0. . 255)) ACCESS read-write STATUS mandatory DESCRIPTION "The physical location of this node (e. g. , `telephone closet, 3 rd floor'). " : : = { system 6 }
OID例子 std 0 ccitt 1 reg authority 0 directory system interface 1 2 at 3 mgmt 1 MIB II IP 4 2 joint-iso-ccitt 3 org 6 dod 1 internet 4 3 2 experimental 2 member body . 1. 3. 6. 1. 2 1 root 1 iso ICMP TCP 5 6 UDP 7 . 1. 3. 6. 1. 2. 1. 1. 3. 6. 1. 4. 1 private 1 enterprises EGP 8 Trans. 10 SNMP 11
物件名稱與OID表示語法 文字(數字) internet OBJECT IDENTIFIER : : = { iso org(3) dod(6) 1 } 純數字 internet OBJECT IDENTIFIER : : = { 1 3 6 1 } 利用已定義過之父輩物件名稱 mgmt OBJECT IDENTIFIER : : = { internet 2 } i. e. {1 3 6 1 2}
物件型態 (OBJECT-TYPE) if. Number OBJECT-TYPE SYNTAX INTEGER ACCESS read-only STATUS mandatory DESCRIPTION "The number of network interfaces (regardless of their current state) present on this system. " : : = { interfaces 1 }
OBJECT-TYPE語法說明 OBJECT-TYPE ◦ 為ASN. 1 巨集名稱,其前置文字(例: if. Number)為物件名稱 SYNTAX ◦ 此物件型態之資料類型 ACCESS ◦ 此物件型態之存取權限 ◦ "read-only", "read-write", "write-only", "not-accessible" STATUS ◦ 標準支援情況:"mandatory", "optional", "obsolete" DESCRIPTION ◦ 一段關於此物件型態之文字描述
以if. Table為例 表格 列 if. Table OBJECT-TYPE SYNTAX SEQUENCE OF If. Entry ACCESS not-accessible STATUS mandatory DESCRIPTION "A list of interface entries. The number of entries is given by the value of if. Number. " : : = { interfaces 2 } if. Entry OBJECT-TYPE SYNTAX If. Entry ACCESS not-accessible STATUS mandatory DESCRIPTION "An interface entry containing objects at the subnetwork layer and below for a particular interface. " INDEX { if. Index } : : = { if. Table 1 }
定義每一欄位為一物件型態 if. Descr OBJECT-TYPE SYNTAX Display. String (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. " : : = { if. Entry 2 }
物件實例識別例子: if. Table. if. Entry. 2 (. 1. 3. 6. 1. 2. 2). if. Table. if. Entry. 3 (. 1. 3. 6. 1. 2. 2. 1. 2. 3) if. Index if. Descr if. Type . . . 1 le 0 6 . . . 6 llc 0 1 . . . 7 lo 0 24 . . . 9 le 1 6 . . 1. 3. 6. 1. 2. 2. 6 . 1. 3. 6. 1. 2. 2. 1. 2. 3. 7 43
5. MIB-II簡介
MIB-II之11群物件
MIB II (RFC 1213) System Group ◦ Provide general information about the managed system. Interfaces Group ◦ Contains generic information about the physical interfaces. Address-Translation Group ◦ Contains information about the mapping between network addresses and physical addresses for each physical interface. IP Group ◦ Contains information about the implementation and operation of IP at the managed system. ICMP Group ◦ Contains information about the implementation and operation of ICMP at the managed system.
System Group
System Group
72= 8 + 64 0100 sys. Services OBJECT-TYPE SYNTAX INTEGER (0. . 127) ACCESS read-only STATUS mandatory DESCRIPTION "A value which indicates the set of services that this entity primarily offers. The value is a sum. This sum initially takes the value zero, Then, for each layer, L, in the range 1 through 7, that this node performs transactions for, 2 raised to (L - 1) is added to the sum. For example, a node which performs primarily routing functions would have a value of 4 (2^(3 -1)). In contrast, a node which is a host offering application services would have a value of 72 (2^(4 -1) + 2^(7 -1)). Note that in the context of the Internet suite of protocols, values should be calculated accordingly: layer functionality 1 physical (e. g. , repeaters) 2 datalink/subnetwork (e. g. , bridges) 3 internet (e. g. , IP gateways) 4 end-to-end (e. g. , IP hosts) 7 applications (e. g. , mail relays) For systems including OSI protocols, layers 5 and 6 may also be counted. " : : = { system 7 }
System Information
Interfaces Group
i. FEntry
if. Type http: //www. iana. org/assignments/smi-numbers
if. Admin. Status OBJECT-TYPE SYNTAX INTEGER { up(1), -- ready to pass packets down(2), testing(3) -- in some test mode } ACCESS read-write STATUS mandatory DESCRIPTION "The desired state of the interface. The testing(3) state indicates that no operational packets can be passed. " : : = { if. Entry 7 } if. Oper. Status OBJECT-TYPE SYNTAX INTEGER { up(1), -- ready to pass packets down(2), testing(3) -- in some test mode } ACCESS read-only STATUS mandatory DESCRIPTION "The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. " : : = { if. Entry 8 }
if. Table
if. Table (cont. )
IP Group
IP Group • ip. Forwarding: • forwarding(1) • not-forwarding(2) • • • IP Address Table contains table of IP addresses IP Route Table contains an entry for each route IP Network-to-Media Table is address translation table mapping IP addresses to physical addresses
IP Address Table
ip. Addr. Table
IP Routing Table
IP Routing Table
ip. Route. Table Example other(1), invalid(2), direct(3), indirect(4) Sec. other(1), local(2), netmgmt(3), icmp(4), egp(5), ggp(6), hello(7), rip(8), is-is(9), s-is(10), cisco. Igrp(11), bbn. Spf. Igp(12), ospf(13), bgp(14)
IP Address Translation Table
IP Address Translation Table
IPNet. To. Media. Table other(1), invalid(2) read-write invalid(2), dynamic(3), static(4) = ARP Table
ICMP Group
ICMP • Objects associated with ping • icmp. Out. Echos - # ICMP echo messages sent • icmp. In. Echo. Reps - # ICMP echo reply messages received • Objects associated with traceroute/tracert • icmp. In. Time. Excs • # ICMP time exceeded messages received
TCP Group
TCP Connection Table
TCP Connection Table
TCP Connection State tcp. Conn. State OBJECT-TYPE SYNTAX INTEGER { closed(1), listen(2), syn. Sent(3), syn. Received(4), established(5), fin. Wait 1(6), fin. Wait 2(7), close. Wait(8), last. Ack(9), closing(10), time. Wait(11), delete. TCB(12) } ACCESS read-write STATUS mandatory … : : = { tcp. Conn. Entry 1 }
tcp. Conn. Table
UDP Group
UDP Group
udp. Table