Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399641
  • 博文数量: 148
  • 博客积分: 3191
  • 博客等级: 中校
  • 技术积分: 1232
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-11 15:25
文章分类

全部博文(148)

文章存档

2011年(148)

我的朋友

分类: 网络与安全

2011-08-24 16:42:45

设备SNMP配置说明

 

 

1SNMP原理的相关介绍... 2

2、各种设备SNMP协议的配置... 3

Cisco设备... 3

Catalyst OS. 3

IOS. 3

华为设备... 3

IOS. 3

Huawei OS. 3

Foundry设备... 3

港湾设备... 3

Extreme设备... 4

configure snmp community. 4

用来替代第一种命令... 4

3COM设备... 5

Avaya设备... 6

北电设备... 6

北电passport 86系列snmp配置... 6

passport 6400. 6

passport 8006. 7

nortel系列... 7

3com交换机snmp配置... 7

4900交换机网管的设置... 7

4400交换机网管的设置... 7

4200交换机网管的设置... 8

 

 


 

SNMP原理的相关介绍

 

      基于TCP / IP的网络管理包含两部分:网络管理站(也叫管理进程,m a n a g e r)和被管理的网络单元(也叫被管设备)。被管设备种类繁多,例如:路由器、X 终端、终端服务器和打印机等。这些被管设备的共同点就是都运行TCP / IP协议。被管设备端和管理相关的软件叫做代理程序( a g e n t )或代理进程。

 

      基于TCP / IP的网络管理包含3个组成部分:

      1) 一个管理信息库M I BManagement Information Base)。管理信息库包含所

有代理进程的所有可被查询和修改的参数。

      2) 关于M I B 的一套公用的结构和表示符号。叫做管理信息结构S M IStructure of Management Information)。

      3) 管理进程和代理进程之间的通信协议,叫做简单网络管理协议S N M PSimple Network Management Protocol)。

 

      关于管理进程和代理进程之间的交互信息, S N M P定义了5种报文:

      1) g e t - r e q u e s t操作:从代理进程处提取一个或多个参数值。

      2) g e t - n e x t - r e q u e s t操作:从代理进程处提取一个或多个参数的下一个参数值。

      3) s e t - r e q u e s t操作:设置代理进程的一个或多个参数值。

      4) g e t - r e s p o n s e操作:返回的一个或多个参数值。这个操作是由代理进程发出的。它是前面3中操作的响应操作。

      5) t r a p 操作:代理进程主动发出的报文,通知管理进程有某些事情发生。

      前面的3个操作是由管理进程向代理进程发出的。后面两个是代理进程发给管理进程的(为简化起见,前面3个操作分别叫做g e tg e t - n e x ts e t操作)。

 

      SNMP(简单网络管理协议)是用来管理网络设备时的国际标准协议,通过对网络设备MIB(管理信息库)中的具体参数的查询和设置,可以实现对网络设备的管理。例如:对许多启用了标准SNMP协议的网络设备(如Cisco交换机、路由器等)的接口信息,不但能使用前面介绍的SNMPget操作获得接口状态的updown的信息,而且可以使用set操作来设置接口的updown状态。这就是使用SNMP协议对网络设备进行管理的技术实现原理。

 

、各种设备SNMP协议的配置 设备

配置SNMP的共同体名: set snmp community  [read-only|read-write|read-write-all] community_string

全局模式配置SNMP的共同体名:snmp-server community community_string [ro|rw]

 

Cisco配置方法

super

[switch]sys

[switch]snmp-agent community [read|write] community_string

[switch]snmp-agent sys-info version all

设备

Cisco设备IOS配置方法

 

命令格式 config snmp community [readonly|readwrite]

[readonly|readwrite] 读确认/读写确认字符串

默认值: 字符串值 readonlypublic

                          readwriteprivate

使用指导 community 字符串为远程网络管理员配置交换机提供了一种用户确认机

制。在交换机上有两种Community 字符串:读确认字符串(readonly)允

许对交换机进行只读访问;读写确认字符串(readwrite)提供了对交换机

读写操作的权限。

配置实例 Harbour(config)# config snmp community readonly harbour

service snmp enable

相关命令

show snmp community-string

 

 

设备

命令格式

configure snmp community [readonly | readwrite] {encrypted}

命令描述:

 Configures the value of the default SNMP read or read/write community string.

readonly Specifies read-only access to the system.

readwrite Specifies read and write access to the system.

encrypted Specifies encryption, for use only by the switch when uploading or

downloading a configuration. Should not be used through the CLI.

alphanumeric string Specifies an SNMP community string name.

默认值:

The default read-only community string is public. The default read/write community string is private.

举例:以下命令是设置一个读写权限的共同体名extreme

    configure snmp community readwrite extreme

 

命令格式

configure snmp add community [readonly | readwrite] {encrypted}

命令描述:

Adds an SNMP read or read/write community string.readonly Specifies read-only access to the system.

readwrite Specifies read and write access to the system.

encrypted Specifies encryption, for use only by the switch when uploading or

downloading a configuration. alphanumeric string Specifies an SNMP community string name. See “Usage Guidelines” for more

information.

默认值:

The default read-only community string is public. The default read/write community string is private.

用法:

Community strings provide a simple method of authentication between a switch and a remote network

manager. Read community strings provide read-only access to the switch. The default read-only

community string is public. Read-write community strings provide read and write access to the switch.

The default read/write community string is private.

To change the value of the default read/write and read-only community strings, use the configure

snmp community command.

举例:以下命令是设置一个读写权限的共同体名extreme

configure snmp add community readwrite extreme

 

 

设备

 

华为3Com路由器、交换机新旧命令行配置snmp对比

 

新命令行版本中:

   snmp-agent local-engineid 800007DB00E0FC0000106877  #该行自动生成

* snmp-agent community read  public

* snmp-agent community write  private

   snmp-agent sys-info contact HuaWei BeiJing China

   snmp-agent sys-info location BeiJing China

* snmp-agent sys-info version all

* snmp-agent trap-host ....          #接收trap的网管主机地址

 

老命令行版本中:

 

* snmp-server enable traps snmp

   snmp-server engineid 800007DB00E0FC0000106877 #该行自动生成

* snmp-server community public ro

* snmp-server community private rw

* snmp-server host 10.110.x.x public        #接收trap的网管主机地址

  snmp-server trap-source Vlan-interface2        #发送trap的源端口

 

说明:当存在网管平台(如N2000)和Quidview集成时,带*号的为必配置项目。

 

 

设备

 

 

系列snmp配置

1、版本是3.5.0.0系列的及以下版本
确认版本命令 show bootconfig info
snmp
配置命令:config/sys/set/snmp/community ro fjep_8606

2
、版本是3.7.0.0 系列的
snmp 配置命令:config/snmp-v3/com munity/name first fjep_8606

Provision one or more Vr Snmp Community ( Com) components.

add Vr/ Snmp Community/

Set the community string, used to authenticate SNMP messages

from SNMPv1 management entities. The default value is public.

set Vr/ Snmp Com/ communityString

where:

is the string used to authenticate SNMP

messages.

Specify the set of MIB subtrees accessible by this community.This

must be set to a specific view index, see step 6, substep a.

set Vr/ Snmp Com/ viewIndex

Specify Vr Snmp Com accessMode ( acMode) attribute for this

community. The default is readOnly.

set Vr/ Snmp Com/ accessMode

where:

indicates the level of access for each

object in the view.

 

sys set snmp community ro public

sys set snmp community l2 private

sys set snmp community l3 private

sys set snmp community rw private

sys set snmp trap-recv 10.1.1.1 v2c public

 

系列

 

 

 

交换机snmp配置

 

交换机网管的设置

4900交换机设置管理IP后,还可以通过网管系统进行管理,如3Com的免费网管软件3Com Network Supervisor。一般情况下用4900默认的配置就可以,根据情况也可以进行修改。主要的包括设置网管软件对交换机进行读/写的Community字串,以及交换机向网管软件发送Trap的目的地址,如下所示。

Select menu option: sys man snmp comm.Enter new community for user 'admin' [private]: write001Enter new community for user 'manager' [manager]: write000Enter new community for user 'monitor' [public]: read001Select menu option:[说明]以上设置将网管系统读的Community字串设为read001,将改配置和修改系统参数的Community字串设为write001write000

Select menu option: sys man snmp trap createEnter the trap community string [monitor]:Enter the trap destination address: 10.10.10.8Select menu option:[说明]以上设置使交换机将monitortrap信息发到地址为10.10.10.8的网管系统或其他可接收trap的系统。可以设置多个目的地址

 

交换机网管的设置

4400交换机设置管理IP后,还可以通过网管系统进行管理,如3Com的免费网管软件3Com Network Supervisor。一般情况下用4400默认的配置就可以,根据情况也可以进行修改。主要的包括设置网管软件对交换机进行读/写的Community字串,以及交换机向网管软件发送Trap的目的地址,如下所示。

Select menu option: sys man snmp comm.Enter new community for user 'admin' [private]: write001Enter new community for user 'manager' [manager]: write000Enter new community for user 'monitor' [public]: read001Select menu option:[说明]以上设置将网管系统读的Community字串设为read001,将改配置和修改系统参数的Community字串设为write001write000

Select menu option: sys man snmp trap createEnter the trap community string [monitor]:Enter the trap destination address: 10.10.10.8Select menu option:[说明]以上设置使交换机将monitortrap信息发到地址为10.10.10.8的网管系统或其他可接收trap的系统。可以设置多个目的地址

 

 

交换机网管的设置

4200交换机设置管理IP后,还可以通过网管系统进行管理,如3Com的免费网管软件3Com Network Supervisor。一般情况下用4200默认的配置就可以,根据情况也可以进行修改。主要的包括设置网管软件对交换机进行读/写的Community字串,以及交换机向网管软件发送Trap的目的地址,如下所示。

Select menu option: sys man snmp commEnter new community for user 'admin' [private]: write001Enter new community for user 'manager' [manager]: write000Enter new community for user 'monitor' [public]: read001Select menu option:[说明]以上设置将网管系统读的Community字串设为read001,将改配置和修改系统参数的Community字串设为write001write000

Select menu option: sys man snmp trap createEnter the trap community string [monitor]:Enter the trap destination address: 10.10.10.8Select menu option:[说明]以上设置使交换机将monitortrap信息发到地址为10.10.10.8的网管系统或其他可接收trap的系统。可以设置多个目的地址

 

阅读(1224) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~