由IETF (Internet Engineering Task Force) 制定的簡易網路管理協定 (Simple Network Management Protocol,簡稱 SNMP) 是目前應用最廣泛的 TCP/IP 網路管理協定,目前市面上許多網路設備,包含路由器、交換器、伺服器、及不斷電系統等設備對此協定均有支援。此外,支援 SNMP 的網路管理軟體也相當盛行,然而不論是商業版或是開源版本都是傳統的用戶端軟體,各自有其獨特的操作方式與介面,不方便客製化以及提供一致性的標準介面。本論文提出基於 Representational State Transfer (簡稱 REST) 的 SNMP 應用程式介面,可以有效增加網路管理人員使用SNMP的方便性,並支援跨平台使用,只需以網頁瀏覽器即可進行管理網路設備的工作,此外其所支援之 REST 介面以及支援 JSON物件,都可方便網管人員在網頁環境開發客製化的網管應用。本論文所提 REST 應用程式介面除了支援基本的 SNMP 標準指令,並提供常用的子樹瀏覽機制,另針對事件處理,在網頁環境使用 WebSocket 技術解決即時告警的問題。本論文並針對所提相關功能進行實作,以驗證其可行性。
SNMP (Simple Network Management Protocol), defined by IETF (Internet Engineering Task Force), is the standard protocol for the management of TCP/IP networks. Currently, most network devices, including routers, switches, servers, and UPS, include an SNMP agent for the monitoring and control of these devices in a standard way. In addition, many software packages for network management support SNMP. In general, regardless of commercial or open source products, these SNMP packages are traditional client software, which usually provides a proprietary interface. The unique interface in each software makes customization difficult. In this thesis, we propose a REST (Representational State Transfer) API for SNMP. This SNMP API can facilitate the use of SNMP across different platforms. Only a web browser is required for a network manager to manage a variety of network devices. Furthermore, the support of both REST API and JSON objects also facilitates customization in the development of network management applications. In addition to the support of SNMP commands in REST, the proposed REST API also provides sub-tree browsing. Furthermore, a WebSocket-based event reporting scheme is developed to receive real-time SNMP notifications in a web environment. A prototyping implementation is provided to verify the proposed scheme.