Network Working Group M. MacFaden
Request for Comments: 3512 Riverstone Networks, Inc.
Category: Informational D. Partain
Ericsson
J. Saperia
JDS Consulting, Inc.
W. Tackabury
Gold Wire Technology, Inc.
April 2003
Configuring Networks and Devices with
Simple Network Management Protocol (SNMP)
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract
This document is written for readers interested in the Internet
Standard Management Framework and its protocol, the Simple Network
Management Protocol (SNMP). In particular, it offers guidance in the
effective use of SNMP for configuration management. This information
is relevant to vendors that build network elements, management
application developers, and those that acquire and deploy this
technology in their networks.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. The Internet Standard Management Framework. . . . . . . . 3
1.2. Configuration and the Internet Standard Management
Frame-work. . . . . . . . . . . . . . . . . . . . . . . . 4
2. Using SNMP as a Configuration Mechanism. . . . . . . . . . . . 5
2.1. Transactions and SNMP . . . . . . . . . . . . . . . . . . 6
2.2. Practical Requirements for Transactional Control. . . . . 6
2.3. Practices in Configuration--Verification. . . . . . . . . 7
3. Designing a MIB Module . . . . . . . . . . . . . . . . . . . . 9
3.1. MIB Module Design - General Issues. . . . . . . . . . . . 10
3.2. Naming MIB modules and Managed Objects. . . . . . . . . . 11
3.3. Transaction Control And State Tracking. . . . . . . . . . 12
MacFaden, et al. Informational [Page 1]
RFC 3512 Configuring Networks and Devices with SNMP April 2003
3.3.1. Conceptual Table Row Modification Practices. . . . 12
3.3.2. Fate sharing with multiple tables. . . . . . . . . 13
3.3.3. Transaction Control MIB Objects. . . . . . . . . . 14
3.3.4. Creating And Activating New Table Rows . . . . . . 15
3.3.5. Summary Objects and State Tracking . . . . . . . . 15
3.3.6. Optimizing Configuration Data Transfer . . . . . . 18
3.4. More Index Design Issues. . . . . . . . . . . . . . . . . 22
3.4.1. Simple Integer Indexing. . . . . . . . . . . . . . 23
3.4.2. Indexing with Network Addresses. . . . . . . . . . 23
3.5. Conflicting Controls. . . . . . . . . . . . . . . . . . . 24
3.6. Textual Convention Usage. . . . . . . . . . . . . . . . . 25
3.7. Persistent Configuration. . . . . . . . . . . . . . . . . 26
3.8. Configuration Sets and Activation . . . . . . . . . . . . 28
3.8.1. Operational Activation Considerations. . . . . . . 28
3.8.2. RowStatus and Deactivation . . . . . . . . . . . . 30
3.9. SET Operation Latency . . . . . . . . . . . . . . . . . . 31
3.9.1. Subsystem Latency, Persistence Latency,
and Activation Latency . . . . . . . . . . . . . . 33
3.10. Notifications and Error Reporting. . . . . . . . . . . . 33
3.10.1. Identifying Source of Configuration Changes . . . 34
3.10.2. Limiting Unnecessary Transmission of
Notifications . . . . . . . . . . . . . . . . . . 34
3.10.3. Control of Notification Subsystem . . . . . . . . 36
3.11 Application Error Reporting . . . . . . . . . . . . . . . 36
3.12 Designing MIB Modules for Multiple Managers . . . . . . . 37
3.13 Other MIB Module Design Issues. . . . . . . . . . . . . . 39
3.13.1. Octet String Aggregations . . . . . . . . . . . . 39
3.13.2 Supporting multiple instances of a MIB Module. . . 40
3.13.3 Use of Special Optional Clauses. . . . . . . . . . 41
4. Implementing SNMP Configuration Agents . . . . . . . . . . . . 41
4.1. Operational Consistency . . . . . . . . . . . . . . . . . 41
4.2. Handling Multiple Managers. . . . . . . . . . . . . . . . 43
4.3. Specifying Row Modifiability. . . . . . . . . . . . . . . 44
4.4. Implementing Write-only Access Objects. . . . . . . . . . 44
5. Designing Configuration Management Software. . . . . . . . . . 44
5.1. Configuration Application Interactions
with Managed Systems. . . . . . . . . . . . . . . . . . . 45
5.1.1. SET Operations . . . . . . . . . . . . . . . . . . 46
5.1.2. Configuration Transactions . . . . . . . . . . . . 46
5.1.3. Tracking Configuration Changes . . . . . . . . . . 47
5.1.4. Scalability of Data Retrieval. . . . . . . . . . . 48
6. Deployment and Security Issues . . . . . . . . . . . . . . . . 48
6.1. Basic assumptions about Configuration . . . . . . . . . . 48
6.2. Secure Agent Considerations . . . . . . . . . . . . . . . 49
6.3. Authentication Notifications. . . . . . . . . . . . . . . 49
6.4. Sensitive Information Handling. . . . . . . . . . . . . . 50
7. Policy-based Management. . . . . . . . . . . . . . . . . . . . 51
7.1. What Is the Meaning of 'Policy-based' . . . . . . . . . . 51
MacFaden, et al. Informational [Page 2]
RFC 3512 Configuring Networks and Devices with SNMP April 2003
7.2. Organization of Data in an SNMP-Based Policy System . . . 53
7.3. Information Related to Policy-based Configuration . . . . 54
7.4. Schedule and Time Issues. . . . . . . . . . . . . . . . . 56
7.5. Conflict Detection, Resolution and Error Reporting. . . . 56
7.5.1. Changes to Configuration Outside of the
Policy System. . . . . . . . . . . . . . . . . . . 57
7.6. More about Notifications in a Policy System . . . . . . . 57
7.7. Using Policy to Move Less Configuration Data. . . . . . . 57
8. Example MIB Module With Template-based Data. . . . . . . . . . 58
8.1. MIB Module Definition. . . . . . . . . . . . . . . . . . 61
8.2. Notes on MIB Module with Template-based Data. . . . . . . 73
8.3. Examples of Usage of the MIB . . . . . . .. . . . . . . . 74
9. Security Considerations . . . . . . . . . . .. . . . . . . . . 77
10. Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . 78
11. Normative References. . . . . . . . . . . . . . . . . . . . . 78
12. Informative References. . . . . . . . . . . . . . . . . . . . 79
13. Intellectual Property . . . . . . . . . . . . . . . . . . . . 81
14. Editors' Addresses. . . . . . . . . . . . . . . . . . . . . . 82
15. Full Copyright Statement. . . . . . . . . . . . . . . . . . . 83
1. Introduction
1.1. The Internet Standard Management Framework
The Internet Standard Management Framework has many components. The
purpose of this document is to describe effective ways of applying
those components to the problems of configuration management.
For reference purposes, the Internet Standard Management Framework
presently consists of five major components:
o An overall architecture, described in RFC 3411 [1].
o Mechanisms for desc
C语言实现的snmp服务源码
需积分: 0 37 浏览量
更新于2024-04-24
1
收藏 7.18MB ZIP 举报
在IT领域,SNMP(简单网络管理协议)是一种广泛用于管理网络设备的标准协议。它允许网络管理员监控和配置网络设备,如路由器、交换机、服务器等。C语言是编程领域中的基础语言,其效率高、灵活性强,因此常被用来实现这类底层网络协议。本文将详细介绍基于C语言实现的SNMP服务源码以及与之相关的知识点。
C语言实现的SNMP服务源码意味着开发者使用C语言编写了处理SNMP报文、解析请求、构建响应等功能的代码。这涉及到对SNMP协议的深入理解,包括协议的数据结构、报文格式、操作类型(GET、SET、Trap等)以及不同版本(v1、v2c、v3)之间的差异。
1. SNMP版本:SNMP v1是最基础的版本,支持基本的GET、SET操作和Trap通知,但安全性较弱,不支持认证和加密。SNMP v2c在v1的基础上增加了更多的MIB对象和改进了错误处理,但仍存在安全问题。SNMP v3引入了用户安全模型,提供了认证、加密和访问控制,提高了安全性。
2. OpenSSL库:提到依赖于OpenSSL库,这意味着这个C语言实现的SNMP服务可能使用了OpenSSL提供的加密算法和安全功能,如MD5或SHA哈希算法进行认证,AES或DES加密算法保护数据传输的安全。OpenSSL库还提供了SSL/TLS协议,可以用于建立安全的网络连接。
3. C语言编程:在C语言环境中开发SNMP服务,需要理解指针、结构体、内存管理等基础知识,同时还需要熟悉网络编程,包括套接字编程、TCP/IP协议栈、多线程或多进程处理等。开发者需要创建监听套接字,接收SNMP请求,解析请求报文,执行相应的操作,然后构造响应报文并发送回客户端。
4. MIB(Management Information Base):MIB是SNMP管理的对象集合,定义了网络设备的可管理属性。开发者需要了解如何使用C语言来表示和操作MIB对象,并将其映射到实际的网络设备状态。
5. 编译与调试:net-snmp-5.7.3这个文件名可能是项目的源码包,包含了编译脚本、头文件、源代码和可能的文档。开发者需要了解如何使用编译工具(如gcc)来编译和链接源码,生成可执行程序。同时,调试技巧也很重要,如使用gdb进行源码级调试,查找和修复bug。
6. 性能优化:C语言实现的SNMP服务需要考虑性能问题,如减少内存分配和释放的次数、优化循环和函数调用、避免不必要的系统调用等。此外,对于并发处理能力的要求,可能需要实现高效的线程池或者事件驱动模型。
7. 测试与部署:开发完成后,需要进行详尽的测试,包括单元测试、集成测试和压力测试,确保SNMP服务在各种场景下都能正常工作。部署时,要考虑服务的启动、停止、配置更新等操作,以及与其他网络服务的协同工作。
C语言实现的SNMP服务源码是一个涉及网络协议、加密安全、系统编程等多个领域的复杂项目。理解和分析这样的源码,不仅有助于深入学习SNMP协议,也有助于提升C语言编程和网络管理的能力。

sunlight_coding
- 粉丝: 229
最新资源
- 【IOS应用源码】很精致的范围选择组件.zip
- 【IOS应用源码】很感恩---samplecode(end)归档 7.zip
- 【IOS应用源码】很炫的抽屉式侧边栏导航效果.zip
- 【IOS应用源码】很炫的底部导航.zip
- 【IOS应用源码】很炫的翻页效果.zip
- 【IOS应用源码】横向滚动的label.zip
- 【IOS应用源码】横条显示滚动的股票动态.zip
- 【IOS应用源码】黄色背景的警告提示弹出条.zip
- 【IOS应用源码】后台运行(Multitasking)以及本地通知(Local Notifications) 有图,有书,有代码,统一打包 BackgroundDemo(Beta4Fixed).zip
- 基于Matlab Simulink的风轮机发电系统多模块建模与仿真研究 v1.2
- 【IOS应用源码】华丽的创意和设计 26款经典iPhone开源应用.zip
- 【IOS应用源码】获取当前硬件可用内存的例子UIDevice.zip
- 【IOS应用源码】获取全球当前所有时区的当前时间TestTimeZone.zip
- 【IOS应用源码】加载器(当下载或加载缓存时候用的进度条).zip
- 【IOS应用源码】记事本界面.zip
- 【IOS应用源码】简单的google应用demo.zip