[FAQ] 常见网络设备snmp支持(cisco、netscreen、huawei、H3C等)

产品使用技巧、实例和常见问题整理。

版主: channer, copywu, fengjl

[FAQ] 常见网络设备snmp支持(cisco、netscreen、huawei、H3C等)

帖子channer 于 2010年 6月 23日 12:35

华为/H3C设备
Q:交换机配置SNMP支持?
A:
# 进入全局配置模式。
system-view
# 设置系统启用的SNMP版本号
[Quidway] snmp-agent sys-info version all
# 设置团体名和访问权限。
[Quidway] snmp-agent community read public
[Quidway] snmp-agent community write private
# 设置管理员标识、联系方法以及以太网交换机的物理位置。
[Quidway] snmp-agent sys-info contact master@abc.com
[Quidway] snmp-agent sys-info location Shenzhen,GD
# 允许发送Trap。
[Quidway] snmp-agent trap enable

如果交换机还没有配置VLAN IP,需要做下面的步骤:
# 配置VLAN 接口1 的IP 地址。
<Switch> system-view
[Switch] interface Vlan-interface 1
[Switch-Vlan-interface1] ip address x.x.x.x 255.255.255.0
channer
 
帖子: 64
加入时间: 2008年 2月 21日 15:43

Cisco设备

帖子channer 于 2010年 6月 23日 12:36

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

IOS
全局模式配置SNMP的共同体名:
snmp-server community community_string [ro|rw]
channer
 
帖子: 64
加入时间: 2008年 2月 21日 15:43

港湾设备

帖子channer 于 2010年 6月 23日 12:37

港湾设备
命令格式:config snmp community [readonly|readwrite] <string>
[readonly|readwrite]读确认/读写确认字符串
默认值:<string>字符串值readonly:public;
readwrite:private
使用指导community字符串为远程网络管理员配置交换机提供了一种用户确认机制。在交换机上有两种Community字符串:读确认字符串(readonly)允许对交换机进行只读访问;读写确认字符串(readwrite)提供了对交换机读写操作的权限。
配置实例Harbour(config)# config snmp community readonly harbour
service snmp enable
相关命令
show snmp community-string
Extreme设备
configure snmp community

命令格式:
configure snmp community [readonly | readwrite] {encrypted} <alphanumeric string>
命令描述:
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} <alphanumeric string>
命令描述:
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
channer
 
帖子: 64
加入时间: 2008年 2月 21日 15:43

北电设备

帖子channer 于 2010年 6月 23日 12:38

北电设备
北电passport 86系列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
passport 6400

Provision one or more Vr Snmp Community ( Com) components.
add Vr/<n> Snmp Community/<m>
Set the community string, used to authenticate SNMP messages
from SNMPv1 management entities. The default value is public.
set Vr/<n> Snmp Com/<m> communityString
<community_name>
where:
<community_name> 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/<n> Snmp Com/<m> viewIndex <a>
Specify Vr Snmp Com accessMode ( acMode) attribute for this
community. The default is readOnly.
set Vr/<n> Snmp Com/<m> accessMode
<readWrite_readOnly>
where:
<readWrite_readOnly> indicates the level of access for each
object in the view.

passport 8006

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-recv10.1.1.1 v2cpublic
channer
 
帖子: 64
加入时间: 2008年 2月 21日 15:43

Re: [FAQ] 常见网络设备snmp支持(cisco、netscreen、huawei、H3C等)

帖子fengjl 于 2010年 7月 28日 12:16

中兴设备
1、snmpv1、snmpv2c 基本配置
假设网管服务器地址为10.40.92.105 , 交换机上有一个ip 地址为10.40.92.200 的三层端口,要通过网管服务器管理交换机。
创建一个名为zte 的具有读写权限的团体和一个名为vvv 视图,关联团体
zte 和视图vvv 指定接收trap 的主机地址为10.40.92.105,commnity 为zte。
zte(cfg)#config router
zte(cfg-router)#set ipport 0 ipaddress 10.40.92.200 255.255.255.0
zte(cfg-router)#set ipport 0 vlan 2
zte(cfg-router)#set ipport 0 enable
zte(cfg-router)#exit
zte(cfg)#config snmp
zte(cfg-snmp)#create community zte private
zte(cfg-snmp)#create view vvv
zte(cfg-snmp)#set community zte view vvv
zte(cfg-snmp)#set host 10.40.92.105 trap v1 zte

2. snmpv3 基本配置
假设网管服务器地址为10.40.92.77,交换机上有一个ip 地址为10.40.92.11 的三层端口,使用用户安全模式(user security model,usm)通过网管服务器管理交换机。
创建一个名为zteuser 的用户,配置其所属组名字ztegroup,此组的安全级别为priv(即认证且加密),其读、写和通知视图均为缺省。指定接收trap 或inform 的主机地址为10.40.92.77,user 为zteuser。
zte(cfg)#config router
zte(cfg-router)#set ipport 1 ipaddress 10.40.92.11/24
zte(cfg-router)#set ipport 1 vlan 1
zte(cfg-router)#set ipport 1 enable
zte(cfg-router)#exit
zte(cfg)#config snmp
zte(cfg-snmp)# set group ztegroup v3 priv
zte(cfg-snmp)# set user zteuser ztegroup v3 md5-auth zte des56-priv zte
zte(cfg-snmp)# set host 10.40.89.77 inform v3 zteuser priv
飞思网巡专业IT运维网管系统,网络监控报警平台。www.freesinno.com
fengjl
 
帖子: 30
加入时间: 2008年 3月 4日 21:42


回到 使用技巧和知识库

在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客

友情链接
·友情链接   Cnfan.net中国网络    ChinaUnix    51CTO.COM    Cisco网络技术    ITPUB技术门户    IT168论坛    ZDNetChina中文社区    菊花论坛    深圳网恒易    中深同德    希驰科技    IT打工者    软件教程大全    原翔技术论坛    软件之家    海洋技术论坛   
cron