计算机网络自顶向下方法之一一一第九章

前几天看了本英文原版的Computer Networking—A top down approach 第六版 现在回头开始做题的时候感觉效果不好 正好刚开博客 姑且开个分类 用十篇博客来回顾

第九章章题——–网络管理

下图是章首内容 先看一下章首说了些什么 方便我们总体把握一下这章的内容
计算机网络自顶向下方法之一一一第九章_第1张图片
通过我们这本书前八章的学习 我们现在已经很清楚一个网络包含许多复杂的 相互作用的硬件和软件——从连接 ,交换机,路由器,主机和其他组成网络物理部分的器件到控制和协调这些器件的许多协议(软件和硬件都有)。当成百上千的这种元件被组合起来构成一个网络,这些元件偶尔发生故障也就不是一件奇怪的事,或许网络要素配置错误,或者网络资源负载过重,再或者网络部件就是简单的坏掉了(举个例子,一条线缆被割断或者一罐苏打水塞在了路由器上)。网络管理员必须能对这些事故作出反应,由于潜在地许多的网络器件要散布出去很大的范围,网络操控中心的网管显然需要工具来协助监视管理和控制网络,这一章,我们要学习网管在完成这项任务时所涉及的体系结构,协议和信息基础。
好吧 最后一句才说道重点 (纯属自己翻译 想必有很多不合适的地方 敬请指正)

9.1 什么是网络管理?

网络管理的几个部分
1).发现或预警主机接口或路由器中的错误
2).监测主机
3).监测流量以协助资源配置
4).发现路由表中的剧变
5).监察服务水平协议
6).入侵检测

国际标准组织提出的网络管理模型
1).性能管理(SNMP有核心的地位)
2).故障管理(SNMP同样有核心地位)
3).配置管理
4).统计管理
5).安全管理

Network management includes the deployment, integration, and coordination of the hardware, software, and human elements to monitor, test, poll, configure,analyze, evaluate, and control the network and element resources to meet the real-time, operational performance, and Quality of Service requirements at a reasonable cost.

9.2 网络管理的基础设施

网络管理体系的三个主要组件:管理实体 被管设备 网络管理协议
管理实体:控制网络行为的命令由此发出,网管通过此与网络设备交互
被管设备:由managed objects构成,managed objects中的信息被收入MIB(管理信息库),每个被管设备中还有网管代理(运行在被管设备中与管理实体交流的程序,在管理实体的命令或控制下在被管设备中采取措施)
网络管理协议:它运作与管理实体和被管设备之间。允许管理实体查询被管设备的状况,并且通过代理间接地在这些设备中采取措施。代理用网络管理协议通知管理实体异常事件。网络管理协议是赋予了网管管理网络的能力。

9.3 互联网标准管理框架

互联网标准管理框架可追溯到SGMP(Simple Gateway Monitoring Protocol),之后又出现了SNMP,现在最新的是SNMPv3版本,1999年发布并于2002年更新。
互联网标准管理框架的五个部分:
1)网络管理objects的定义,或者说MIB objects。MIB就是Management Information Base(前边说过了这是干嘛的) 。MIB定义被管设备中的管理信息,相关的MIB objects被包含进MIB modules
In our human organizational analogy, the MIB defines the information conveyed between the branch office and the main office.
2)数据定义语言:即SMI(Structure of Management Information),它定义数据类型,对象模型和书写修改管理信息的规定。
In our human organizational analogy, the SMI is used to define the details of the format of the information to be exchanged
3)SNMP协议:这个协议用来在管理实体和代表被管理的网络设备的代理之间传递信息和命令。
4)安全和管理能力:(这是SNMPv3相对SNMPv2做出的最大改进和加强)

9.3.1 管理信息结构——SMI(Structure of Management Information)

SMI是用来定义存储在managed-network entity中的管理信息。Note that the SMI does not define a specific instance of the data in a managed-network
entity, but rather the language in which such information is specified

SMI Base Data Types

11 basic data types
计算机网络自顶向下方法之一一一第九章_第2张图片

SMI Higher-Level Constructs

In addition to the basic data types, the SMI data definition language also provides higher-level language constructs

OBJECT-TYPE
The OBJECT-TYPE construct is used to specify the data type, status, and semantics of a managed object.
计算机网络自顶向下方法之一一一第九章_第3张图片
SYNTAX:具体说明与object相关的基本数据类型
MAX-ACCESS:说明被管object能否被读,被写,被创建,或者在notification中有自己的值。
STATUS:声明object definition是否是当前有效的,废弃的(unimplementable),或者deprecated(implementable)
DESCRIPTION:包含有object的文本定义。

MODULE-IDENTITY
The MODULE-IDENTITY construct allows related objects to be grouped
together within a “module.”
计算机网络自顶向下方法之一一一第九章_第4张图片
计算机网络自顶向下方法之一一一第九章_第5张图片
In addition to containing the OBJECT-TYPE definitions of the managed objects within the module, the MODULE-IDENTITY construct contains clauses to document contact information of the author of the module, the
date of the last update, a revision history, and a textual description of the module

NOTIFICATION-TYPE
The NOTIFICATION-TYPE construct is used to specify information regarding SNMPv2-Trap and InformationRequest messages generated by an agent, or a managing entity;This information includes a textual DESCRIPTION of when such messages are to be sent, as well as a list of values to be included in the message generated;

MODULE-COMPLIANCE
The MODULE-COMPLIANCE construct defines the set of managed objects within a module that an agent must implement.

AGENT-CAPABILITIES
The AGENT-CAPABILITIES construct specifies the capabilities of
agents with respect to object- and event-notification definitions.

9.3.2 Management Information Base :MIB

ISO所采用的object identification framework 是ASN.1 object definition language的一部分。
计算机网络自顶向下方法之一一一第九章_第6张图片

Standardized MIB Modules
9.3.3 SNMP Protocol Operations and Transport Mappings

SNMPv2用来在管理实体和被管设备的代理之间传递MIB信息。
最通常的用法师request-response mode,这种模式中,SNMPv2管理实体向SNMPv2代理发送一条请求,代理接受请求,处理,并发送回复。通常,请求用来查询或者修改被管设备的MIB object values。
次常用的方法是代理发送未被请求的信息给管理实体,叫做trap message,它用来通知管理实体导致MIB object values被修改的特殊情况。

SNMPv2定义了七种信息类型,通常称作protocol data units,即PDUs 。
计算机网络自顶向下方法之一一一第九章_第7张图片
详细介绍于书773页
计算机网络自顶向下方法之一一一第九章_第8张图片

9.3.4 Security and Administration

所谓的SNMP applications包括指令发生器,通知接收器,代理转发器,命令响应器,通知发生器和the possibility of other applications

指令发生器生成GetRequest, GetNextRequest, GetBulkRequest, and SetRequest PDUs 并handles the received responses to these PDUs。

命令响应器在代理中执行,对收到的GetRequest, GetNextRequest, GetBulkRequest, and SetRequest PDUs 进行接受,处理,回复。

通知发生器在代理中生成Trap PDUs,这些最终会在管理实体中的通知接收器被接收和处理。

代理转发器发送请求,通知和回复 PDUs。

SNMP application发送的PDU在被合适的传输协议发送前会通过SNMP engine ,如下图。
Figure 9.5 shows how a PDU generated by the command generator application first enters the dispatch module,where the SNMP version is determined. The PDU is then processed in the messageprocessing
system, where the PDU is wrapped in a message header containing the
SNMP version number, a message ID, and message size information. If encryption or authentication is needed, the appropriate header fields for this information are included as well; see [RFC 3411] for details. Finally, the SNMP message (the application-generated PDU plus the message header information) is passed to the appropriate transport protocol. The preferred transport protocol for carrying SNMP messages is UDP (that is, SNMP messages are carried as the payload in a UDP datagram), and the
preferred port number for the SNMP is port 161. Port 162 is used for trap messages.
计算机网络自顶向下方法之一一一第九章_第9张图片

SNMPv3提供了数据加密,身份验证,针对重播攻击的保护和访问控制

数据加密:DES(Data Encryption Standard),因为DES是共享密钥的系统,所以加密者的密钥需要告知解密者。

身份验证:MAC(Message Authentication Code),提供身份验证和防篡改保护,MAC需要发送者和接受者都知道一个共同的secret key。

反抗重播:随机数可以用来反抗重播攻击,不详写了

访问控制:SNMPv3 provides a view-based access control [RFC 3415] that
controls which network management information can be queried and/or set by which users. An SNMP entity retains information about access rights and policies in a Local Configuration Datastore (LCD). Portions of the LCD are themselves accessible as managed objects, defined in the View-Based Access Control Model Configuration MIB [RFC 3415], and thus can be managed and manipulated remotely via SNMP.

9.4 ASN.1

ASN.1是源自ISO的标准,并用于很多互联网相关的协议,特别是在网络管理领域。
不同的架构有不同的内部数据格式是个真实且普遍的问题,那么如何去解决?方法就是弄一个 独立与机器 独立于系统 独立于语言的方法来描述整数和其他数据类型还有声明各种数据类型在网络中传输风格的规定。
除了提供了数据定义语言,ASN.1还提供BER(Basic Encoding Rules),BER具体说明了用ASN.1定义的数据实体是怎么在网络之上发送的。BER用了一种叫做TLV(Type, Length, Value的方法来加密数据。

我们来举一个栗子 传输一个类型如下的数据{weight,259} {lastname,”smith”}
计算机网络自顶向下方法之一一一第九章_第10张图片
看到上图中的加密后的信息为45smith2213 为什么呢? 像TLV名字所示 第一个4就是smith的类型 我们从上图得知类型是OCTET STRING 查下表看到这个类型前边编号为4 第二个数字5的意思就是length 即smith长度 在后边的连续五个字母是smith 到这里其实就是TLV的加密方法了 后边四个数字分别代表什么呢?可想而知 第一个数字是259的类型 INTEGER类型的编号是2 第二个数字也是2 意义是259的长度两个字节(00000001 00000011) 后边的13就是数字259的二进制表示之后前边一个字节用1表示 后边一个字节用3表示。
计算机网络自顶向下方法之一一一第九章_第11张图片

9.5 Conclusion

We saw that the architecture of network management systems revolves around five key components:
(1) a network manager,
(2) a set of managed remote (from the network manager) devices,
(3) the Management Information Bases (MIBs) at these devices, containing
data about the devices’ status and operation,
(4) remote agents that report MIB information and take action under the control of the network manager,
(5) a protocol for communication between the network manager and the remote devices.

先写这样,手里还有一本谢希仁的计算机网络,可是他老人家没有讲网络管理这一摊,大部分内容还是读得懂,但是真心是英文功夫不到家,翻译不过来,如果有幸被你看到这博客,觉得哪里不对,欢迎指正!!!!!

你可能感兴趣的:(计算机网络自顶向下方法之一一一第九章)